Why would forbidding `OP_IF` in Tapscript be a problem?
Why would forbidding `OP_IF` in Tapscript be a problem?
Loading saved threads...
Murch · External communityPost link
External answer — Bitcoin Stack Exchange
Author: Murch
Original post: https://bitcoin.stackexchange.com/a/130816
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
if
, used to create conditional execution paths, is one of the most basic building blocks of any programming language.
OP_IF
has always been available in Script and Tapscript, and it has been shown that Miniscript may produce leafscripts that use
OP_IF
.
In Bitcoin,
OP_IF
could for example be used to build inheritance support into a day-to-day wallet. E.g., the owner of the coins uses the P2TR key path, while his heirs have access to a time-locked decaying multisig leaf script. Since script paths are hashed into the output script, it is impossible to rule out that such UTXOs exist. Given that such patterns have been seen on testnet and mainnet, it is possible that someone set themselves up with such a wallet pattern and has since been regularly stacking into such a wallet. If such a user were unaware that their wallet would be affected by the proposed new rules, they could continue receiving payments to this setup after activation and never notice that their inheritance setup was no longer working.
Even if:
there was support for forbidding
OP_IF
all wallets making use of Miniscript were updated to avoid use of
OP_IF
all affected users would have updated to the new versions of their software
and
adopted a new output pattern that doesn’t use
OP_IF
any sender using a previously shared address or receiver continuing to use an affected wallet pattern would cause funds to be locked up unwittingly.
But more realistically, some users would likely not realize that they needed to update, use wallet software that wasn’t updated yet, or even run unmaintained software. The expectation that
everyone would just upgrade on time
is outlandish, assuming output patterns based on
OP_IF
are in use, someone would unwittingly receive funds they then wouldn’t be able to spend.
Even with grandfathering in existing UTXOs, forbidding
OP_IF
would break userspace.
Quote
Report
Murch · External communityPost link
External question — Bitcoin Stack Exchange
Author: Murch
Original post: https://bitcoin.stackexchange.com/questions/130815
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Following up from
Is it a bug that OP_IF is part of the Tapscript opcodes?
:
BIP110 proposes to forbid
OP_IF
and
OP_NOTIF
in leaf scripts. However, old UTXOs are grandfathered in, so the new rules would only apply to UTXOs created after its activation. How could this still create issues for users?
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Bitcoin Stack Exchange Author: Murch Source score (net votes, not local likes): 5 Original post: https://bitcoin.stackexchange.com/questions/130815 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Following up from Is it a bug that OP_IF is part of the Tapscript opcodes? : BIP110 proposes to forbid OP_IF and OP_NOTIF in leaf scripts. However, old UTXOs are grandfathered in, so the new rules would only apply to UTXOs created after its activation. How could this still create issues for users?
Checking account access…