-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass1.txt
174 lines (97 loc) · 3.92 KB
/
class1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Blockchain:
-----------
Dev:
1. Front end/UI - 20%
2. Backend - 70% (java/node js/go + solidity) ---> 80%
(RUST --> PolkaDOT/Solana) ---> 10%
3. Network/admin - 10%
Prerequiste:
node js --> backend (cohort1)
java --> smart contracts (cohort 2) -- HYperledger, R3 corda
Linux + docker --> commands
Solidity --> ethereum, polygon
Blockchain network: (B2B) Use cases Banking consortium (5 banks for trade finance bond)
private/enterprise blockchains ----> b2b (insurance bonds, trade bonds, )
public ---> b2c (digtal assets, tokens, nfts, digital currencies)
sbi, icici, hdfc, idfc, pnb -->
(on premises) , (on premises), (on premises), (aws), (gcp)
1. everone in the network should have some visibility on the ledger
2. everyone should have same access to create blocks
Consensus ---> mutual agreement among participants
Cryptography --> data encryption, hashing, digital singatures
Class Block
{
header
block id
timestamp
nonce
body
transaction
}
Hashing --> concept cryptography which enables secure communation
[user1, $100, user2] ---> plain text/raw transaction
hash of the message --> ghg768769867987hb,jhbhj987987987
given input we can calculate output using hashing
encryption - symmetric/asymetric
digital signatures
hashing
Genesis block: first block in blockchain
var genesis = {
network name: bitcoin
network id : 756
no of bitcoins : 1 MN
start
end date
}
hash (genesis) --- hiulhui7869876086098908nkjj98798
genesis block([empty [] + current hash) ---> block 1 (previous hash + current hash) ---> block 2 ----> block3
1500 transactions in the network ---
protocol -
1. create blocks for every 5 seconds ---> 50
2. crete blocks for 100 transacions ---15
3. create blocks for 400 KB ---> 25
Private blockchains ---> enterprises 5 banks
public ---> miners/validators ---> to validate the data and append to blocks
miners create pool of miners(sub groups) ---> control
400-1000 nodes (network mining is 5-10 large pool of miners)
digital asset ofmy degree:
--------------------------
Name: jag
course: CSE
duration: 4 years
CGPA:8
start date:
end date:
to smart contracts that creates unique id for me on blockchain for tohers to validate and verify my creditials
tokenizee --- token id (209898098)
query data from blockchain by passing this uniq (209898098), created by university ABC
Fungible tokens vs non fungible tokens:
Fungible tokens --> each and evry token is same --- digitial currency (bitcoin,ethereum)
Non fungible token --> each and evry token is diff
Banka, b ,c ,d ,e , bank e (regulator bank) --- USE case
bank a lend 100 CR to bank b (bank a, b) (bank a, b, c, d, e)
bank e wish to verify the amt of bank a lent to other banks ---> it can perform an analytical query on data avaailble in the ledger
public blockchains --> data visiblity of other banks is an issue
privtae blockahins/enterprise blockchains ---> data hiding/private data collection
based on txn origination , banks can specify the data visilibyt parameters
bank a --- bank b , ---- bank e (bank1, transfer amt 100 CR, bank b, approved by bank e)
c,d----> stores the hash of the data hash(bank1, transfer amt 100 CR, bank b, approved by bank e)
role definitons on transaction level
--------------------------------------
smart contract:
if txn == bank A and involved with bank B
{
only bank a and bank b }
else
{
record/store the transaction
}
data is stored on blockchains:
1. data can be persisted (backup) on external disk/hardware
2. sync data in the network from others
seed nodes in the network (this will help in sync up to date ledger)
protocol level ---how many n of seed nodes --- (10-20)
yahoo ---> yahoo
gmail ---> gmail
rediff
hotmail