Skip to content

feat(tapscript): check confirmed BIP68 maturity against Core - #247

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
adrienlacombe:codex/bip68-maturity-context
Oct 16, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
adrienlacombe:codex/bip68-maturity-context

Conversation

@adrienlacombe

@adrienlacombe adrienlacombe commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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, and Unsupported outcomes; 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 local Premature. At F+5 and base+2,560 seconds, Core accepts both, matching local Mature. Leaf execution succeeds at both stages and remains recorded separately. Two fresh-node reports are byte-identical (SHA256 c8e4e05222280a178b5efeb20f6098154dc04ae874894c2cf4f70f00405a73fc). 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.

@RobinLinus
RobinLinus merged commit f392f37 into solving-bitcoin:main Oct 16, 2026
3 checks passed
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.

2 participants