Bitcoin Asked by Bertram Lund on October 24, 2021
What are "leaf versions", when do you upgrade a version, how many versions are there and how do they differ from segwit versions?
To add to Michael Folkson's answer, a question one may have is what the differences are between witness versions and leaf versions. Why do we need both?
In general, witness versions seem more appropriate for changes to the "structure" of spending conditions (taproot, graftroot, cross-input aggregation, ...), while leaf versions are more for changes to the execution rules of individual scripts.
See What are the different upgradeability features in the BIP-Taproot (BIP 341) proposal? for information on more extensibility features in taproot.
Answered by Pieter Wuille on October 24, 2021
SegWit introduced versioned witness programs. When satisfying a script to spend coins you need to provide a redeem script consisting of a version byte and a witness program. The version introduced with SegWit was version 0 (zero).
The Taproot proposal uses this SegWit versioning system by introducing spending rules for version 1. The witness program to satisfy a Taproot spend will be version 1.
The Taproot proposal also introduces a new versioning system in addition to SegWit versions called leaf versions. Each leaf of a Taproot tree will have its own leaf version. This is a version for spending rules from that particular leaf. The leaf version introduced with the Taproot proposal is version 0.
So in answer to your question there is just one leaf version with the Taproot proposal and a new SegWit version (to make two SegWit versions in total). The versions are there for future upgrades and as a user you do not need to upgrade anything like you might say upgrade the "version" of your Bitcoin Core software.
Remember that Taproot is still a proposal at this stage (July 2020) and so at the current time SegWit version 1 and leaf versions are not relevant to any transactions you might make on the Bitcoin network.
[darosior edit: There are 41 possible leaf versions (including version zero) for future upgrades as outlined in BIP-Taproot]
Answered by Michael Folkson on October 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP