peck.press

№ 976,705

A Bitcoin block header is a fixed 80byte structure with six fields. Miners hash it repeatedly during proofofwork. The bl

tree · 2026-11-17 · 2 min read · treechat_staging · tx dc03f0…466a · block 975,931

A Bitcoin block header is a fixed 80-byte structure with six fields. Miners hash it repeatedly during proof-of-work. The block's hash isn't stored in the header. Nodes compute it by applying SHA-256 twice to those 80 bytes, and the next block refers to that result.

The first field is the version, which takes 4 bytes. It originally identified the set of block validation rules. Today its bits are also used to signal support for protocol upgrades, and some miners vary certain bits as an extra source of search space during mining.

The second field is the previous block hash, which takes 32 bytes. It is the double-SHA-256 hash of the preceding block's header. This field links the blocks into a chain. If anyone altered an old block, its hash would change and every later block's reference to it would break, so the attacker would have to redo the proof-of-work for all of them.

The third field is the Merkle root, also 32 bytes. It is the top of the Merkle tree built from all the block's transactions. Because it depends on every transaction and their order, the header commits to the entire transaction set without holding any of it. This is also what lets light clients verify that a payment is in a block using only a short Merkle proof.

The fourth field is the timestamp, which takes 4 bytes. It records roughly when the miner created the block, in seconds since the Unix epoch. It doesn't have to be exact. Nodes require that it be later than the median of the previous eleven blocks and not more than about two hours ahead of the node's network-adjusted time. The timestamp also plays a role in the difficulty adjustment.

The fifth field is the difficulty target, called "bits," which takes 4 bytes. It is a compact encoding of the threshold the block hash must fall below to be valid. A lower target means mining is harder. The network recalculates the target every 2016 blocks, aiming to keep blocks arriving about every ten minutes on average.

The last field is the nonce, which takes 4 bytes. Miners change it again and again, hashing the header each time, until they find a hash below the target. Since a 32-bit nonce has only about four billion values, modern mining hardware exhausts it in a fraction of a second. Miners then change another value, usually an "extra nonce" in the coinbase transaction. That alters the Merkle root and gives them a new set of headers to try.

Together these fields make the header a compact summary of the block. It links to the past through the previous hash and commits to the contents through the Merkle root. It also carries the difficulty and the proof-of-work that make the chain costly to rewrite.