Skip to content
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

stdscript: Add provably pruneable script support. #2803

Merged
merged 3 commits into from Nov 17, 2021

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Nov 12, 2021

This adds support for generating a provably pruneable version 0 script that is considered standard stdscript since the equivalent variant of it is eventually going to be removed from txscript given it is a standardness construct as opposed to a consensus rule.

It also adds an exported constant for the maximum allowed size of version 0 nulldata scripts to be considered standard and makes use of it instead of the one from txscript since it will also be removed from txscript for the same reason.

Finally, it updates stdscript/README.md to describe provably pruneable scripts and document the new function.

Copy link
Member

@rstaudt2 rstaudt2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few comment typos.

internal/staging/stdscript/scriptv0_test.go Outdated Show resolved Hide resolved
internal/staging/stdscript/scriptv0_test.go Outdated Show resolved Hide resolved
@rstaudt2
Copy link
Member

Looks good, just a few comment typos.

It looks like you addressed these in the PR that is on top of this.

@davecgh davecgh force-pushed the stdscript_provably_pruneable_script branch from 0e8e1d4 to ce0480b Compare November 16, 2021 03:21
@davecgh
Copy link
Member Author

davecgh commented Nov 16, 2021

It looks like you addressed these in the PR that is on top of this.

I meant to fix it in this PR, but looks like I fixed it later. I've put the fixes in the appropriate commit now.

This adds an exported constant for the maximum allowed size of version 0
nulldata scripts to be considered standard and makes use of it instead
of the one from txscript since the constant is eventually going to be
removed from txscript given it is purely a standardness construct as
opposed to a consensus rule.
This adds a function to generate a provably pruneable version 0 script
that is considered standard since the equivalent variant of it is
eventually going to be removed from txscript given it is a standardness
construct as opposed to a consensus rule.
This updates README.md to describe provably pruneable scripts and
document the new function.
@davecgh davecgh force-pushed the stdscript_provably_pruneable_script branch from ce0480b to f264e8c Compare November 16, 2021 23:47
@davecgh davecgh merged commit f264e8c into decred:master Nov 17, 2021
@davecgh davecgh deleted the stdscript_provably_pruneable_script branch November 17, 2021 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants