Remove the u property from d#117
Merged
Merged
Conversation
Contributor
Author
|
Based on #116 |
Owner
|
@darosior Feel like rebasing this? Perhaps we don't want this blocked by the fuzzer/modernization efforts. |
Contributor
Author
|
Right, done. |
The value it leaves on the stack depends on the last element on the stack. However, we can't make sure this element is OP_1 (which would give us the 'u' property) without the MINIMALIF rule. MINIMALIF is only policy for P2WSH, therefore giving 'd:' the 'u' property breaks consensus soundness: it makes it possible (by consensus but not policy) for instance to satisfy a thresh() without satisfying at least k of its subs. This bug was found and reported by Andrew Poelstra.
c11b7a0 to
aa11a35
Compare
Owner
|
utACK aa11a35 |
Contributor
|
post merge ACK aa11a35 |
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
a6f772e Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK a6f772e Tree-SHA512: c62ea582bd45c8d0176ae93ad7fce3bd2778b87fedbaeb0e54fb33cb3028e9f7908deb70c8ac540e86ed11f53e7f88ac5fb6b1d46fb0aa082ed87ec649c92344
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
This was referenced Apr 19, 2022
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
5693444 Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK 5693444 Tree-SHA512: 28def4d95bdbecb37ca46a9e33495c3c5a9d0ff2cad59c8c9d3f36c3f40fac81ce854bf8d289a1358a56ed3f7f380872b5ccf60a79a834cf017f6c902f0c3ed8
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
5a7d9f0 Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK 5a7d9f0 Tree-SHA512: 5dd837e61e142699da0af29750f06790cb42847debfe0f7ded6cfcd62a3f2b6717e260cba96c7fa62afc958b5d56419293947e563595afd3a75babc149e52a5b
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
310ef06 Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK 310ef06 Tree-SHA512: 8420aa68de421b8c23507489e3240a8774694bac18a7e2395f937370e7a20f2126c05938b3c11e6f5b945cb31590456f4a252c38f16914d4ce7a39fd1def0cde
sanket1729
added a commit
to sanket1729/rust-miniscript
that referenced
this pull request
Apr 19, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
11a1dc0 Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK 11a1dc0 Tree-SHA512: d7643315068c0235148123bb29c7106719bbddc27c79c08ca41c413d4260b01ca2985af767e8a25e444085bdd9bd5c1de13166ead84db7cae0f82b8c978131d0
apoelstra
added a commit
to rust-bitcoin/rust-miniscript
that referenced
this pull request
Apr 19, 2022
d54a746 Remove `u` property from `d` (sanket1729) Pull request description: Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript ACKs for top commit: apoelstra: ACK d54a746 Tree-SHA512: 9761d450131a0c6477e6f5b5670630c64c0b5f11b2b4be16c74cbdcf2d77bbaa143dddcfc36851a7376c4280f0548c6d2217c7bfbb7f434ef09e392f55e3f4db
darosior
added a commit
to darosior/python-bip380
that referenced
this pull request
Apr 27, 2022
joemphilips
pushed a commit
to joemphilips/rust-miniscript
that referenced
this pull request
Dec 9, 2022
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
heap-coder
added a commit
to heap-coder/rust-miniscript
that referenced
this pull request
Sep 27, 2025
Parallel to sipa/miniscript#117 This is a severe bug reporting that needs backporting as it affects the correctness properties of miniscript
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.
As reported by Andrew on IRC. I think it's the cleanest simple fix. It will come at the cost of a few needless
0NOTEQUAL, but better have this than miners being able to bypass athresh:sweat_smile:.I checked the other fragments and i don't think anything else is affected. I checked the compiler and i don't think any modification is needed as it doesn't appear to rely on the
uproperty ofd:?