Skip to main content

Block Header | Bitcoin Glossary | Mapping Bitcoin

Block Header

Protocol

Also known as: header

An 80-byte data structure at the beginning of each block containing the version number, previous block hash, Merkle root of all transactions, timestamp, difficulty target, and nonce. Miners hash the block header repeatedly to find a valid proof of work.

Overview

The block header is a compact 80-byte summary of a block's contents and context. It is the data structure that miners hash billions of times per second in the search for a valid proof of work. Despite its small size, the header cryptographically commits to all the data in the block through the Merkle root.

Header Fields

Offset  Size     Field                Description
──────────────────────────────────────────────────────────────
0       4 bytes  Version              Protocol version / signaling bits
4      32 bytes  Previous Block Hash  SHA-256d hash of the prior block header
36     32 bytes  Merkle Root          Root hash of all transactions in the block
68      4 bytes  Timestamp            Unix epoch time (seconds)
72      4 bytes  Bits                 Encoded difficulty target
76      4 bytes  Nonce                Counter that miners iterate
──────────────────────────────────────────────────────────────
Total: 80 bytes

The Mining Process

Mining involves repeatedly hashing the block header with different nonce values (and other variable fields like the coinbase transaction's extra nonce) until the resulting hash is numerically less than the difficulty target encoded in the "Bits" field:

while true:
    header.nonce += 1
    hash = SHA256(SHA256(header))
    if hash < target:
        block is valid!
        break

Why 80 Bytes Matters

The fixed, small size of the block header enables lightweight verification. Simplified Payment Verification (SPV) clients can download just the chain of headers (80 bytes per block) rather than the full blocks, drastically reducing bandwidth and storage requirements while still being able to verify that a transaction is included in a block via Merkle proofs.

Version Field and Signaling

The version field is not just a static protocol number. Through BIP9, individual bits in the version field are used by miners to signal support for proposed soft forks. This signaling mechanism allows the network to coordinate protocol upgrades without a central authority.