• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

transaction weight – Is it a bug that `OP_IF` is part of the Tapscript opcodes?

Moussa by Moussa
June 10, 2026
in Bitcoin
0
How do Bitcoin mining pools typically handle payout frequency versus thresholds?
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


It is always possible to express spending conditions in their disjunctive normal form, that is as a top-level “OR” of each individual spending paths. Taproot allows for each spending path to be in its own leaf. It is correct to claim that doing so would be maximally private as it would reveal the strict minimum of information about the spending conditions that were available for this output.

But there are multiple dimensions to optimize for when compiling a spending policy to a Script. Besides privacy, there is efficiency. It is not correct to claim that it’s always more efficient to use one Taproot leaf per spending path, or to switch to P2WSH, than to use an OP_IF in a Taproot leaf. For instance, take a simple policy like “2 keys can always spend together, 2 other keys can always spend after either a week or past block 1’000’000”. A Taproot with two leaves would be more efficient in this case than one with three, or than using P2WSH. Of course the more spending paths you have, the bigger the gains compared to using P2WSH.

Furthermore this analysis ignores a third optimization dimension: the probability of each spending path. Smart contracts often have some paths that are used frequently and others that are rarely used. Taproot lets users place likely paths higher in the Merkle tree, making common spends cheaper while pushing extra cost onto uncommon ones. So comparing scripts in isolation is misleading: what matters is the expected usage pattern. A policy that looks more efficient under P2WSH assuming equal use of every path may still be more efficient in Taproot in practice. For some use cases, switching to Taproot could save kilobytes of onchain data a month!

In fact one spending path may be so likely as to be represented by the Taproot internal key. This would make spending more space efficient than any other (secure) output type available, while potentially still necessitating an OP_IF in one spending path deep down the Merkle tree. This feature of Taproot highlights yet another reason why P2WSH is not a replacement for Taproot. Users may rely in their Script on features which are exclusively available in Taproot, such as protocols leveraging Schnorr signatures.

Finally, Taproot usage comes with a preferable set of externalities for the network than P2WSH. For this usage, P2WSH imposes more burden on validating nodes than Taproot because its signature hashing is quadratic in the size of the witness script. In this regard, Taproot enables optimizations that relieve burden on validating nodes (batch validation). Besides costs to validating nodes, Taproot also incentivizes to grow all outputs’ anonymity set by providing a way to optimize the space efficiency of some spending paths.

To conclude, whether an OP_IF in a Taproot leaf is preferable to alternatives depends on a number of factors. These factors are best assessed by the user, who is better positioned to understand their own circumstances and constraints. It would be dubious and presumptuous for anyone to claim to know them better on everyone else’s behalf. This is especially reckless in the context of a proposal to invalidate them, given that Bitcoin development has historically gone to great lengths to avoid proposing consensus changes that could confiscate some users’ funds that way.



Source link

Related articles

MetaMask Has New AI Agent Wallet Which Lets Bots Trade Your Crypto

MetaMask Has New AI Agent Wallet Which Lets Bots Trade Your Crypto

June 10, 2026
Bitcoin Close To Setting A New Record Despite Price Crash, But Can This Save BTC?

Bitcoin Close To Setting A New Record Despite Price Crash, But Can This Save BTC?

June 10, 2026
Share76Tweet47

Related Posts

MetaMask Has New AI Agent Wallet Which Lets Bots Trade Your Crypto

MetaMask Has New AI Agent Wallet Which Lets Bots Trade Your Crypto

by Moussa
June 10, 2026
0

MetaMask launched Agent Wallet on June 8, 2026, a self-custodial wallet purpose-built for AI agents to autonomously execute trades and...

Bitcoin Close To Setting A New Record Despite Price Crash, But Can This Save BTC?

Bitcoin Close To Setting A New Record Despite Price Crash, But Can This Save BTC?

by Moussa
June 10, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Market experts note that Bitcoin (BTC) is...

XRP Sees Intense Capitulation As Profit-To-Loss Ratio Plunges

XRP Sees Intense Capitulation As Profit-To-Loss Ratio Plunges

by Moussa
June 9, 2026
0

As the XRP price attempts to rebound from its recent lows, Glassnode has shared key on-chain metrics pointing to weakening...

Traditional Finance Is Rushing Into Crypto As Institutions Buy Bitcoin’s Dip: Axios

Traditional Finance Is Rushing Into Crypto As Institutions Buy Bitcoin’s Dip: Axios

by Moussa
June 9, 2026
0

Traditional financial institutions are shedding their skepticism toward crypto, and the shift is accelerating in 2026. Banks, brokerages, and exchanges...

Bitcoin Reverses 24-Hour Rally as Glassnode Flags 8M BTC at a Loss

Bitcoin Reverses 24-Hour Rally as Glassnode Flags 8M BTC at a Loss

by Moussa
June 9, 2026
0

Key TakeawaysBitcoin fell below $61,000 on Tuesday as escalating Middle East tensions sparked a 2.9% daily price drop.The crypto market...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbm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mRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News