Further Reading: Bitcoin Scripting, Taproot, and Programmability
Essential Primary Sources
Bitcoin Improvement Proposals (BIPs)
-
BIP 16 — Pay to Script Hash (P2SH). Gavin Andresen, 2012. The original proposal that introduced P2SH, shifting script complexity from the sender to the recipient. Essential for understanding how Bitcoin's transaction type evolution began. Available at: https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki
-
BIP 65 — OP_CHECKLOCKTIMEVERIFY (CLTV). Peter Todd, 2014. Introduces absolute time locks to Bitcoin Script. The BIP includes detailed rationale and use cases including escrow, payment channels, and trustless collateral. Available at: https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki
-
BIP 112 — OP_CHECKSEQUENCEVERIFY (CSV). BtcDrak, Mark Friedenbach, Eric Lombrozo, 2015. Introduces relative time locks, enabling the state channel constructions that the Lightning Network depends upon. Available at: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki
-
BIP 141 — Segregated Witness (Consensus layer). Eric Lombrozo, Johnson Lau, Pieter Wuille, 2015. The SegWit specification that introduced the witness data structure, fixed transaction malleability, and created the weight-based block size limit. A watershed moment in Bitcoin's protocol evolution. Available at: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki
-
BIP 340 — Schnorr Signatures for secp256k1. Pieter Wuille, Jonas Nick, Tim Ruffing, 2020. The specification for Bitcoin's Schnorr signature scheme, including the key aggregation properties that make Taproot possible. Includes the formal security argument. Available at: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
-
BIP 341 — Taproot: SegWit version 1 spending rules. Pieter Wuille, Jonas Nick, Anthony Towns, 2020. The core Taproot specification defining the P2TR output type, key path spending, script path spending, and the Merkle tree construction. The most important BIP for this chapter. Available at: https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki
-
BIP 342 — Validation of Taproot Scripts. Pieter Wuille, Jonas Nick, Anthony Towns, 2020. Defines the script validation rules for Taproot, including the removal of the 10,000-byte script size limit and the opcode limit. This BIP is directly relevant to understanding how Ordinals inscriptions became possible. Available at: https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki
-
BIP 347 — OP_CAT. Ethan Heilman, Armin Sabouri, 2023. The proposal to reactivate the OP_CAT opcode in Tapscript. Understanding this proposal illuminates the ongoing debate about expanding Bitcoin's scripting capabilities. Available at: https://github.com/bitcoin/bips/blob/master/bip-0347.mediawiki
Books
-
Antonopoulos, Andreas M. Mastering Bitcoin, 3rd edition. O'Reilly Media, 2023. Chapters 7 (Transactions) and 8 (Script) provide the most comprehensive treatment of Bitcoin Script available in book form. The third edition covers Taproot and SegWit v1. The script walkthrough examples are excellent for building intuition.
-
Song, Jimmy. Programming Bitcoin: Learn How to Program Bitcoin from Scratch. O'Reilly Media, 2019. A hands-on guide to implementing Bitcoin's cryptographic primitives in Python. Chapters 6 (Script) and 8 (p2sh) walk through building a Script interpreter from scratch. The exercises are invaluable for developing a deep understanding of script execution.
-
Rosenbaum, Kalle. Grokking Bitcoin. Manning Publications, 2019. An accessible, heavily illustrated introduction to Bitcoin's technical foundations. The chapter on transactions uses visual stack traces that are particularly effective for learners who struggle with abstract descriptions.
-
Lopp, Jameson. Bitcoin Information Resources (https://www.lopp.net/bitcoin-information.html). A curated, regularly updated collection of Bitcoin technical resources. The Script and Smart Contracts section is an excellent starting point for going deeper.
Academic Papers and Technical Reports
-
Poon, Joseph, and Thaddeus Dryja. "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments." 2016. The foundational Lightning Network whitepaper. Essential reading for understanding how HTLC scripts, time locks, and multi-sig combine to create payment channels. Available at: https://lightning.network/lightning-network-paper.pdf
-
Nick, Jonas, Tim Ruffing, and Yannick Seurin. "MuSig2: Simple Two-Round Schnorr Multi-Signatures." Advances in Cryptology — CRYPTO 2021. The MuSig2 protocol specification for secure Schnorr multi-signatures. Addresses the rogue key attack and provides a practical protocol for n-of-n key aggregation. The paper demonstrates the mathematical elegance of Schnorr's linearity property.
-
Dryja, Thaddeus. "Discreet Log Contracts." MIT Digital Currency Initiative, 2017. Introduces the concept of using Schnorr adaptor signatures to build financial contracts on Bitcoin without modifying the protocol. A beautiful example of what can be achieved within Bitcoin Script's limitations.
-
Maxwell, Gregory. "Taproot: Privacy preserving switchable scripting." Bitcoin-dev mailing list, 2018. The original Taproot proposal that combined MAST with Schnorr key tweaking to create the key-path/script-path duality. Reading this alongside BIP 341 shows how the idea evolved from concept to specification.
-
Rodarmor, Casey. "Ordinal Theory." 2023. The documentation for the Ordinals protocol. Understanding ordinal theory and the inscription mechanism requires reading Rodarmor's original documentation alongside the BIP 342 changes that made inscriptions technically possible. Available at: https://docs.ordinals.com/
Online Resources and Tutorials
-
Bitcoin Script Wiki. A community-maintained reference for all Bitcoin Script opcodes, including their hex values, stack effects, and historical status (enabled, disabled, added by soft fork). Available at: https://en.bitcoin.it/wiki/Script
-
LearnMeABitcoin.com — Script section. Greg Walker's visual, interactive explanations of Bitcoin Script execution. The animated stack traces are outstanding for building intuition. Particularly useful for the P2PKH, P2SH, and SegWit script walkthroughs.
-
Bitcoin Optech. The Bitcoin Operations Technology Group publishes weekly newsletters covering Bitcoin protocol development. Their Taproot preparation series (2021) is the best guide to understanding the upgrade's components. Available at: https://bitcoinops.org/
-
Chaincode Labs Seminars. Free video seminars covering Bitcoin protocol development, including dedicated sessions on Script, SegWit, and Taproot. The interactive format and expert presenters make these excellent supplements to textbook learning. Available at: https://chaincode.com/
-
mempool.space. An open-source block explorer that provides detailed transaction visualizations, including script decoding, witness data display, and fee analysis. Essential for the real-transaction analysis exercises in this chapter. Available at: https://mempool.space/
Podcast Episodes and Talks
-
Pieter Wuille, "Taproot and Schnorr." Bitcoin Explained podcast, 2021. One of Taproot's primary authors explains the upgrade in accessible terms, covering Schnorr signatures, MAST, and the design choices behind P2TR.
-
Andrew Poelstra, "Miniscript: Practical Composability for Bitcoin Script." SF Bitcoin Devs, 2019. Poelstra introduces Miniscript, a structured subset of Bitcoin Script that enables analysis, composition, and generic signing. Understanding Miniscript shows where Bitcoin Script development is headed.
-
Casey Rodarmor, "Ordinals." Various podcasts, 2023. Rodarmor has discussed the design decisions behind Ordinals on multiple podcasts. Listening to the creator's rationale provides valuable context for the Case Study 2 analysis.
Historical and Philosophical Context
-
Szabo, Nick. "Formalizing and Securing Relationships on Public Networks." First Monday, 1997. The paper that introduced the concept of "smart contracts" — long before Bitcoin existed. Understanding Szabo's vision helps contextualize the Bitcoin vs. Ethereum scripting philosophy debate.
-
Back, Adam, et al. "Enabling Blockchain Innovations with Pegged Sidechains." 2014. An early paper exploring how Bitcoin's scripting limitations could be addressed through sidechains, offering an alternative path to programmability that does not require expanding the main chain's Script capabilities.
-
Hasu. "A Model for Bitcoin's Security and the Declining Block Subsidy." 2019. Analyzes Bitcoin's long-term security model and the role of transaction fees. Directly relevant to the Ordinals debate, as inscription fees significantly impact mining revenue.
For Further Exploration
-
Bitcoin Script Debugger (btcdeb). A command-line tool for stepping through Bitcoin Script execution interactively. Install from https://github.com/bitcoin-core/btcdeb. An invaluable tool for the exercises in this chapter.
-
Miniscript Compiler. An online tool for compiling human-readable spending policies into Bitcoin Script and analyzing their properties. Available at: https://bitcoin.sipa.be/miniscript/
-
Lightning Network Specifications (BOLTs). The Basis of Lightning Technology specifications define the Lightning protocol in detail. BOLT #3 (Transactions) is most relevant to this chapter, as it specifies the exact Script patterns used in commitment transactions and HTLCs. Available at: https://github.com/lightning/bolts