Script: split policy/error consensus codes for CLEANSTACK, MINIMALIF#20100
Closed
sanket1729 wants to merge 3 commits intobitcoin:masterfrom
Closed
Script: split policy/error consensus codes for CLEANSTACK, MINIMALIF#20100sanket1729 wants to merge 3 commits intobitcoin:masterfrom
sanket1729 wants to merge 3 commits intobitcoin:masterfrom
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
This was referenced Oct 8, 2020
|
@sanket1729 There is a typo in the PR title, it says "MINAMAL". It should be "MINIMAL" |
ea4ee8a to
f2c53c8
Compare
f2c53c8 to
12343a5
Compare
CleanStack rule is consensus enforced in Segwitv0. See discussion in bitcoin#20006 for motivation
Change error code for MINIMALIF to WITNESS_MINIMALIF to make it explicit that minimal if is only applicable 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
12343a5 to
03db7ce
Compare
9 tasks
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. |
Member
|
If this is closed, then #20009 should be closed as well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20009.
This PR consists of three commits.
First commit: Separates
CLEANSTACKintoWITNESS_CLEANSTACKandCLEANSTACK. See#20006 (comment) for motivation.
Second commit: The stack size for witness programs was being explicitly resized to 1 to get around
CLEANSTACKcheck. This commits removes that logic and does some code cleanup. This commitmay require careful review to see if this does not change anything unintended.
Third commit: Refactor
MINIMALIFtoWITNESS_MINIMALIFand changes the error message.The Tapscript related error codes were handled in #19953.