⛓️ Building the Chain
How blocks link together to create immutable history
The Chain Structure
Bitcoin groups transactions into "blocks" and chains them together. Each block contains a reference to the previous block. To change an old transaction, you'd have to redo ALL the work for that block and every block after it!
The blockchain is a cryptographically-linked data structure. Each block header contains the hash of the previous block, creating an immutable chain. Changing any historical data invalidates all subsequent blocks.
Bitcoin's blockchain implements a Merkle-DAG (Directed Acyclic Graph) with cumulative PoW. Block headers contain prev_block_hash, merkle_root, timestamp, nonce. Hash chaining creates temporal ordering with O(1) verification but O(n) reorg attack cost where n = confirmations.
Interactive Blockchain
Add transactions to see how the blockchain grows:
Why Chaining Works
- Immutability: Changing old data requires redoing all subsequent work
- Cumulative Security: Each new block makes all previous blocks exponentially more secure
- Thermodynamic Finality: Cost to reorg = sum of PoW since target block ≈ (hashrate × time × electricity cost)