Hey!
While working on Taproot support for bitcoinerlab and comparing other implementations, I noticed a typing difference.
In tapscript, MINIMALIF is consensus (BIP342), so d: can be unit.
I know you removed the u property from d globally in 2022 as the safe fix. Now that MINIMALIF is consensus in Tap, would you be open to restoring unit only for Tap?
I think this could be a small change: add a minimal_if() flag on ScriptContext (default false, Tap true) and a cast_dupif_minimal_if that sets corr.unit = true, used when minimal_if().
Drafted changes here: master...landabaso:rust-miniscript:tap-dupif-unit
Happy to open a PR if this is the right direction. Don't want to churn if the current behavior is intentional and I don't know your codebase very well.
Hey!
While working on Taproot support for bitcoinerlab and comparing other implementations, I noticed a typing difference.
In tapscript,
MINIMALIFis consensus (BIP342), sod:can be unit.I know you removed the
uproperty fromdglobally in 2022 as the safe fix. Now thatMINIMALIFis consensus in Tap, would you be open to restoring unit only for Tap?I think this could be a small change: add a
minimal_if()flag onScriptContext(defaultfalse, Taptrue) and acast_dupif_minimal_ifthat setscorr.unit = true, used whenminimal_if().Drafted changes here: master...landabaso:rust-miniscript:tap-dupif-unit
Happy to open a PR if this is the right direction. Don't want to churn if the current behavior is intentional and I don't know your codebase very well.