miniscript: the 'd:' wrapper must not be 'u' #24906

pull darosior wants to merge 1 commits into bitcoin:master from darosior:miniscript_fix changing 2 files +12 −2
  1. darosior commented at 2:10 PM on April 18, 2022: member

    The type system was incorrectly relying on a standardness rule to be sound.

    This bug was found and reported by Andrew Poelstra based on a question from Aman Kumar Kashyap.

  2. miniscript: the 'd:' wrapper must not be 'u'
    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.
    7417594187
  3. DrahtBot added the label Tests on Apr 18, 2022
  4. sipa commented at 5:45 PM on April 18, 2022: member

    ACK 74175941870347458ba8a0074f88b22cb94d0235

  5. DrahtBot commented at 2:15 AM on April 19, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24860 (Miniscript integration follow-ups by darosior)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. DrahtBot cross-referenced this on Apr 19, 2022 from issue Miniscript integration follow-ups by darosior
  7. fanquake commented at 7:54 AM on April 19, 2022: member
  8. darosior cross-referenced this on Apr 19, 2022 from issue miniscript: the 'd:' wrapper must not be 'u' by darosior
  9. apoelstra commented at 5:02 PM on April 19, 2022: contributor

    utACK 74175941870347458ba8a0074f88b22cb94d0235

  10. achow101 commented at 5:16 PM on April 19, 2022: member

    ACK 74175941870347458ba8a0074f88b22cb94d0235

  11. hebasto merged this on Apr 19, 2022
  12. hebasto closed this on Apr 19, 2022

  13. sanket1729 commented at 6:05 PM on April 19, 2022: contributor

    ACK 74175941870347458ba8a0074f88b22cb94d0235

  14. darosior deleted the branch on Apr 19, 2022
  15. sidhujag referenced this in commit 90e2d30092 on Apr 19, 2022
  16. darosior cross-referenced this on Mar 9, 2023 from issue MiniTapscript: port Miniscript to Tapscript by darosior
  17. darosior cross-referenced this on Mar 14, 2023 from issue MiniTapscript: port Miniscript to Tapscript by darosior
  18. bitcoin locked this on Apr 19, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:53 UTC