Overview: Often we hear that miners have to solve a difficult mathematical puzzle to add a new block to existing blockchain. Now the question is - what is this mathematical puzzle and how difficult it is. Let us understand this in context of Bitcoin mining. The Mathematical Puzzle: A Bitcoin block basically consists of block header, a number of recent verified transactions and other details. The block header contains following fields: Field Purpose Size (Bytes) Version Block version number 4 hashPrevBlock 256-bit hash of the previous block header 32 hashMerkleRoot 256-bit hash based on all of the transactions in the block 32 Time Current timestamp as seconds since 1970-01-01T00:00 UTC 4 Bits Current target in compact format 4 Nonce 32-bit number (starts at 0) 4 Courtesy: https://en.bitcoin.it/wiki/Block_hashing_algorithm Here the Bits field is a target or threshold value. All one has to do is to find a Nonce for which the hash of the block header is less than or eq...
A Beginner's Guide