chainntnfs: add spend depth notifications - #11147
Draft
yyforyongyu wants to merge 7 commits into
Draft
Conversation
Allow spend clients to request a confirmation depth while preserving the existing one-confirmation default. Thread the option through notifier adapters and mocks, and reject invalid values before registration.
Queue each spend client until its requested confirmation height while retaining shared candidate discovery. Clean canceled clients from the maturity index and share scheduling across all candidate sources.
Keep canonical spend candidates separate from client delivery. Clear queued maturity entries when a spending block disconnects so a replacement can be discovered without notifying immature clients.
Exercise independent one- and multi-confirmation clients, historical spend delivery, reorg replacement, and cancellation at the maturity boundary.
Keep the first same-script spend immutable until it disconnects or ages out. Cover candidate ownership, cancellation turnover, and depth validation so queued clients cannot inherit a later immature spend.
Run future spend maturity and boundary checks through the shared notifier suite so every backend forwards the explicit registration option for live transactions.
Run historical, cached, reorg, and cancellation maturity cases through the backend-neutral notifier suite without exceeding the per-commit review budget.
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.
Summary
Add caller-selected confirmation depth to spend notifications while preserving the existing one-confirmation default.
Change Description
Spend registrations now carry their requested maturity through TxNotifier scheduling and reorg handling. Backend-neutral coverage exercises future and historical registrations, maturity boundaries, reorgs, and cancellation.
Notes
This is PR 1 of 3 for the SI #95 resolution-lifecycle fix and depends only on master. After this PR merges, the sweep lifecycle layer will be rebased onto the updated master and opened as PR 2. PR #11054 remains draft as PR 3 until both prerequisite layers merge.