Changes to the standard scripts#211
Open
raulcano wants to merge 3 commits intodiscreetlogcontracts:masterfrom
Open
Changes to the standard scripts#211raulcano wants to merge 3 commits intodiscreetlogcontracts:masterfrom
raulcano wants to merge 3 commits intodiscreetlogcontracts:masterfrom
Conversation
Christewart
approved these changes
Dec 18, 2025
Contributor
Christewart
left a comment
There was a problem hiding this comment.
Seems reasonable to me as this appears to be the convention throughout the rest of the Script ecosystem
Author
|
Some further clarification to my original post: According to https://en.bitcoin.it/wiki/Script: So it is true that the data push opcode is part of the actual script, but not displayed in common notation. I suppose my PR still makes sense if we are to keep the scripts aligned with this notation. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The description in the specs about the acceptable standard scripts is confusing (or wrong, depending on how it's read).
For example, the typical P2PKH script has this form:
OP_DUP OP_HASH160 <20-bytes> OP_EQUALVERIFY OP_CHECKSIG
not this one (as written in the current specs - notice the number '20' in the script)
OP_DUP OP_HASH160 20 <20-bytes> OP_EQUALVERIFY OP_CHECKSIG
I might be wrong, but I couldn't find a reference where such '20' or '32' is pushed before the actual hashes. Maybe it was intended for clarity?
In any case, I believe my proposal here is slightly more clear.
Reference: https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_(pay-to-pubkey-hash)