Chuong 00
Chuong 00
“BLOCKCHAIN”
Blockchain và Crypto-Currency - Bitcoin
First Bitcoin’s event in October 2008
Source: https://bitcoin.org/bitcoin.pdf
Who is Satoshi Nakamoto?
Since 2008, after Bitcoin…
Blockchain và Crypto-Currency - Bitcoin
• For example, Bitcoin miners must try and guess the right
Nonce when they try multiple attempts for calculating a
block hash complying with specific requirements.
BLOCK 1
Consensus: the first 4 digits of HASH value must be below 1961 (target)
PREVIOUS HASH 0
TIMESTAMP FRI, 2 OCT 2018 10 : 30 : 00
GTM
DATA Mr Quang Thong TRUONG
opened c/a with Credit Suisse
Geneva
HASH 0985abc1370025abc98e00014
NONCE 46128
Example on estimating NONCE using tral
and error method
BLOCK 2
Consensus: the first 4 digits of HASH value must be below 1961 (target)
PREVIOUS HASH 000018a1370025abc98e00014
TIMESTAMP FRI, 2 OCT 2018 10 : 35 : 00
GTM
DATA Mr Quang Thong TRUONG’s c/a
was credited USD10,000,000
transferred from UBS Paris
HASH ?
NONCE ?
Example on estimating NONCE using tral and error method
NONCE VALUE HASH VALUE OF BLOCK 2
1 5a16sr0025sxt45362stuvbc912
2 7531sr0025sxt45362qtrsbc98e
3 5abcsr0025sxt45362qtrsbc98e
… …
18 9631sr0025sxcd5362qtrsbc123
… …
593255 29xyabc1370025abc98e00014
….
75320 1531sr0025sxt45362qtrsbc98e
Difficulty in Finding Nonce
▪ Miners must guess the valid nonce and add it to the hash of the
existing header, followed by rehashing the value and comparing the
value to the target hash.
▪ When the resulting hash value meets the requirements, miners can
receive rewards for the block.
Bitcoin: Miners in average to spend 10mn to
estimate the PoW capable to add a new block
Blockchain
The node can use this to verify that everything is still in order
Blockchain and P2P
They agree about what blocks are valid and which aren’t.
Blocks that are tampered with will be rejected by other nodes
in the network.
Blockchain and P2P