A 3Blue1Brown-style seven-step explainer of blocks, hashes, chains, mining, tampering, consensus and decentralisation
A block bundles a few transactions with the fingerprint of the block before it. Squeeze it all through a hash function and out comes this block's own fingerprint: its hash.
Top to bottom: block number and nonce, the data (Alice pays Bob 5), the previous hash, and this block's hash.
Change one digit and the hash becomes unrecognisable. Change it back and the exact same hash returns. Same input, same output, but no way to run it backwards.
SHA-256 always gives 64 hex digits; we show the first 8. Changing 5 to 6 here flipped 137 of its 256 bits.
Each new block stores the hash of the block before it. That stored hash is the link: every block points back to its parent, all the way to the first one, the genesis block.
The links point backwards. A block knows its parent, never its children.
A valid hash must start with zeros. The only way to find one is to keep changing a counter, the nonce, and hashing again. Hard to find, instant to check.
Our toy rule needs three leading zeros. Bitcoin tunes its rule so the whole network finds a block about every 10 minutes.
Edit an old block and its hash changes, so the next block's link breaks, and the next, all the way to the end. Tap any block to tamper with it; tap again to undo.
Blocks before the edit stay valid. A forger would have to mine every later block again, faster than everyone else.
Thousands of computers check every new block for themselves. When the honest majority agrees it is valid, it joins the chain; a forged block is rejected.
One dissenting node changes nothing. In Bitcoin the chain with the most proof of work wins.
There is no central server. Every node keeps its own full copy and passes new blocks to its neighbours. Tap a node to forge its copy and watch the others outvote it.
To fake the ledger you would have to out-compute most of the network at once.