— —
Follow on X
LESSONS

Blocks and the chain

A block is a header plus transactions. The header links to the previous block and commits to every transaction through a Merkle root.

6 MIN READ
The fields of an 80-byte block header: version, previous hash, Merkle root, timestamp, bits and nonce.
LEVEL · Intermediate
IN THIS LESSON · 4 OF 9
BY THE END YOU WILL BE ABLE TO ANSWER
  • What links one block to the previous one?
  • What does the Merkle root commit to?

Then prove it: a 2-question quiz. The lesson marks itself complete at 100%.

A block bundles transactions and seals them. Its header is only 80 bytes and holds six fields: a version, the hash of the previous block's header, the Merkle root, a timestamp, the difficulty target in compact form, and a nonce.

The chain

Because each header contains the previous header's hash, blocks form a chain back to the genesis block of January 2009. Altering any transaction in an old block changes its Merkle root, so its header hash, so the "previous hash" in the next block, and so on to the tip. You cannot change history quietly; you can only redo all the work that followed.

The Merkle root

Transactions are hashed in pairs, then the pairs are hashed in pairs, up to one root. This lets a light client prove a transaction is in a block with only a handful of hashes instead of the whole block, which is the Simplified Payment Verification the whitepaper describes.

Size and timing

Blocks are found about every ten minutes on average and are limited to 4 million weight units (roughly 1 to 4 MB depending on transaction types). The first transaction in each block is the coinbase, with no inputs, paying the miner the subsidy plus fees.

80 bytes
the size of a block header, the only part miners hash
CHECK YOURSELF
1/2 What links one block to the previous one?
2/2 What does the Merkle root commit to?
pick an answer for each question

SOURCES

  1. Bitcoin: A Peer-to-Peer Electronic Cash System (Satoshi Nakamoto, 2008)
  2. Learn Me A Bitcoin: How does Bitcoin work?
Progress is saved in this browser only.