// learn · episode 02

Blocks & chains

In episode 1 you made fingerprints and mined for lucky ones. Now we stack those fingerprints into a structure with a remarkable property: change anything, anywhere in its history, and the whole world can see it. Everything runs in your browser.

01 · anatomy

What's inside a block

Strip away the mystique and a block is three things: some data (say, a ledger entry), the previous block's hash (its lineage), and a nonce (the proof someone did the mining work). Hash all three together and the block is sealed.

block #7

✗ invalid

prev hash — the lineage

000a3fc8b7e21d904c55f10287e6f3b19d2c4a8e0f6b5d3c2a190807e6d5c4b3

the fingerprint of block #6 — baked into this block's own hash

nonce — the proof

0

hash — the fingerprint

sealed only while it starts with “000”

Edit the data and the seal breaks instantly — the old nonce is worthless against the new fingerprint. That's the avalanche effect from episode 1, now guarding a ledger entry.

02 · the chain

Chain them together

Here's the trick that turns blocks into a blockchain: every block's hash includes the hash of the block before it. They're not a list — they're a chain of custody. Try changing any ledger entry below, especially an early one, and watch what happens downstream.

⛏ forging the chain — mining 5 blocks…

block #1 genesis

✗ broken

nonce 0

prev 000000 (genesis)

block #2

✗ broken

nonce 0

prev

block #3

✗ broken

nonce 0

prev

block #4

✗ broken

nonce 0

prev

block #5

✗ broken

nonce 0

prev

03 · the real thing

A real one

Your toy chain and Bitcoin differ mainly in scale, not anatomy. Here is the most famous block ever mined — the very first — with every header field annotated. You'll recognize all of them.

Bitcoin block #0 — the genesis block

real, historical block
version
1
which rule-set the miner followed
prev block hash
0000000000000000000000000000000000000000000000000000000000000000
all zeros — there is no block before the genesis block, exactly like block #1 in your chain above
merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
one hash summarizing every transaction in the block — real blocks carry thousands at once
timestamp
2009-01-03 18:15 UTC
when it was sealed
bits (difficulty)
0x1d00ffff
how many leading zeros the network demands — your “000”, industrial strength
nonce
2,083,236,893
the winning ticket — found after roughly two billion tries
hash
000000000019d6689c085ae165831e9934ff763ae46a2a6c172b3f1b60a8ce26
ten leading hex zeros — every Bitcoin block since chains back to this fingerprint

Inside its single transaction, Satoshi Nakamoto left a newspaper headline as a timestamp proof: “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.” The first block's data field was already making a point about the system it replaced.

a new block ≈ every 10 minutes, for 17 years straight

modern blocks carry roughly 2,000–4,000 transactions each

anyone, anywhere can re-verify the entire history — that's the point

next up

Episode 03 — Consensus & proof of work play now →

You can now build history and prove tampering. Next: how thousands of strangers agree on which history is the real one.

Building something that needs this to be right? →