Block Header
The block header is an 80-byte data structure that contains essential metadata about a Bitcoin block. It is the specific piece of data that miners hash billions of times per second when searching for a valid proof of work.
Understanding the Block Header
Section titled “Understanding the Block Header”The block header is compact by design — only 80 bytes — because miners must hash it trillions of times per second. Despite its small size, it cryptographically commits to the entire block of transactions (via the Merkle root) and links to the previous block (via the previous block hash), forming the blockchain.
Think of the block header as a book’s title page. The title page contains just the key details — title, author, edition, publisher — but it represents the entire book. Similarly, the block header contains a compact summary that represents and secures the full block of potentially thousands of transactions.
The block header contains six fields:
| Field | Size | Description |
|---|---|---|
| Version | 4 bytes | Block version number, indicating which validation rules to follow |
| Previous Block Hash | 32 bytes | SHA-256d hash of the previous block’s header, linking this block to the chain |
| Merkle Root | 32 bytes | Root hash of the Merkle tree of all transactions in this block |
| Timestamp | 4 bytes | Approximate creation time of the block (Unix epoch) |
| nBits | 4 bytes | Compact representation of the target difficulty |
| Nonce | 4 bytes | The value that miners iterate to find a valid hash |
Practical Example
Section titled “Practical Example”When a pool sends a new job via Stratum, the miner reconstructs the 80-byte block header from the provided components. The ASIC’s hashing chips then compute SHA-256d (double SHA-256) on this header with different nonce values at rates of hundreds of terahashes per second. When a hash is found that is numerically less than the target encoded in nBits, a valid block (or share) has been discovered.