Skip to content

miniscript: don't use malleable satisfier, even for or_i dissatisfactions#980

Open
apoelstra wants to merge 2 commits into
rust-bitcoin:masterfrom
apoelstra:2026-06/mallsat
Open

miniscript: don't use malleable satisfier, even for or_i dissatisfactions#980
apoelstra wants to merge 2 commits into
rust-bitcoin:masterfrom
apoelstra:2026-06/mallsat

Conversation

@apoelstra
Copy link
Copy Markdown
Member

Significantly cleans up the regression_895 unit test, which I need to do to support the next PR in the ValidationParams series. Along the way I found multiple issues (#976 and #979).

Fixes #976

apoelstra added 2 commits June 5, 2026 18:12
This is supposed to be testing mixed timelocks, but it uses descriptors
that are invalid for several unrelated reasons. These will be enforced
in a later PR, so fix the issues now.

Specifically:

* It is not allowed to use the same `unavailable_key` multiple times
* The rightmost branch must not be sigless; the timelock needs to have a
   pubkey and'ed with it. Otherwise the whole script is malleable.
* Similarly the "cheap dissatisfaction" of v:after(144),pk({})) must
   not be sigless. We turn it into v:after(144),and_v(v:pk({})),pk({}))
   which requires a signature even to be dissatisfied.
* Also, the giant comments don't accurately reflect what's going on in
   this test. They claim that post-rust-bitcoin#895, we will refuse to create a
   satisfaction if we'd be forced into mixing timelocks. But we don't.
   We actually do the same wrong thing as before, just for different
   reasons.

The resulting test now passes even when all `ValidationParams` are turned
on, though in this PR we don't confirm this.

HOWEVER, despite the test working with a non-malleable descriptor now, the
satisfaction that this test produces is malleable. For this I have filed
rust-bitcoin#976, which will be
fixed in the next commit.
…ions

...unless the user has explicitly requested a malleable satisfaction.

Fixes rust-bitcoin#976
@apoelstra
Copy link
Copy Markdown
Member Author

On 99501a5 successfully ran local tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Satisfier makes malleable satisfactions in some contrived cases

1 participant