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 0: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

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

    Conflicts

    No conflicts as of last run.

  5. 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”
  6. 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
  7. DrahtBot added the label Needs rebase on Oct 15, 2020
  8. sanket1729 force-pushed on Oct 19, 2020
  9. DrahtBot removed the label Needs rebase on Oct 19, 2020
  10. sanket1729 force-pushed on Dec 2, 2020
  11. Separate error code for Segwit CleanStack
    CleanStack rule is consensus enforced in Segwitv0.
    See discussion in #20006 for motivation
    39987fdb51
  12. 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
  13. 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
  14. sanket1729 force-pushed on Jan 26, 2021
  15. 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.
  16. achow101 closed this on Oct 12, 2022

  17. maflcko commented at 9:23 am on October 13, 2022: member
    If this is closed, then #20009 should be closed as well?
  18. 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: 2024-06-26 16:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me