Respect empty signatures for unknown tapscript key types - #21
Open
adrienlacombe wants to merge 1 commit into
Open
Respect empty signatures for unknown tapscript key types#21adrienlacombe wants to merge 1 commit into
adrienlacombe wants to merge 1 commit into
Conversation
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.
An empty signature currently succeeds for a nonempty public key whose length is not 32. This makes
CHECKSIGreturn true, letsCHECKSIGVERIFYcontinue, and incrementsCHECKSIGADDwhen its accumulator should be unchanged. Return signature nonemptiness from the unknown-key branch, as specified by BIP342.Six direct-execution test groups cover all three opcodes, unknown-key lengths 1/2/31/33/65/520, empty and nonempty signatures, empty-key rejection, the 32-byte empty-signature control, and zero-versus-50 validation-weight charges. This leaves initial budget framing and relay-policy support unchanged.
Validation: three regression groups fail against
ba96bc2; all 18 tests pass withcargo test --lockedafter this one-line correction. Separately, a funded Taproot laboratory experiment compares complete transactions with pinned Core v30.3 (49faec4f). All six unknown-key fixtures agree with Core after integration. Policy's unknown-key discouragement is measured separately from consensus acceptance.