• 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

Why a Famous Burger Chain Now Calls Itself a ‘Bitcoin Company’

Why a Famous Burger Chain Now Calls Itself a ‘Bitcoin Company’

August 31, 2026
US Strikes Iran, Brent Cracks $90 as Hormuz Risk Explodes Again

US Strikes Iran, Brent Cracks $90 as Hormuz Risk Explodes Again

August 31, 2026
Share76Tweet47

Related Posts

Why a Famous Burger Chain Now Calls Itself a ‘Bitcoin Company’

Why a Famous Burger Chain Now Calls Itself a ‘Bitcoin Company’

by Moussa
August 31, 2026
0

Key TakeawaysSteak ‘n Shake credits bitcoin users with stronger restaurant sales.Its parent reported 13.8% same-store sales growth in the second...

US Strikes Iran, Brent Cracks $90 as Hormuz Risk Explodes Again

US Strikes Iran, Brent Cracks $90 as Hormuz Risk Explodes Again

by Moussa
August 31, 2026
0

Key TakeawaysCENTCOM struck Iranian launchers Aug. 30 after detecting preparations to mine Hormuz.Brent crude briefly tapped $90 as renewed U.S.-Iran...

How can I get Electrum running under Debian with a restrictive firewall?

by Moussa
August 30, 2026
0

So I'm running Debian 9.1 with KDE and am using iptables to disallow all outgoing and incoming traffic by default...

Solana Breaks 10-Month Curse as Institutional Money Storms In – Bitcoin News

Solana Breaks 10-Month Curse as Institutional Money Storms In – Bitcoin News

by Moussa
August 30, 2026
0

Key TakeawaysSolana (SOL) climbed roughly 46% in August, snapping a brutal ten-month monthly losing streak.Charles Schwab plans SOL access across...

How can government "seize" bitcoins?

by Moussa
August 30, 2026
0

Last year the U.S. Department of Justice posted this press release claiming U.S. "law enforcement seized several thousand Bitcoins on...

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]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdHlwZSUzRCUyMnRleHQlMjIlMjBuYW1lJTNEJTIybm4l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us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News