$EX5 pre-sale — Seed tier · 500M fixed supply · 50% burn · sign up at portal.ex5.comJOIN →
Updated

Block Header

In short: A block header is the compact summary at the top of every block, and hashing it produces the block's unique identifier.

A block header is the compact summary at the top of every block, and hashing it produces the block's unique identifier. In Proof of Work, the header is the part that miners hash over and over while competing for the block reward, which is how the consensus algorithm incentivizes mining.

Why it matters

Each header contains the hash of the previous block's header, so headers link the blocks into a chain, and changing any old block would change every hash after it. The header also holds a Merkle root that commits to all transactions in the block, so light wallets can confirm that a transaction is included by downloading headers and a short proof instead of the whole blockchain. In Bitcoin, a header is only 80 bytes, which keeps this kind of checking cheap.

Example

A Bitcoin miner builds a candidate block and fills its header with six fields: the version, the previous block's hash, the Merkle root of the chosen transactions, a timestamp, the difficulty target and a nonce. The mining hardware hashes this header again and again, changing the nonce each time. When one attempt produces a hash at or below the target, the miner broadcasts the block, and that header hash becomes the block's identifier shown on block explorers.