Repository navigation
feat(tapscript): check confirmed BIP68 maturity against Core - #247
Merged
RobinLinus merged 1 commit intoOct 16, 2026
Merged
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.
A CSV leaf can execute successfully while its funded transaction is still immature under BIP68. The existing 19-case Core experiment mines 16 blocks before spending, so it does not expose that boundary. This adds a host-side sequence-lock preflight for confirmed, ordered prevouts and the candidate block's height/parent MTP. It returns distinct
Mature,Premature, andUnsupportedoutcomes; missing or inconsistent chain facts never become a rejection claim.A separate pinned-Core v30.3 experiment reuses two CSV5 spends. At candidate height F+4 and parent MTP base+2,048 seconds, Core rejects both under consensus (
bad-txns-nonfinal) and policy (non-BIP68-final), matching localPremature. At F+5 and base+2,560 seconds, Core accepts both, matching localMature. Leaf execution succeeds at both stages and remains recorded separately. Two fresh-node reports are byte-identical (SHA256c8e4e05222280a178b5efeb20f6098154dc04ae874894c2cf4f70f00405a73fc). The preflight does not verify chain-fact authenticity, UTXO existence, absolute finality, Script validity, or complete relay policy.Validation:
python3 tools/kb.py validate; 54 offline Python tests;cargo fmt --all --check; four focused BIP68 Rust tests; three pinned-Core runs including one from the committed tree, all matching the stored report. The broad non-field Rust suite passed locally; CI also runs the new Core comparison.