Skip to content

Respect empty signatures for unknown tapscript key types - #21

Open
adrienlacombe wants to merge 1 commit into
BitVM:masterfrom
adrienlacombe:codex/unknown-key-empty-signatures
Open

Respect empty signatures for unknown tapscript key types#21
adrienlacombe wants to merge 1 commit into
BitVM:masterfrom
adrienlacombe:codex/unknown-key-empty-signatures

Conversation

@adrienlacombe

Copy link
Copy Markdown

An empty signature currently succeeds for a nonempty public key whose length is not 32. This makes CHECKSIG return true, lets CHECKSIGVERIFY continue, and increments CHECKSIGADD when 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 with cargo test --locked after 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.

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.

1 participant