-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code #12167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…LEANSTACK error code. 8000 pre>
utack 1e747e3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
sidenote: I do wonder what "implicit" here means in the commend above. Implicit since no flag is passed, I suppose?
utACK |
utACK 1e747e3. @instagibbs Yes, I read that as "if we're into witness validation, SCRIPT_VERIFY_CLEANSTACK is assumed" |
it's more "if we're into witness validation, cleanstack is implied (regardless of SCRIPT_VERIFY_CLEANSTACK)" |
utACK |
Concept ACK. |
5 utACKs. Is this ready for merge? |
…a SCRIPT_ERR_CLEANSTACK error code 1e747e3 Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code. (Mark Friedenbach) Pull request description: 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. Tree-SHA512: 8f7b1650f7a23a942cde1070e3e56420be456b4a7be42515b237e95557bf2bd5e7ba9aabd213c8092bea28c165dbe73f5a3486300089aeb01e698151b42484b1
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.