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.
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-
maaku commented at 7:46 AM on January 12, 2018: contributor
-
Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code. 1e747e3c1e
- fanquake added the label Validation on Jan 12, 2018
-
Christewart commented at 6:56 PM on January 12, 2018: member
utack 1e747e3
- instagibbs approved
-
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?
-
sipa commented at 9:20 PM on January 12, 2018: member
utACK
-
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"
-
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)"
-
jtimon commented at 11:23 PM on January 12, 2018: contributor
utACK
-
randolf commented at 4:06 AM on February 16, 2018: contributor
Concept ACK.
-
jnewbery commented at 6:08 PM on April 4, 2018: member
5 utACKs. Is this ready for merge?
- sipa merged this on Apr 5, 2018
- sipa closed this on Apr 5, 2018
- sipa referenced this in commit 88430cbab4 on Apr 5, 2018
- braydonf referenced this in commit a111d0663c on Feb 2, 2019
- braydonf referenced this in commit 37fc9a78e4 on Feb 2, 2019
- tuxcanfly referenced this in commit 1985175c2d on Apr 19, 2019
- MarcoFalke locked this on Sep 8, 2021
Labels