Taproot
Taproot or Pay-2-Taproot scripts aim to expand Bitcoins smart contract capabilities and offer more privacy by letting users mask complex scripts as normal transactions. This change marks a forward-compatible soft fork of bitcoin that is expected to be implemented around November 2021. This fork brings three advancements:
- Improved Schnorr Signatures
- MAST (Merklized Abstract Syntax Trees)
- Tapscript (scripting language)
Taproot promises enhanced privacy, fewer data to process, higher throughput, reduced gas fees, and mitigate malleability.
Merklized Abstract Syntax Tree (MAST)
Merkelized Abstract Syntax Tree offers a solution for the problem with p2sh where unto successfully unlocking the script, all the ways to unlock the script were revealed. Firstly, this provides a security risk, and secondly, all these data need to be distributed. With Merkelized Abstract Syntax Tree, every condition under which the funds can be unlocked can be hashed individually. Because of the way Merkle Trees work, all these conditions are combined in a single hash, so that the merkle root looks up the coins. For Unlocking the funds, it is only necessary to know the merkle root and the merkle path to the unlocking method. The rest remains hashed and hidden. Because of that, MAST is data-efficient, can be more complex than P2SH, and offer additional privacy.
Schnorr Signatures
Together with MAST, a new signature scheme gets introduced into the bitcoin blockchain. Schnorr Signatures are considered to be the best in this field. Its mathematical properties offer a strong level of correctness, they don’t suffer from malleability like the current elliptic curve signature, and it is relatively fast to verify. One of the main benefits for Schnorr Signatures is signature aggregation, which means multiple signatures can be combined into one single signature.
Schnorr and Taproot
With Schnorr and Taproot, there is now the possibility to unlock funds in two ways, the key and the script path. The key path requires the correct schnorr signature to unlock the funds and the script path requires one correct script for unlocking the funds but not all possible ways to unlock the funds.