bitcoinfuzz icon indicating copy to clipboard operation
bitcoinfuzz copied to clipboard

miniscript_string: crash with `or_d(dv:0,0)`

Open brunoerg opened this issue 1 year ago • 2 comments

or_d(dv:0,0) is sane for Bitcoin Core (IsSane() returns true) but fails for rust-miniscript due to "fragment «or_d(dv:0,0)» requires its left child be a unit (outputs exactly 1 given a satisfying input)".

brunoerg avatar Jun 17 '24 18:06 brunoerg

friendly ping: @apoelstra

brunoerg avatar Jun 17 '24 19:06 brunoerg

Neat. Yep, looks like d is supposed to be a unit in a Taproot context, but we have it unconditionally set to false.

This is actually likely to be a really annoying bug because currently our type properties do not know the script context.

cc @sanket1729

apoelstra avatar Jun 17 '24 20:06 apoelstra