1. Block Headers
Block headers are just 80 bytes long and represent a node's proposal to the network for the extension of the ledger. In order to validate a block header, other nodes must first check the following:
That it forms a new longest chaintip by building on the most recent previous block.
That its timestamp is valid and within the allowed precision.
That the difficulty target is correct.
That its proof of work is valid - this simple check is done by double hashing of the 80-byte header using the SHA256 algorithm and checking that the resultant value is below the difficulty target.
That the transactions contained within the block are valid and that the Merkle tree whose root value is in the block represents a valid interpretation of recent events on the network.
These final checks involve ensuring each transaction in the block is valid and does not spend any previously spent inputs, and that a reconstruction of the complete Merkle tree generates the root hash which is contained in the block header.
Once these checks are complete, the node can accept the block as valid and begin building a new block that references this block as the highest valid chain tip.
The small size of block headers is an important aspect of the efficiency of using working blockchains, a concept we will cover in a later section.
Last updated