Chapter 6 Further Reading

Primary Sources

Bitcoin Improvement Proposals (BIPs)

  • BIP 16: Pay to Script Hash (P2SH) — Gavin Andresen, 2012. The specification for P2SH transactions, which enabled practical multi-signature wallets and laid the groundwork for SegWit's nested format. Essential reading for understanding how Bitcoin's scripting system evolved beyond simple pay-to-public-key-hash.
  • https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki

  • BIP 34: Block v2, Height in Coinbase — Gavin Andresen, 2012. Required the block height to be included in the coinbase transaction's ScriptSig, ensuring each coinbase is unique. A small but important change that illustrates how protocol rules evolve.

  • https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki

  • BIP 141: Segregated Witness (Consensus Layer) — Eric Lombroze, Johnson Lau, Pieter Wuille, 2015. The definitive specification for SegWit. Dense but precise. Every claim in Section 6.6 of this chapter derives from this document.

  • https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki

  • BIP 143: Transaction Signature Verification for Version 0 Witness Program — Johnson Lau, Pieter Wuille, 2016. Defines how signature hashing works for SegWit transactions. Critical for understanding why SegWit transactions are signed differently from legacy transactions.

  • https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki

  • BIP 144: Segregated Witness (Peer Services) — Eric Lombroze, Pieter Wuille, 2016. Defines the network-level serialization for SegWit transactions — the marker/flag bytes, the witness structure, and the new inventory types. This is the "wire format" counterpart to BIP 141's consensus rules.

  • https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki

  • BIP 173: Base32 address format for native v0-16 witness outputs (Bech32) — Pieter Wuille, Greg Maxwell, 2017. Defines the Bech32 address format used by native SegWit addresses (bc1q...). Includes a detailed explanation of the error detection properties of the Bech32 encoding.

  • https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki

Bitcoin Source Code

  • Bitcoin Core: src/script/interpreter.cpp — The Script interpreter implementation. This is where OP_DUP, OP_HASH160, OP_CHECKSIG, and every other opcode are implemented. Reading this code is the definitive way to understand how Bitcoin Script works.
  • https://github.com/bitcoin/bitcoin

  • Bitcoin Core: src/consensus/tx_verify.cpp and src/consensus/tx_check.cpp — Transaction validation logic, including the overflow checks added after the 2010 value overflow incident. The MoneyRange() function lives here.

Books

