Bitcoin's evolution through Segregated Witness (Segwit) and Taproot has been a pivotal journey, addressing inherent limitations and paving the way for a more scalable and efficient network. These changes have been instrumental in enhancing Bitcoin's functionality and accessibility for a broader user base.
Segwit, introduced by Pieter Wuile, Eric Lombrozo, and Johnson Lau, revolutionized Bitcoin transactions by segregating witness data into a new transaction field. This innovation addressed the issue of transaction malleability, a critical problem for pre-signed transactions, particularly in the context of scaling solutions like the Lightning Network, Ark, Spark, BitVM, and Discreet Log Contracts (DLCs). By moving ScriptSig data to the witness field, Segwit enabled the validation of transactions by newer nodes while allowing old nodes to mark everything behind the 'blinding curtain' as valid.
The introduction of witness commitment and witness transaction ID (WTXID) further solidified Segwit's impact. This mechanism, conceived by Luke Dashjr, allowed for the inclusion of new data fields in consensus rules, ensuring that Bitcoin could adapt and evolve without requiring a hardfork. Segwit's flexibility in upgrade paths, particularly its support for Schnorr signatures, has been a game-changer, enhancing security and enabling more efficient and flexible cryptographic schemes.
Taproot, a brainchild of various contributors, including Jonas Nick, Tim Ruffing, and Anthony Towns, built upon the foundations laid by Segwit. It introduced Merkelized Abstract Syntax Trees (MAST), an extension of Pay-to-script-hash (P2SH), to optimize script verification and reduce transaction costs. Taproot's integration of Schnorr signatures and tapscript further improved transaction efficiency and security.
One of the key innovations of Taproot was the introduction of tapscript, a new scripting system that deactivated OPCHECKMULTISIG and OPCHECKMULTISIGVERIFY, replacing them with OP_CHECKSIGADD for more efficient signature verification. This change, combined with Schnorr key aggregation, preserved the multisignature functionality of legacy scripts.
The witness size limit increase in Taproot, from 10,000 bytes in Segwit to an unlimited size, was a strategic decision to mitigate the complexity introduced by witness limits in Miniscript. This change was crucial for the network's scalability and user experience.
In conclusion, Segregated Witness and Taproot have been transformative upgrades to the Bitcoin protocol, addressing scalability, security, and efficiency concerns. These changes have not only improved Bitcoin's functionality but have also laid the groundwork for future innovations, ensuring that Bitcoin can continue to evolve and serve a growing number of users in a self-custodial manner.