Professional Documents
Culture Documents
LECTURE 2
MODULE-5
Blockchain 1.0: Need for Bitcoin, Commonly used terminologies: Mining, Block
frequency, Mining Pool, Block: Block Header, Hash, Markle root, Timestamp. SHA 256,
Bitcoin Mining and its types. Proof of Work, Mining Pool, Hashcash. Block
Propagation and Relay. Bitcoin scripting language and their use. Transaction in
Bitcoin.
The “nonce” in a bitcoin block is a 32-bit (4-byte) field whose value is adjusted by
miners so that the hash of the block will be less than or equal to the current target of
the network.
we can see that among the information included in a block header, all the rest of
the data are given and can be easily obtained except for the nonce.
So, to successfully mine a new block is equivalent to finding a correct nonce that
makes the hash value of the block header equal to or smaller than the target.
the Proof-of-Work process is a competition among miners to find “the Golden Nonce”
that will result in a block fingerprint (i.e., the hash value of the block header) that
satisfies a given condition or meets a given target.
We often see the block hash represented as hexadecimal numbers (64 digits) which
result from SHA-256 hashing. (64 hexadecimal digits × 4 = 256 bits)
The separate hash values are combined to get Hash01 and Hash23.
SHA-256
()
0000557C7295ADCCE7F1DB2C3FF2C719C2728F005E43D66ACDD577AEB0AD3D0
4/12/2023 DR. SUBHALAXMI CHAKRABORTY 18
HASHCASH MAPPING EXAMPLE 2 (FIG 2)
SHA-256
()
000000000000000000cebf9362fa4d73e7f8d0a5947d1cf1601625da6bdbfab6
4/12/2023 DR. SUBHALAXMI CHAKRABORTY 19
A nonce is a finite number with a 32-bit unsigned integer.
The maximum nonce=2^32 = 4 x 10^9
It has a value between zero and 4 billion (approximately).
Probability that one of them becomes valid =0.0000000001%.
A modest miner can create 100 million hashes per second. To traverse 4 billion
hashes, it takes just 40 seconds.
Output of the previous transaction will be the inputs for the next transaction as shown.
Transaction 0’s outputs are the inputs for transaction 1.
Outputs indicate Unspent Transaction Output(UTXO) from the previous transaction.
TX(2)
TX(3)
Now, after first 2 transactions monika decides to spend some money by buying some
commodity from ABC Motors.
So, the remaining BTC will be 0.2BTC , considered as UTXO
0.9BTC TOABC
0.6BTC FROM MURRY Murrey sent money to Monika
COMPANY
0.6 BTC
0.5BTC FROM ANAN 0.2 BTC TO MONIKA Anan sent money to Monika
0.5BTC
Bob sent money to Monika
Now, after first 2 transactions Monika decides to spend 0.3BTC
some money by buying some commodity from ABC
Motors. Kate sent money to Monika
0.2BTC
So, the remaining BTC will be 0.2BTC , considered as
UTXO Monika sent money to Monika
0.2BTC