Skip to content

Remove the u property from d#117

Merged
sipa merged 1 commit into
sipa:masterfrom
darosior:minimalif_d_not_u
Apr 18, 2022
Merged

Remove the u property from d#117
sipa merged 1 commit into
sipa:masterfrom
darosior:minimalif_d_not_u

Conversation

@darosior
Copy link
Copy Markdown
Contributor

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 a thresh :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 u property of d:?

@darosior
Copy link
Copy Markdown
Contributor Author

Based on #116

@darosior darosior changed the title Remove the u property from d; Remove the u property from d Apr 18, 2022
@sipa
Copy link
Copy Markdown
Owner

sipa commented Apr 18, 2022

@darosior Feel like rebasing this? Perhaps we don't want this blocked by the fuzzer/modernization efforts.

@darosior
Copy link
Copy Markdown
Contributor Author

darosior commented Apr 18, 2022

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.
@darosior darosior force-pushed the minimalif_d_not_u branch from c11b7a0 to aa11a35 Compare April 18, 2022 13:45
@sipa
Copy link
Copy Markdown
Owner

sipa commented Apr 18, 2022

utACK aa11a35

@sipa sipa merged commit 5f10e1a into sipa:master Apr 18, 2022
@sanket1729
Copy link
Copy Markdown
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
@darosior darosior deleted the minimalif_d_not_u branch April 19, 2022 14:50
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
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
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.

3 participants