miniscript: don't use malleable satisfier, even for or_i dissatisfactions#980
Open
apoelstra wants to merge 2 commits into
Open
miniscript: don't use malleable satisfier, even for or_i dissatisfactions#980apoelstra wants to merge 2 commits into
apoelstra wants to merge 2 commits into
Conversation
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
7ea3555 to
99501a5
Compare
Member
Author
|
On 99501a5 successfully ran local tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Significantly cleans up the
regression_895unit test, which I need to do to support the next PR in theValidationParamsseries. Along the way I found multiple issues (#976 and #979).Fixes #976