Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code #12167

pull maaku wants to merge 1 commits into bitcoin:master from maaku:cleanstack-script-error changing 2 files +15 −15
  1. maaku commented at 7:46 AM on January 12, 2018: contributor

    If a segwit script terminates with a stack size not equal to one, the current error code is EVAL_FALSE. This is semantically wrong, and prevents explicitly checking CLEANSTACK violations in the unit tests. This PR changes the error code (and affected unit tests) to use SCRIPT_ERROR_CLEANSTACK instead of SCRIPT_ERROR_EVAL_FALSE.

  2. Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code. 1e747e3c1e
  3. fanquake added the label Validation on Jan 12, 2018
  4. Christewart commented at 6:56 PM on January 12, 2018: member

    utack 1e747e3

  5. instagibbs approved
  6. instagibbs commented at 9:15 PM on January 12, 2018: member

    utACK

    sidenote: I do wonder what "implicit" here means in the commend above. Implicit since no flag is passed, I suppose?

  7. sipa commented at 9:20 PM on January 12, 2018: member

    utACK

  8. theuni commented at 9:52 PM on January 12, 2018: member

    utACK 1e747e3c1e04a38c5ed6e8f8cd14077b8b7377c9. @instagibbs Yes, I read that as "if we're into witness validation, SCRIPT_VERIFY_CLEANSTACK is assumed"

  9. sipa commented at 9:55 PM on January 12, 2018: member

    it's more "if we're into witness validation, cleanstack is implied (regardless of SCRIPT_VERIFY_CLEANSTACK)"

  10. jtimon commented at 11:23 PM on January 12, 2018: contributor

    utACK

  11. randolf commented at 4:06 AM on February 16, 2018: contributor

    Concept ACK.

  12. jnewbery commented at 6:08 PM on April 4, 2018: member

    5 utACKs. Is this ready for merge?

  13. sipa merged this on Apr 5, 2018
  14. sipa closed this on Apr 5, 2018

  15. sipa referenced this in commit 88430cbab4 on Apr 5, 2018
  16. braydonf referenced this in commit a111d0663c on Feb 2, 2019
  17. braydonf referenced this in commit 37fc9a78e4 on Feb 2, 2019
  18. tuxcanfly referenced this in commit 1985175c2d on Apr 19, 2019
  19. MarcoFalke locked this on Sep 8, 2021

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-04-13 15:15 UTC

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