TeachMeBitcoin

The 80-Byte Block Header

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

The 80-Byte Block Header

The Block Header is the most critical 80 bytes in the Bitcoin protocol. It acts as the "metadata" for the entire block, containing the cryptographic link to the past and the proof of work required for the future.

1. The Six Fields

The block header consists of exactly six fields, serialized in a specific order:

Field Size (Bytes) Description
Version 4 The block version number (upgrade signaling).
Previous Block Hash 32 A double-SHA256 hash of the previous header.
Merkle Root 32 A hash representing all transactions in the block.
Timestamp 4 Unix epoch time when the miner started hashing.
Bits 4 The compact format of the mining Target.
Nonce 4 An arbitrary number used to find a valid hash.

2. Why 80 Bytes?

The header is designed to be extremely compact. By only requiring 80 bytes, Bitcoin allows for SPV (Simplified Payment Verification) wallets. These wallets only download the headers (roughly 4MB per year) instead of the full multi-gigabyte blockchain, while still being able to verify transactions using Merkle proofs.

3. The Serialization Order

The fields are serialized using Little-Endian byte order. This means that if the version is 00000002, it is stored on disk and hashed as 02000000.

4. The Role of the Version Field

The first 4 bytes of the header define the "ruleset" the miner is following. In the early days, this was a simple counter. Today, it is a complex bit-field used for: * Protocol Upgrades (Soft Forks). * Miner signaling (BIP 9). * Computational optimizations (ASICBoost).

IMPORTANT

The block hash is NOT the hash of the block data; it is the double-SHA256 hash of these 80 bytes. This is why miners only need to iterate on the header to find a solution, rather than re-hashing the entire 1MB+ block every time.

In the next section, we will look at how the Version Field has evolved to coordinate global consensus upgrades.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!