Script: split policy/error consensus codes for CLEANSTACK, MINIMALIF #20100

pull sanket1729 wants to merge 3 commits into bitcoin:master from sanket1729:minimal_if changing 5 files +76 −41
  1. sanket1729 commented at 12:29 AM on October 8, 2020: contributor

    Fixes #20009.

    This PR consists of three commits. First commit: Separates CLEANSTACK into WITNESS_CLEANSTACK and CLEANSTACK. See #20006 (comment) for motivation.

    Second commit: The stack size for witness programs was being explicitly resized to 1 to get around CLEANSTACK check. This commits removes that logic and does some code cleanup. This commit may require careful review to see if this does not change anything unintended.

    Third commit: Refactor MINIMALIF to WITNESS_MINIMALIF and changes the error message.

    The Tapscript related error codes were handled in #19953.

  2. sanket1729 renamed this:
    split policy/error consensus codes for CLEANSTACK, MINAMALIF
    Script: split policy/error consensus codes for CLEANSTACK, MINAMALIF
    on Oct 8, 2020
  3. DrahtBot added the label Consensus on Oct 8, 2020
  4. DrahtBot commented at 1:17 AM on October 8, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  5. DrahtBot cross-referenced this on Oct 8, 2020 from issue History for Taproot PR #19953 by sipa
  6. DrahtBot cross-referenced this on Oct 8, 2020 from issue Implement BIP 340-342 validation (Schnorr/taproot/tapscript) by sipa
  7. ysangkok commented at 5:30 PM on October 12, 2020: none

    @sanket1729 There is a typo in the PR title, it says "MINAMAL". It should be "MINIMAL"

  8. sanket1729 renamed this:
    Script: split policy/error consensus codes for CLEANSTACK, MINAMALIF
    Script: split policy/error consensus codes for CLEANSTACK, MINIMALIF
    on Oct 12, 2020
  9. DrahtBot added the label Needs rebase on Oct 15, 2020
  10. sanket1729 force-pushed on Oct 19, 2020
  11. DrahtBot removed the label Needs rebase on Oct 19, 2020
  12. sanket1729 force-pushed on Dec 2, 2020
  13. Separate error code for Segwit CleanStack
    CleanStack rule is consensus enforced in Segwitv0.
    See discussion in #20006 for motivation
    39987fdb51
  14. MinimalIf-> Witness_MinimalIf for witness programs
    Change error code for MINIMALIF to WITNESS_MINIMALIF
    to make it explicit that minimal if is only applicable
    for witness programs
    a52957f5f3
  15. Avoid double cleanstk checks for witness programs
    -The consensus rules for Segwit ensure that CleanStack
    is followed. There is no need to set stack to size 1 and check
    it again
    - Replaced `cond == false` with a more idiomatic !cond
    03db7ce197
  16. sanket1729 force-pushed on Jan 26, 2021
  17. DrahtBot cross-referenced this on May 26, 2021 from issue Make script interpreter independent from storage type CScript by sipa
  18. DrahtBot cross-referenced this on Jun 5, 2022 from issue test: Unit tests for taproot/tapscript coverage in `interpreter.cpp` by david-bakin
  19. achow101 commented at 6:20 PM on October 12, 2022: member

    Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened.

  20. achow101 closed this on Oct 12, 2022

  21. maflcko commented at 9:23 AM on October 13, 2022: member

    If this is closed, then #20009 should be closed as well?

  22. bitcoin locked this on Oct 13, 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