Activated in November 2021, Taproot is the first soft fork that occured after the implementation of SegWit.
The Taproot upgrade was proposed in 2018 by Gregory Maxwell, a developer of Bitcoin Core. It was activated at block 709632, mined at 5:15 UTC on November 14th.
Improvements introduced by Taproot
The Taproot soft fork includes three improvement proposals: BIP 340 (Schnorr signatures), BIP 341 (Taproot), and BIP 342 (Tapscript):
- BIP 340 – Schnorr Signatures, a cryptographic signature scheme developed by Claus Schnorr, is a faster, more secure, and less expensive method of signing a transaction. The most significant advantage of Schnorr signatures is the ability to aggregate multiple keys within a transaction and produce a single unique signature, offering benefits not only in fee savings but also in privacy. For example, a multi-sig wallet requires multiple signatures to execute a transaction. All signatures are visible on the blockchain, so before the Taproot soft fork, all multi-sig wallets were easily identifiable. For instance, a company using a 5 of 7 multi-sig wallet for treasury management would be part of a very small set of users employing the same signature scheme, making it straightforward to identify all related transactions. Schnorr signatures provide an alternative to the Elliptic Curve Digital Signature Algorithm (ECDSA), which has been used since the creation of Bitcoin.
- BIP 341 – Taproot employs a technique called MAST (Merkleized Alternative Script Trees) to write fewer smart contract transaction data on the blockchain, allowing the hiding of Bitcoin script execution and other more complex features. This way, the smart contract execution script can remain hidden, with only the necessary parts for contract enforcement being published on the blockchain. Additionally, in cases of cooperative transaction execution between parties, the transaction would appear indistinguishable from a simple payment. Even a Lightning Network channel closure transaction will be indistinguishable from others, ensuring once again advantages in both fees and privacy.
- BIP 342 – Tapscript implements a new transaction scripting language that leverages Schnorr signatures and Taproot. With this change, new OpCodes, the instructions used in Bitcoin, are added. For instance, the OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY operators are replaced by the OP_CHECKSIGADD operator. Taproot introduces a new type of output called P2TR (Pay to Taproot) with a new type of address similar but slightly different from SegWit addresses.
Example: bc1p8denc9m4sqe9hluasrvxkkdqgkydrk5ctxre5nkk4qwdvefn0sdsc6eqxe
Taproot activation and Speedy Trial
The Taproot soft fork was activated through Speedy Trial, a method of soft fork activation in which miners and mining pools contribute to coordination by signaling their willingness to proceed with the soft fork activation using a flag within their blocks.
To be activated, Taproot had to receive support from 90% of miners within a period of 2016 blocks (approximately two weeks). Speedy Trial contrasts with other methods of soft fork activation used previously precisely because of the very short coordination period among miners, aimed at quickly determining if miners are ready for the protocol upgrade.