Taproot is a Bitcoin protocol upgrade that took place in November 2021, which aimed to improve transaction privacy, security, and scalability.
Background to Taproot
The Bitcoin protocol has gone through many changes over the years, mostly to address security vulnerabilities or fix other problems. However, significant protocol changes are rare because Bitcoin’s decentralized network requires buy-in of a majority of network participants. Failing to garner the necessary support can split blockchain communities has previously resulted in a hard fork of the blockchain.
This is what happened in 2017 when the introduction of Segregated Witness (SegWit) – an upgrade designed to reduce the weight of data in transactions – became contentious among the Bitcoin community. Although SegWit gained substantial support, there was also significant opposition which led to a hard fork of the Bitcoin blockchain and the creation of Bitcoin Cash.
In an attempt to avoid similar controversy, Bitcoin core developers took a deliberately prolonged and cautious approach to the implementation of Taproot. It was first proposed in January 2018 by Bitcoin developer Gregory Maxwell and later developed into a Bitcoin Improvement Proposal draft by Pieter Wuille in May 2019. In June 2021, 90% of Bitcoin miners signaled support for the Taproot upgrade, and the soft fork to the Bitcoin blockchain finally took place on November 14, 2021, at block 709,632.
Taproot upgrades
Taproot is an aggregation of three Bitcoin Improvement Proposals implemented simultaneously due to their technical interdependencies.
BIP340 – Schnorr signatures
Before Taproot, Bitcoin used the Elliptic Curve Digital Signature Algorithm (ECDSA) to create transaction signatures. This algorithm uses the account holder’s private key to generate a signature, which allows the network to confirm that the transaction is valid.
However, a drawback of ECDSA is that each transaction’s signature must be validated individually, making it impossible to scale this process by batching signatures together. ECDSA also makes it easy to identify which transactions are multi-signature, which are typically used for higher-value sums originating from enterprise wallets.
The Schnorr signatures upgrade allows multiple transaction signatures to be validated in a single batch. It also allows multiple parties who are signatories to a transaction to generate one signature representing their collective approval. The ability to aggregate signatures makes each transaction less data-heavy, thus increasing network transaction capacity and making it faster and cheaper to process bulk transactions.
Schnorr signatures are also more private for multi-signature wallets, as they make it more difficult to spot multi-sig transactions when they are batched with other transactions.
BIP341 – Taproot
BIP341 – Taproot is a privacy upgrade that implements Merkelized Abstract Syntax Trees (MASTs), effectively limiting the amount of transaction data committed to the blockchain.
A Merkle tree is a data structure that can be imagined as a tree with branches that represent all the possible outcomes of a transaction, including the one that actually occurred. The MAST only stores the branch with the outcome that was executed rather than the full tree with all possible outcomes.
MAST implementation also helps scalability, as they require less data to be stored on the blockchain.
BIP342 – Tapscript
BIP342 – Tapscript is an update to Bitcoin’s Script coding language to help support the Schnorr signatures and Taproot implementations. Tapscript leverages the ability of Schnorr signatures to aggregate signatures and uses it to free up space in the witness segment of a transaction.
While mostly an enabler for the other two BIPs at the point of Taproot’s implementation, Tapscript also makes coding new features on Bitcoin easier, so it is a critical enabler of future functionality.
Why is Taproot an important upgrade?
The Bitcoin blockchain has operated successfully without interruption since genesis, and as a result, many are reluctant to tamper with the source code. However, as Bitcoin usage increases, the network needs to be able to support a growing user base, which requires ongoing improvements to its scalability and usability. Taproot addresses these considerations and provides technical building blocks for future improvements.
Taproot is a soft fork of the Bitcoin blockchain, meaning that nodes are not forced to upgrade. In the year following the Taproot implementation in November 2021, adoption of the protocol remained low.
Bitcoin Ordinals
In January 2023, the Ordinals protocol launched on the Bitcoin mainnet and put to use some of the capabilities introduced by Taproot and SegWit. Ordinals are digital assets, like images or audio files, inscribed onto a satoshi (the lowest denomination of a single BTC). This feature gives the satoshi the characteristics of non-fungible tokens (NFTs) and has proven extremely popular among users, although for some developers it was an unexpected use case for Taproot. In the weeks following the implementation of Ordinals, the adoption of Taproot increased exponentially.
When an Ordinal is inscribed onto a satoshi, it is done using the “witness” segment of the transaction that was separated out following the SegWit implementation in 2017.
However, the space in the witness field was limited until the implementation of Taproot – and, more specifically, Tapscript – in 2021. Tapscript theoretically enabled the inscription of Ordinals worth up to 4MB, which is the entire weight of a Bitcoin block.
Taproot essentials
Taproot is a Bitcoin protocol upgrade that took place in November 2021, the second major upgrade since genesis after SegWit in 2017.
Taproot aggregated three Bitcoin Improvement Proposals to implement improvements to privacy, scalability, and efficiency.
Taproot paves the way for new Bitcoin features and functionality and enabled the launch of Ordinals (Bitcoin NFTs) in January 2023.