What is Taproot Anyway?
|— Taproot is an upgrade to the Bitcoin blockchain designed to drastically improve key elements of its functionality.|
— The upgrade will increase transaction privacy and speed, and will also equip the Bitcoin blockchain to handle smart contracts, something that could create ripples within the industry as a whole.
— The upgrade – also known as a soft fork – is the result of a consensus within the Bitcoin node community.
If you’re thinking to yourself “What is taproot and why do I keep hearing about it”, then you’re in the right place.
The Bitcoin network has undergone one of the biggest upgrades in its history – a significant move for the future of the network, which was met with broad consensus from its community.
While other blockchain networks like Ethereum and Polkadot update frequently to experiment with the latest innovations in cryptography and blockchain research, changes to the Bitcoin protocol require a notoriously long and difficult process to get consensus. The last upgrade to Bitcoin was SegWit four years ago, which brings the significance of Taproot into focus.
Why the update?
Until now, Bitcoin’s principal utility was as a peer-to-peer, non-censorable payments system, and a store of value. Relatively speaking, this is actually quite limited; the more recent generation of blockchains come equipped to handle smart contracts, something that’s becoming increasingly important due to the explosion of dApps and DeFi. With this now something of an industry standard, Bitcoin needed an upgrade in order to keep up. with an evolving marketplace that constantly demands more.
The Bitcoin network also faced some pretty significant scalability problems – put simply, it couldn’t handle large volumes of transactions due to how the network operated. Let’s unpack that a bit.
When users send or receive payments on the network, each portion of a Bitcoin comes with its own script. These scripts become public data on the Bitcoin network, bogging it down immensely while also showing the world sensitive information about your funds. Consider that this process stands true for every single user on the bitcoin network – it’s easy to see how scaling posed an issue.
OK so what exactly is Taproot?
The Taproot update means a higher level of privacy, security, and scalability for the network, as well as opening the door to new possibilities for future developments.
It drastically reduces the storage of transaction data on Bitcoin’s network; this allows it to accommodate more complex smart contracts, and also makes scaling more achievable. Moreover, it increases the privacy of transactions by showing them in a standard format on the public blockchain. Lightning Network users, and multi signature wallets are examples of contracts that will immediately benefit from better privacy and cheaper transactions.
Key components of Taproot
Despite its name, Taproot is not as simple as one uniform solution to all of Bitcoin’s challenges. Rather, the Taproot upgrade is made up of several components which will all work in unison to leverage the bitcoin network to new heights, which is a huge deal for the entire blockchain community.
Let’s examine each of the critical Taproot components to get the full picture.
1. Schnorr Signatures
To begin, Schnorr Signatures are a new form of blockchain transaction signatures that usher in advanced security, lower fees, and flexible multi-sigs. When a block gets a transaction, the transaction is always accompanied by a signature. Signatures ensure that transactions can’t be altered in any way.
A unique property of Schnorr signatures allows multiple parties to cooperatively produce a single signature that is as good as a signature by each of the involved parties. Therefore, instead of 3 signatures saying “Alice signed this, Bob signed this, Charlie signed this”, a Schnorr signature might say “Alice, Bob and Charlie signed this”. This property is called signature aggregation, and provides a better, more private and efficient way of allowing cooperative custody of coins (multi-signature wallets).
Schnorr Signatures also have a unique function that speeds up the entire bitcoin network, adding scalability to its list of advantages. While ECDSA signatures have to be verified one-by-one, Schnorr signatures allow a more efficient process where many signatures are validated at once, requiring substantially less computation than would be needed to validate each one of them individually.
One fun fact: Schnorr signatures could (and maybe should) have been used in the Bitcoin protocol since the beginning. But when the network was built Schnorr signatures were still patented, therefore the current signature scheme (ECDSA) was used instead.
2. MAST (Merklized Alternative Script Tree)
The Taproot update integrates another improvement to scripts, that was already proposed since 2013 but never made it into the Bitcoin protocol: Merklized Alternative Script Trees or MASTs.
As mentioned above, every spendable amount of bitcoin comes with a script that specifies what conditions need to be satisfied to be allowed to spend those coins. In the most simple case, the condition looks like: “Alice owns these coins”, which is the kind of statements that cryptographic signatures can prove. But more complex conditions are possible, for example: “Two of Alice, Bob and Charlie must sign” (2-of-3 multisignature), or “Bob signs, but 2 weeks must pass first” (timelock), or “a certain secret data with hash H must be revealed” (hashlocks).
More complex contracts can be composed by combining several such simple conditions; for example, the lightning network itself uses contracts that combine 2-of-2 multi-signatures, timelocks and hashlocks!
The problem with using contracts with a large number of alternative spending conditions is that the size of the script keeps growing once more such conditions are added! In fact, even if only one of those conditions is used, the entirety of the script must be revealed. Such a waste!
But here come MASTs! By using a well known cryptographic construction called Merkle trees, it is possible to encode all of the possible spending conditions in a single short summary (a hash, typically 32 bytes long), in such a way that it is possible to reveal just one of those spending conditions.
This brings enormous savings in terms of the amount of space used by those complex contracts, which could now have tens or hundreds of spending conditions, with little additional cost! Moreover, only the parties involved in the contract will know about all the possible spending conditions: an external observer only knows about the single spending condition that was indeed used, which is a big win for privacy at the same time.
2. Pay-2-Taproot (P2TR)
Finally, the Taproot upgrade brings in a new type of transaction scripts, called Pay-2-Taproot. This allows to combine Schnorr signature and MAST in a single transaction. Previous transaction types made it easy for an external observer to distinguish if some bitcoins were locked using a single key, or via a more complex script.
By exploiting the properties of Schnorr signatures, P2TR addresses allow to combine signatures and scripts together, by hiding the MAST of scripts inside a public key. Therefore, the same coins could be spent either with a plain signature corresponding to that public key (key path spend), or with one of the scripts in the MAST (if any).
Nobody will ever know that the scripts were there, if they’re not used when spending the coins!
An exciting new chapter
This is an exciting time for Bitcoin and its Taproot upgrade is significant for the community and for the crypto industry as a whole. While this update won’t allow NFTs or other types of tokens to thrive in the Bitcoin ecosystem (it wasn’t its goal in the first place), it will allow better usage of core Bitcoin value propositions: storing value and spending it.
Some early discussions on extending Bitcoin’s script capabilities are taking place and could in-turn bring more standard DeFi use cases to Bitcoin holders.
This will add to its overall appeal for thousands of developers whose mission is to pave the way towards continued innovation, top-notch security, and faster processing times.
Knowledge is power.
Fancy yourself as a blockchain pro? Trust yourself and keep learning with our clear – and highly entertaining – School of Block episode.