Skip to content

chainntnfs: add spend depth notifications - #11147

Draft
yyforyongyu wants to merge 7 commits into
lightningnetwork:masterfrom
yyforyongyu:chainntnfs-spend-depth
Draft

chainntnfs: add spend depth notifications#11147
yyforyongyu wants to merge 7 commits into
lightningnetwork:masterfrom
yyforyongyu:chainntnfs-spend-depth

Conversation

@yyforyongyu

@yyforyongyu yyforyongyu commented Aug 31, 2026

Copy link
Copy Markdown
Member

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant