Bitcoin, From First Principles
We build understanding in dependency order — each topic only uses ideas already covered. For every mechanism, keep asking one question: how does this help untrusting strangers agree on one ledger? That single thread runs through the whole book. Read in order, and after each page answer the Check your understanding questions in your own words. Depth over speed.
Part 0 · Foundations — Why Bitcoin Exists
- Overview — Why Bitcoin Exists
- What Money Actually Is
- The Trust Problem
- The Double-Spend Problem
- The Predecessors
- Byzantine Generals & Sybil Attacks
- Satoshi’s Synthesis
Part 1 · Cryptographic Foundations
Part 2 · Transactions & the UTXO Model
- Overview — Transactions & UTXO
- UTXO vs the Account Model
- Anatomy of a Transaction
- Fees, Change & the Conservation Rule
- Transaction IDs
- Locking & Unlocking: scriptPubKey & scriptSig
- Bitcoin Script: the Stack Language
- Standard Scripts & Address Types (P2PK → P2TR)
- Coinbase Transactions
Part 3 · Blocks & the Blockchain
- Overview
- Anatomy of a Block
- The Block Header (80 bytes)
- Merkle Trees & SPV Proofs
- Chaining Blocks: prev-hash & immutability
- Block Validation Rules
- Orphans, Stale Blocks & Reorgs
Part 4 · Consensus — Proof of Work & Mining
- Overview
- Proof of Work in Depth
- Target, bits & Difficulty
- The Difficulty Retargeting Algorithm
- The Mining Process: nonce, extranonce & the coinbase
- Mining Pools & How Rewards Are Shared
- The Most-Work Chain & Probabilistic Finality
- Block Subsidy, Halving & Issuance
Part 5 · The Network & Nodes
- Overview
- Node Types: Full, Pruned, SPV & Archival
- The P2P Protocol & Message Types
- Gossip: How Transactions & Blocks Propagate
- The Mempool
- Initial Block Download & Sync
- Network Attacks: Eclipse, Sybil & Partitioning
Part 6 · Economics & Incentives
- Overview
- The 21 Million Cap & Supply Schedule
- Miner Incentives & the Security Budget
- The Fee Market
- Game Theory: Why Honesty Pays
- Monetary Properties & Honest Critiques
Part 7 · Wallets & Keys
- Overview
- Private Keys, Public Keys & Signatures
- Addresses, WIF, Base58Check & Bech32
- HD Wallets (BIP32)
- Seed Phrases (BIP39)
- Derivation Paths (BIP44/49/84/86)
- Multisig & Output Descriptors
- Key Security: Hardware Wallets, Cold Storage & Backups
Part 8 · Modern Bitcoin
- Overview
- SegWit & Taproot: the Soft-Fork Era
- The Lightning Network
- Sidechains, Statechains & Two-Way Pegs
- Covenants: Restricting How Coins Move
- Ordinals, Inscriptions & Data on Bitcoin
Part 9 · Hands-On
- Overview
- Running Your Own Node
- Talking to Your Node with bitcoin-cli
- Build & Decode a Raw Transaction
- Verify a Merkle Proof Yourself
- Testnet, Signet & Regtest
- Reading the Live Chain & Block Explorers
Part 10 · Advanced & Rare Concepts
The senior-level track — the subtle mechanics, famous bugs, and cryptographic frontier most engineers never learn.
- Overview — Advanced & Rare
- Transaction Malleability
- RBF, CPFP & the Zero-Confirmation Myth
- SIGHASH Flags & the SIGHASH_SINGLE Bug
- Timelocks → HTLCs & Atomic Swaps
- The UTXO Set vs the Chain
- Privacy & Deanonymization
- Famous Incidents & Attacks
- Taproot, Schnorr & MuSig2
- Soft Forks & the “Anyone-Can-Spend” Trick