• 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

Bitcoin News Today: BlackRock IBIT Drives Five-Day BTC ETF Inflow Streak

Bitcoin ETF News: BlackRock Captured 81% of ETF Inflows in August Surge

August 10, 2026
TD Cowen Gives Crypto Clarity Act A 25% Chance Of Passing This Fall

TD Cowen Gives Crypto Clarity Act A 25% Chance Of Passing This Fall

August 10, 2026
Share76Tweet47

Related Posts

Bitcoin News Today: BlackRock IBIT Drives Five-Day BTC ETF Inflow Streak

Bitcoin ETF News: BlackRock Captured 81% of ETF Inflows in August Surge

by Moussa
August 10, 2026
0

In Bitcoin ETF news today, US-listed spot BTC ETFs pulled in $853.54M in net inflows during the week ended August...

TD Cowen Gives Crypto Clarity Act A 25% Chance Of Passing This Fall

TD Cowen Gives Crypto Clarity Act A 25% Chance Of Passing This Fall

by Moussa
August 10, 2026
0

Investment bank TD Securities has said that the long-awaited crypto Clarity Act has a slim chance of getting passed in...

Bitmine’s 5.8M Ether Bet Swells as BMNR Stock Takes a Beating – Bitcoin News

Bitmine’s 5.8M Ether Bet Swells as BMNR Stock Takes a Beating – Bitcoin News

by Moussa
August 10, 2026
0

Key TakeawaysBitmine now holds 5,805,238 ETH, or 4.8% of ethereum’s 120.7 million token supply.BMNR shares are down 56.80% over the...

Bitcoin News Today: BlackRock IBIT Drives Five-Day BTC ETF Inflow Streak

Bitcoin News Today: BlackRock IBIT Drives Five-Day BTC ETF Inflow Streak

by Moussa
August 10, 2026
0

In Bitcoin news today, US-listed spot Bitcoin ETFs recorded approximately $853.5M in net inflows across five consecutive trading sessions from...

MARA Sells 23,093 Bitcoin for $1.6 Billion as Treasury Strategy Shifts

MARA Sells 23,093 Bitcoin for $1.6 Billion as Treasury Strategy Shifts

by Moussa
August 10, 2026
0

Key TakeawaysMARA sold 23,093 BTC for $1.6 billion in H1 2026, shifting from accumulation to active treasury use.MARA’s revenue fell...

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

© 2024 APPROX FOUNDATION - The Crypto Currency News