Bitcoin¶
This is the deepest section of the book. Bitcoin gets the fullest treatment here because everything in Origins, Economics, Cryptography, Distributed Systems, and Blockchain Fundamentals was building toward being able to explain, precisely and mechanically, how the actual, running Bitcoin network works, not as an analogy or a simplified model, but as the specific protocol it is.
What you need to know first¶
Everything preceding this section, especially Blockchain Fundamentals (blocks, headers, the chain) and Cryptography (hashes, keys, signatures, Merkle trees). This section applies those tools directly to Bitcoin Core's actual, specific implementation, with verified code examples throughout.
Chapters¶
Network and nodes¶
- Bitcoin Nodes: nodes, miners, and wallets as distinct, independent roles
- The Bitcoin Network: real-world scale and propagation speed
- Full Nodes: what independent validation actually checks
- Light Clients: SPV, and precisely what it does and doesn't verify
- Bitcoin Core: the reference implementation as, in practice, the specification
Transactions¶
- Bitcoin Transactions: structure, serialization, and a verified txid computation
- The UTXO Model: where bitcoins actually "live," precisely stated
- Inputs and Outputs: referencing, unlocking, and the fee that's never a stated field
- Transaction Fees: weight, vsize, and why fees are priced per byte
- The Mempool: why there's no single global mempool, and how Replace-By-Fee works
- Transaction Confirmation: turning confirmation depth into a practical risk decision
- Coinbase Transactions: the one transaction type with no real input
Scripts and spending conditions¶
- Bitcoin Script: a working, verified stack-machine interpreter
- ScriptPubKey and ScriptSig: the standard script types, at a glance
- P2PKH
- P2SH
- SegWit: the malleability fix that also changed fee accounting
- Taproot: making complex spends indistinguishable from simple ones
- Ordinals and Inscriptions: an emergent use of Taproot, and the debate it sparked
Mining¶
- Proof of Work: what a miner actually computes, with the whitepaper's own formula
- Mining: the full process, end to end, and mining economics
- Mining Difficulty: target, bits, and difficulty as a ratio
- Difficulty Adjustment: the retargeting formula, with its clamp
- Nonce: why 4 bytes isn't enough anymore, and how extranonce fills the gap
- Block Rewards: subsidy versus total reward
- The Halving: the full historical schedule
- Mining Pools: variance reduction, and the centralization it introduces
- ASICs: why CPU and GPU mining became permanently unprofitable
- Hashrate: an estimate, not a measurement
- 51% Attacks: precisely what a majority attacker can and cannot do
- Energy Consumption: the mechanism, the scale, and the genuine debate
Bitcoin monetary policy¶
- 21 Million BTC: where the number comes from, and what it does and doesn't guarantee
- Issuance Schedule: the disinflationary curve, compared to gold and fiat
- Stock-to-Flow: a contested price model, and why it's contested
- Lost Coins: why "lost" is unrecoverable by design, not a bug
- Fee Market: block space as a scarce resource with a real price mechanism
- Long-Term Security Budget: the open question this section builds toward
Experiments¶
- examples/bitcoin/: decoding real transactions and blocks
- Every code example throughout this section has been run and verified directly, not hand-computed
Next¶
Continue to Forks and Protocol Upgrades to see how Bitcoin actually changes over time without a central authority, including the SegWit and block-size disputes this section's transaction and script chapters set up but didn't resolve. Readers more interested in key management can instead jump to Wallets and Key Management.