Taproot- the biggest Bitcoin Upgrade since 2017
While it might seem as if Bitcoin was a finished product to the outsider, that’s very far from the truth. Compared to other cryptocurrencies, it’s slower to implement changes, but that’s a deliberate choice.
Invisible to bystanders, the protocol undergoes constant development. However, significant changes require the consensus of a vast majority of network participants. Without an agreement, no change can be permanent. That’s the beauty of a decentralized network where every network participant has a voice. For the most part, this has worked positively for the Bitcoin community and guaranteed stability.
The last Bitcoin Upgrade took place in 2017 and was more controversial. The addition of Segregated Witness (short SegWit) led to a split in the community, created Bitcoin Cash, and fueled the Hash wars in 2018.
Four years later, the community is ready to go through the next Upgrade: Taproot. The vote has been nearly unanimously positive this time, with more than 90% of miners signalling support for the change. Sorry to people that hoped for drama.
But what is Taproot, and which changes will it bring with it?
What is Taproot?
Taproot is an upgrade that will bring fundamental change to the way transactions are processed on the Bitcoin blockchain. It was first proposed in 2018 by Bitcoin Core developer Gregory Maxwell to add smart contract abilities to Bitcoin.
One confusing part about the naming is that Taproot refers to the implementation of 3 Bitcoin Improvement Proposals (BIP) and the specific Taproot BIP.
As a significant update to the protocol, Taproot will be introduced through a soft-fork, during which all participating nodes will update, but even nodes that haven’t made the changes yet can still interact with the chain.
So what exactly is part of Taproot?
BIP 341: Taproot
As a specific improvement proposal, Taproot will define how Bitcoin will integrate a new signature type called Schnorr signatures. Currently, the Bitcoin blockchain relies on the EllipticCurve Digital Signature Algorithm to create digital signatures that ultimately define ownership and identity.
Taproot will introduce the necessary changes to the Bitcoin Script that will enable a shift to Schnorr signatures.
Additionally, Taproot also introduces a new script type: Pay to Taproot (P2TR).
Pay to Taproot (P2TR)
While it could be a charity saving the rainforest, pay to taproot is a new script type that changes the way users can spend their Bitcoin. Users can now pay to either a Schnorr signature or to a Merkle root consisting of a variety of other scripts. Sounds complicated? Yes, the back-end tech is. But what this basically means is that users can create a UTXO (unspent output or money for grabs) that can be unlocked either by the owner of the private key, or anyone who satisfies a set of requirements of a script within the Merkle tree attached to it.
To put a real-life example illustrating the process, maybe you have a child that is about to graduate, and to further incentivize them (let’s not talk about the morals of giving them monetary incentives here), you decided to gift them 1 BTC, but only if they get a certain grade. Now if the child manages to get the grade, amazing. 1 BTC is theirs and they can tell everyone else to have fun staying poor.
But if not, you will go ahead and retrieve your BTC. Of course, this isn’t a real technical example. It’s merely to highlight that this sort of transaction allows for either the owner of the key or someone fulfilling certain requirements to access the funds.
Either way, you should love your kids regardless of their grades, and teach them about BTC 😉
BIP 340: Schnorr signatures
Whenever you use Bitcoin, you use your public and private key to signal to the network that you are actually the person holding these funds and haven’t spent them before (Double-spending). Digital signatures that identify wallets and confirm that you’re indeed the wallet holder play a big part in the everyday functioning of any blockchain.
When Satoshi Nakamoto wrote the Bitcoin Whitepaper, Schnorr signatures were already well-known and tested. But, as they only recently fell out of copyright, the Bitcoin creator decided to implement ECDSA instead. ECDSA is an open-source algorithm that was readily available and already supported various platforms.
Schnorr signatures use simpler algorithms that are either derivative or linear in nature, which allows the use of signature-based algebra. Therefore, Schnorr signatures will bring more complex cryptographic security to the OG cryptocurrency.
A more obvious benefit for advanced Bitcoin users is that Schnorr signatures will allow various transactions to appear as a single key. Previously, observers could see every transaction branch of complex transactions, even those that weren’t executed.
With Schnorr signatures, every transaction will look the same to the observer, regardless of whether it’s a p2p transaction or a smart contract.
Another benefit of Schnorr signatures is that they will take up less computing space. Public keys with schnorr are 32 bytes long, where ECDSA public keys are 33 bytes. Sure, it doesn’t seem like a lot at first glance, but space is very previous in the blockchain, even more so when thousands of people have public keys. There are nearly 1 million active Bitcoin addresses, so saving even just 1-byte per is quite a lot.
Another space-saving Schnorr brings is that instead of 71–72-byte long signatures, after Taproot, signatures will only be 65 bytes long.
BIP 342: Tapscript
The third component in the upgrade is Tapscript which improves the Bitcoin scripting language and will allow for the implementation of the features mentioned above.
It also adds new opcodes that focus on Schnorr signatures, because without those the Bitcoin script wouldn’t be able to seamlessly integrate them.
With a look to the future, the Bitcoin developer crew also decided to add new opcodes for future upgrades to Tapscript, which don’t serve a specific purpose yet but will provide a framework for future upgrades.
What the impact of all those changes is you wonder?
Benefits for Bitcoin
Obviously, an Upgrade wouldn’t get 90% of the votes if it didn’t offer a set of benefits to its participants.
- Aggregate keys: users will be able to sign once when using diverse wallets instead of multiple times. The upgrade also powers multi-sig. All aggregate keys will have the same size regardless of how many participants they host.
- Removal of Signature Malleability Bug: a well-known bug in the Bitcoin network was that malicious actors could modify transactions before confirmation to invalidate them. While this is rarely ever successful, it could also be used to simply spam and contest the blockchain. With Taproot this bug is entirely removed.
- Privacy: Taproot introduces more privacy to Bitcoin, as it will allow users to create multiple spending rules without revealing them except for the actual spend. The general anonymity set of Bitcoin will grow to make it harder for chain-analysis companies to crack through. This enhanced privacy will also extend to second-layer solutions such as the Lightning network.
- Efficiency: Taproot will reduce the transaction size, freeing up more space in blocks which means that more transactions can be included, therefore make the network more efficient. It also speeds up complex transactions and is expected to lower transaction costs overall.
- Potential of DeFi: Taproot will also make smart contracts on Bitcoin more feasible, as they won’t require as much computational storage space anymore, and on the privacy side, even complex smart contract interactions will look just like two public keys interacting.
Overall, Taproot is a highly-anticipated Upgrade to Bitcoin, that will enhance privacy, efficiency, and lower costs of use of the network. Opening the door to more complex smart contracts might spur innovation to happen on the bitcoin blockchain. Another consequential benefit of increased security and efficiency expanding to the second-layer solution could be that the more people use the lightning network, the less the mainchain will be congested, bringing fees down even further.
Taproot is scheduled to go live in November 2021.