Skip to content

Conversation

@maaku
Copy link
Contributor

@maaku maaku commented Jan 12, 2018

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.

@Christewart
Copy link
Contributor

utack 1e747e3

Copy link
Member

@instagibbs instagibbs left a 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?

@sipa
Copy link
Member

sipa commented Jan 12, 2018

utACK

@theuni
Copy link
Member

theuni commented Jan 12, 2018

utACK 1e747e3.

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

@sipa
Copy link
Member

sipa commented Jan 12, 2018

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

@jtimon
Copy link
Contributor

jtimon commented Jan 12, 2018

utACK

@randolf
Copy link
Contributor

randolf commented Feb 16, 2018

Concept ACK.

@jnewbery
Copy link
Contributor

jnewbery commented Apr 4, 2018

5 utACKs. Is this ready for merge?

@sipa sipa merged commit 1e747e3 into bitcoin:master Apr 5, 2018
sipa added a commit that referenced this pull request Apr 5, 2018
…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
braydonf added a commit to braydonf/bcoin that referenced this pull request Feb 2, 2019
braydonf added a commit to braydonf/bcoin that referenced this pull request Feb 2, 2019
tuxcanfly pushed a commit to tuxcanfly/bcoin that referenced this pull request Apr 19, 2019
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants