Repository navigation
Validate Taproot script-path commitments before local verdicts - #243
Merged
RobinLinus merged 1 commit intoSep 28, 2026
Merged
RobinLinus merged 1 commit into
RobinLinus merged 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 local leaf profiles accept a revealed script even when its Taproot control-block parity bit is wrong. Bitcoin Core rejects that funded spend with
Witness program hash mismatch. This adds a host-side commitment preflight for the complete script-path witness and P2TR prevout, then gates the fixture's combined local verdict on it. The leaf result remains visible as a separate diagnostic.The preflight handles an optional final annex, checks the control block with rust-bitcoin's Taproot commitment verifier, and distinguishes commitment failures from unsupported or absent contexts. It verifies only the revealed script's commitment; transaction validity and relay policy remain Core's responsibility. The existing depth-zero parity mutation now agrees with pinned Core v30.3, bringing the 44-fixture report to 88/88 combined local/Core comparisons. Two isolated Core runs produced byte-identical reports (SHA256
83b59980d332d8da78fe0850a9bc54aba6352bbc6f79f5f073a7210a27aa4010). Depth-one, annex, key/script/sibling mutations, malformed controls, and future leaf versions have focused local tests; those cases are not claimed as Core differentials.Validation:
python3 tools/kb.py validate;cargo fmt --check; 12 offline Core-runner tests; focused commitment and fixture tests;cargo test --locked -- --skip fields::; and two pinned Core regtest runs.