Protocol and Implementation

  • "Mastering Bitcoin" by Andreas M. Antonopoulos and David A. Harding (3rd Edition, 2023). The definitive technical reference for Bitcoin's protocol. Chapter 6 (Transactions) and Chapter 9 (The Blockchain) correspond closely to this chapter's content but go deeper into every field. The 3rd edition (with Harding as co-author) includes updated SegWit, Taproot, and Schnorr signature coverage.

  • "Programming Bitcoin" by Jimmy Song (O'Reilly, 2019). A hands-on guide to implementing Bitcoin from scratch in Python. Song walks through building a transaction parser, a Script evaluator, and a block validator — exactly the kind of implementation work we do in this chapter's code exercises, but with more complete implementations. Highly recommended if you want to extend the code from this chapter.

  • "Bitcoin and Cryptocurrency Technologies" by Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, and Steven Goldfeder (Princeton University Press, 2016). An academic textbook that provides rigorous treatment of UTXO semantics, Script, and the UTXO model's formal properties. Chapter 3 (Mechanics of Bitcoin) covers much of the same ground as this chapter but from a more theoretical perspective.

History and Governance

  • "The Blocksize War" by Jonathan Bier (2021). A comprehensive, year-by-year account of the block size debate, the SegWit activation saga, the UASF movement, the Bitcoin Cash fork, and the SegWit2x collapse. Essential reading for Case Study 2. Bier was present for many of the events and provides detailed primary source references.

  • "The Book of Satoshi" edited by Phil Champagne (2014). A compilation of Satoshi Nakamoto's emails, forum posts, and code comments. Includes Satoshi's original explanations of the UTXO model, the coinbase transaction design, and the scripting system. Invaluable for understanding the "why" behind Bitcoin's design choices.

Academic Papers

  • "Bitcoin: A Peer-to-Peer Electronic Cash System" by Satoshi Nakamoto (2008). The original whitepaper. Section 2 ("Transactions") describes the UTXO model in abstract terms. Section 7 ("Reclaiming Disk Space") describes the Merkle tree structure used in blocks. Reading the whitepaper after this chapter will reveal how much implementation detail Satoshi left unspecified — the scripting system, the coinbase transaction, and SegWit were all developed after the whitepaper.
  • https://bitcoin.org/bitcoin.pdf

  • "An Analysis of Bitcoin's UTXO Set" by Sergi Delgado-Segura, Cristina Perez-Sola, Guillermo Navarro-Arribas, and Jordi Herrera-Joancomarti (2018). An empirical analysis of the Bitcoin UTXO set — its size, growth rate, dust distribution, and implications for node performance. Provides data that contextualizes the dust discussion in Section 6.1.

  • "Transaction Malleability and BIP 62" by Andrew Poelstra (2014). A detailed analysis of transaction malleability in Bitcoin — how it works, why it is a problem, and the various proposed fixes that preceded SegWit. Useful for understanding why SegWit's approach (segregating the witness) was chosen over alternative malleability fixes.

  • "Utreexo: A Dynamic Hash-Based Accumulator Optimized for the Bitcoin UTXO Set" by Tadge Dryja (2019). Proposes a cryptographic accumulator that allows nodes to verify UTXO transactions without storing the full UTXO set. This is the "stateless verification" possibility mentioned in Section 6.9's comparison of UTXO and account models.

Online Resources

Interactive Tools

  • Blockchain.com Explorer (https://www.blockchain.com/explorer) — A block explorer where you can view raw transaction data, trace UTXO flows, and see block headers.

  • Mempool.space (https://mempool.space) — A modern Bitcoin block explorer with real-time mempool visualization, fee estimation, and SegWit adoption statistics. Particularly useful for observing the fee market and weight/vbyte calculations.

  • LearnMeABitcoin.com by Greg Walker — An excellent visual guide to Bitcoin's technical internals. The transaction and script sections include interactive diagrams that show how data flows through the scripting engine. The raw transaction parser on the site lets you paste a hex transaction and see each field decoded.

  • Bitcoin Script IDE (https://siminchen.github.io/bitcoinIDE/build/editor.html) — A web-based tool for writing and testing Bitcoin Script programs. You can see the stack state after each operation, which is invaluable for understanding P2PKH, P2SH, and multi-signature scripts.

Technical References

  • Bitcoin Optech (https://bitcoinops.org) — A technical newsletter and resource hub for Bitcoin developers. Their "Topics" section has comprehensive entries on SegWit, Taproot, UTXO set management, coin selection algorithms, and transaction malleability. The weekly newsletter covers ongoing protocol development.

  • Bitcoin Developer Reference (https://developer.bitcoin.org/reference/) — The official developer documentation for Bitcoin's protocol. Includes detailed specifications for transaction serialization, block format, and network messages.

  • Bitcoin Wiki: Script (https://en.bitcoin.it/wiki/Script) — A comprehensive reference for Bitcoin's scripting language, including all opcodes, their semantics, and examples of standard and non-standard scripts.

Video Lectures

  • Pieter Wuille, "Segregated Witness and Its Impact on Scalability" (Scaling Bitcoin Hong Kong, 2015). The original presentation of SegWit by its primary author. Available on YouTube. Dense but authoritative.

  • Jimmy Song, "Programming Bitcoin" (various conference talks, 2018-2019). Song's conference presentations complement his book and walk through raw transaction parsing and Script execution with live Python coding.

Hands-On Practice

  • Bitcoin Testnet Faucet — Obtain free testnet BTC and practice creating, signing, and broadcasting real transactions without risking real funds. Multiple faucets are available; search for "Bitcoin testnet faucet."

  • Bitcoin Core (testnet mode) — Run Bitcoin Core in testnet or regtest mode to explore the UTXO set, decode raw transactions, and mine blocks on a local test network. The bitcoin-cli commands decoderawtransaction, getrawtransaction, and gettxout correspond directly to concepts in this chapter.

  • Python-bitcoinlib (https://github.com/petertodd/python-bitcoinlib) — A Python library for working with Bitcoin's data structures. Useful for extending the transaction parser and UTXO model implementations from this chapter's code files.