-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclass 6.txt
181 lines (78 loc) · 3.8 KB
/
class 6.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
Reference Links:
-----------------
DAO - https://makerdao.com/en/
DAPPS - https://app.uniswap.org/#/swap
IPFS - https://ipfs.tech/
Dapp --> User intefacing applications deplyed on eth blockchain
DAO --> Decentralized autonomous organizations ---> regulatory , Voting use cases,
Company board meeting conducted on DAo to chose wherether to go for selling out shares as part of ressling option
SVB:
----
DAO: {member1, mebmer2, member 3 ...... member n}
input votes from users ----> smart contract
smarct contract --> will decide upon the final decision
user identity ---> ethereum account ---> vote casting
anything on ETH blockchain cn be refered thru ethereum address
smart contract address ---> 0909879jhbjhjhbjhgh9809809809
query cust balance of accnt 1 --> 8979870987jhkjhjj
contrat address ----> 0909879jhbjhjhbjhgh9809809809
----> accnt 1 ---> 100 eth
Nonce is ethereum is a random number generated for each and evry txn in order make it truly random and eleminate the duble spending problem
account1: 12345
txn1 ---> usra to usrb ---> 10 eth , nonce ---> 7687687 (uuid)
txn2 ---> usra to usrc ---> 5 eth, nonce ---> 1266779 (uuid)
10 txn ----> block 7 + block 8 9 10 11 12 13 14
10 txn ----> uncle block7 --- no yet confimred to the chain ---> not part of chain and txns
10 txn ---> block 15/16 ----> main ledger
miner 5 ---> block 7 (1,2,3,4,5) ---> 7 next block confirmations for majority of miners
miner 8 ---> block 7 (1,2,3,)
other miners -----> majority of miners chose block 7 from miner 5 ---> more txmn
uncle block ----> miner 8 ----> 0.00625 eth
validations:
-------------
1. check the ledger balance
2. validate the adress with public key
3. validate the recepient adress with public key
4. validate the status of recepient address
User A transferring 10 ETH to User B ----> Trxn (digitial sign verifications)
User A deploying a smart contract in a network ---> message
Swarm protocol ---> Ledger sharing ---> storage
Whisper protocl ---> Ledger replicating ---> TCP communication
Use cases:
------------
B2B ---> enterprise level ---> private/enterprise blockchain ---> hyperledger
no txn fee, identity are to be revelaed
B2C ---> NFT market paces, DEX, DAO ---> ETH, polygon
txn fee exists, identiers are abstracted
Gorlei
ropsten
rinkbey
sepolia ---> pos testnet
Ethereum has unlimited supply:
burning fee ---> where in as part of block creation few ethers will get burn/wiped out
genesis block ----> 200M eth
block 1 ----> 10000 eth, burn/wipe ---> 0.1% of eth ---> 100
block 100 ----> 10M eth (200 + 10 = 210M) ---> 1M
(200 + 10 - 1) == 209M
Burn ---> Miner fee (120 eth, 1 eth)
100 nodes ----> block 100 ---> 51 confirmations
200 ---> 102-103
block ----> longest chain -> suffixded with 7 other valid blocks
https://github.com/trufflesuite/ganache-ui/releases
select ganache-2.7.0-linux-x86_64.AppImage
open the folder and click on open terminal
sudo chmod 777 -R ganache-2.7.0-linux-x86_64.AppImage
./ganache-2.7.0-linux-x86_64.AppImage
step1 --- launch ganache node
setp2 --- launch remix ide
step3 --- choose any smarct contract from contract folder in remix
step4 --- compile the contract
step5 --- deploy the contrct to 'dev - ganache'
User1 ----> token.sol ----> deployment
pass on my accoutn address ---> a123de
deploying contract ---> b567fg
(a123de ---> b567fg)
(g123hg ----> b567fg)
if anyone other than me tries to redeploy the contract---> it wil fail sending message that "caller is not owner"
can ther be more owenr per contract ?
mule good control sentence corn ill need whale never exit crane kite