-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass 8.txt
251 lines (132 loc) · 4.45 KB
/
class 8.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
Agenda is to create truffle projc
prerequisites --- node v18, truffle, solidity compiler
Step1: Install node js version 18
--------
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install 18
Step2:
--------
npm install -g truffle (or) sudo npm install -g truffle
Step3: crete workspace for project
------
mkdir MetaCoin
cd MetaCoin
Step4: truffle unbox for standard folder/project structure
-------
sudo truffle unbox metacoin or truffle unbox metacoin
Step5:
---------
truffle compile or sudo truffle compile
Public blockchains:
--------------------
1. ledger access is visible for everyone
2. identity are anonymus
Private blockchains:
--------------------
100 banks
phase1:
-------
network1-
10 banks are coming together to create a project called CreditLedger
a--->b txn1 ---> securely so that others in network
channels --> thru which diffefernet business entities can create and exchange info thru the
a--->b 10 txn, 2 more private txn
ledger:
1. data attrbutes
2.
.
.
.
10. data ttributes
11. private [data attiubutes]
12. private [data attiubutes]
other banks will store hash of these private data:
11. hash of the private data
12. hash of the private data
potential gain that TAT for settlements and manual dispute is decreased by 20%
2 more banks wishes to join
config file:
-------------
seed nodes -
1 more bank wishes to drop off after 5 yrs
rest of banks ~ 100 / 150 ----> no visibility of the data/ledger access
txn1 -----> sbi to canara bank (sbi, canara) ---> validate
txn2 -----> sbi to karanta bank (sbi, karat) ---> validate
block1----> 2 txns
policies:
-----------
txn is being involved b/w bank A and bank B ----> it has to get approval from both banks ('bank A' AND 'bank B')
failed -- bank B hasnt given
both options ---
1. we can store data (normal data fields)
2. we can store hash of the data (sensitive data)
type Transaction {
userName public
AccountNum public
SSN private
MobNum private
}
network2
10 insurance wants to create InsureLedger ----> claim process
these doesnt require any kind of transaction/gas/crypo fee ---> higher adoption
INdy:
----
User A -----> wallet ----> can generate and store multiple DID
did1 ---> universirty degree (name, roll num, college, email) ----> func geneID (params) ---> unique id
did2 ---> credit/financial enquire ----> (name, email, bank accnt, bank name) --> func geneID(params) --- unique id2
Orgs are building their own network:
sawtooth ---> Intel, Fujitsu
Iroha ---> IBM, accentur
Indy ---> DID use case
Fabric ----> IBM
90% ----> Fabric
In Fabric terms, chaincode(permissioned) and smart contract(piblic) are same
network boot strap process:
-----------------------------
1. admin will create identities for all business entities (10 banks)
bank 1 ----> Identity1 {bank name, bank url, bank ip address, bank port, bank public key, bank x509 certs)
bank 2 ----> Identity2
Consensus: RAFT, POS, DPOS, Smart BFT, PBFT ----> used (Raft)
smart contract: node js, go, java, python(not advicible) ----> used (go/java)
api/sdk: java, node js, go ---> used ---> go/java
Identity Module:
-------------------
1. creates identity for business entities to be identifibale in the network
bank 1 is onboarded
{
bak name
bank ip
bank port
bank x509 certificates
bank public key
}
idneity folder strucure which is called MSP
Bidding/auction based financial platform:
-------------------------------------------
SEBI/CENTRAL party
quote details ----> can only be sent/exchange b/w ----> bank a, sebi
we can define policy at transaction or smart contract level:
Ploicies : which requires approval/signature from bank A and SEBI
config:
-------
channel1 ----> bank A, SEBI
if PVT TXN = 'channel1'
{
policy = 'bank A' and 'SEBI'
}
if NRML TXN
{
polic = 'bank A' OR 'bank B'
}
10 banks
if my txn is validated from 6 out of 10 banks ( n out of m)
I can consider this as valid txn
Membership, Blockchain (peer to peer network), Transaction, Chaincode
Peer roles:
-----------
endorsement
commiting
anchor
leader