Bitcoin Block Headers Explained: Fields, Hashes, and Proof of Work
A Bitcoin block header is an 80-byte structure that commits to a previous block, a Merkle root, and mining-related fields. Nodes use it to verify proof of work and link blocks into a chain. The header is not the entire block: transactions follow separately in the serialized block.
The six header fields
- Version (4 bytes): signals the block version and may convey deployment signaling bits.
- Previous block hash (32 bytes): links this header to its predecessor.
- Merkle root (32 bytes): commits to the block's transaction IDs through a Merkle tree.
- Time (4 bytes): the miner-provided timestamp, subject to consensus constraints.
- nBits (4 bytes): a compact encoding of the proof-of-work target.
- Nonce (4 bytes): a value miners vary while searching for a qualifying hash.
These byte counts sum to 80. Hashes are commonly displayed in reversed byte order relative to their serialized representation; software must distinguish wire encoding from human-readable hexadecimal.
How the block hash is checked
Bitcoin applies SHA-256 twice to the serialized 80-byte header. Interpreted as a 256-bit integer under Bitcoin's comparison convention, the result must not exceed the target decoded from nBits. A lower target requires more expected hashing work. A valid header hash is necessary, but not sufficient, for a valid block: nodes also validate its transactions and all applicable consensus rules.
What does the Merkle root commit to?
The root summarizes the transaction identifiers in the block. In SegWit blocks, witness data is committed through a separate witness commitment in the coinbase transaction rather than directly through the header's ordinary transaction-ID Merkle root.
Why headers matter for lightweight verification
Headers are compact and can be downloaded independently of full blocks. A client can check proof of work and chain linkage, but cannot infer from headers alone that every transaction in every block obeys consensus rules. Fully validating nodes perform the additional checks.
Primary references
Bitcoin Developer Reference — Block Headers: https://developer.bitcoin.org/reference/block_chain.html
Bitcoin whitepaper, Sections 4–8: https://bitcoin.org/bitcoin.pdf
Bitcoin Core source: https://github.com/bitcoin/bitcoin
