Taproot: What’s next for Bitcoin?
November 18, 2021
Taproot is an update to Bitcoin’s protocol. We find out what has changed in the world’s longest-running blockchain.
On 14 November 2021, the Taproot upgrade to the Bitcoin blockchain took place.
It all stems from the publication of 3 proposals, which on Bitcoin are called Bitcoin Improvement Proposal (BIP), by some Bitcoin developers in early 2021.
Encountering no opposition, the proposal moved forward in its implementation process.
So in May, miners and mining pools gradually started to “signal” their adherence to the upgrade with a transaction on the blockchain. This is what it looked like:
On 14 November, the blocks in the image were almost all green, which meant that these reports had reached 90%, enabling the new version of the protocol to be activated.
This is the second update in Bitcoin’s history, following the one in August 2017, when the Lighting Network and Segregated Witness (SegWit) were implemented.
SegWit, in particular, had given a little help to scalability, increasing the maximum block size from 1 MB to 4 MB.
This change was also implemented via a soft fork of the blockchain.
Unlike a hard fork, this is an update of the blockchain that does not require a fundamental change in its structure.
The application of a soft fork also does not require unanimity, but a majority of positive votes, in order to avoid splitting the community.
For the same reason, the new protocol is compatible with the old one, so even nodes that have remained with the old version can validate the new blocks, but without violating the new rules. Usually, however, upgrading is beneficial for nodes.
The soft fork allowed the implementation of 3 main functions, one for each BIP:
Merkelized Abstract Syntax Tree (MAST), Schnorr’s signatures and Tapscript.
To understand their effect, let’s start with the basic operation of Bitcoin transactions.
How Bitcoin transactions work
In Bitcoin transactions, it is possible to specify how and when BTC can be spent. These conditions are written in code and recorded on the blockchain.
Some often used conditions are:
- The request for a signature, i.e. entering the private key to prove the ownership of the coins
- Timelock, which enables the use of coins only after a certain date or block height
- Multisig, which requires the signature of a certain number of private keys
These specifications can be combined to create more complex smart contracts.
When the coins are spent, the entire script is published on the blockchain containing the possible conditions, and of course also those that caused the transaction to actually take place.
While this information may be interesting for some developers, there are several downsides:
- They have no real utility
- They hamper network performance, as this data, all added up, weighs on the blockchain’s memory and the fees to be paid.
- These costs discourage the development of complex smart contracts
- Can compromise privacy if the script specifies the types of wallets involved and any wallet addresses or balances.
The effects of Taproot on Bitcoin
Let’s see how the 3 BIPs solve these privacy and scalability issues.
MAST: optimising data
MAST (Merkelized Abstract Syntax Tree) ensures that only the execution conditions of complex transactions are recorded, i.e. those that are actually relevant to the blockchain viewer.
Let’s make an example
These could be 2 initial conditions
Alice can receive 0.05 BTC “only after the 800,000th block is mined” or “only if both Alice and Bob sign”.
The condition which actually verifies and triggers the transaction is:
“Alice waits for the 800,000th block”.
Alice now has 0.05 BTC and in the transaction recording this new balance it will only say that the 800,000 block has been mined, thanks to MAST.
Schnorr: stealthy signatures
Schnorr signatures, on the other hand, simplify the way multisig transactions (mentioned above) appear. In practice, on the blockchain explorer, we will see a transaction from an address A to an address B, as if it were a simple send between two users.
Not only that, this function could potentially “disguise” the keys of a wallet, making the public key unrecognisable, but still effective in its receiving function.
This solution thus contributes to increasing the level of privacy of the decentralised registry.
It should be noted, however, that Bitcoin has not become anonymous. Taproot prioritises scalability, not the anonymity of transactions.
It seems that many have interpreted Taproot’s improvements as a solution to CoinJoin’s shortcomings, when in fact it has no impact at all. CoinJoin is a Bitcoin feature that allows for address mixing in order to make transactions private, but in some cases, the use of CJ is recognisable, which some would like to hide.
Tapscript: a new language
Bitcoin’s programming language is Script, which with Taproot gets updated and is of course called Tapscript.
Tapscript has the dual purpose of facilitating new features and thus upcoming protocol updates, and enabling the implementation of MAST and Schnorr signatures.
In practice, Tapscript is the first step towards a DeFi on Bitcoin.
The scalability of the Bitcoin ecosystem
DeFi is built on Layer 2, i.e. second-level blockchains, which use the basic protocol of Ethereum or Bitcoin to build new, more scalable networks for more complex dapps.
One of these is the Lightning Network, which allows instant execution of BTC transactions outside the blockchain.
Bitcoin’s problems, such as slowness and low flexibility, have fostered the development of a 2 trillion market: every cloud has a silver lining.
With its giant-like slow steps, it is only in 2021 that the most important cryptocurrency of all finds the impetus to take a second step into the future, towards DeFi, combining Taproot with the growing adoption of the Lighting Network.