Skip to content

dual-fund/splice: mark superseded RBF/splice inflight candidates, stop recomputing their commitments - #9448

Open
Andezion wants to merge 2 commits into
ElementsProject:masterfrom
Andezion:splice-superseded-inflights
Open

Andezion wants to merge 2 commits into
ElementsProject:masterfrom
Andezion:splice-superseded-inflights

Conversation

@Andezion

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #9373 ("dualopend: reconnect during block catch-up locks in the
wrong RBF inflight", fixed in 90b58e8 / 31d08fb). That fix made
lightningd record the winning channel_inflight as soon as its block is
seen, instead of waiting for chain catch-up to finish - closing a window
where a reconnecting peer could lock in against a funding tx that was never
mined

TODO

  • Actually stopping channeld from signing commitments for dead
    candidates (not just lightningd persisting them) would require channeld
    to drop the candidate from its own splice_state->inflights and
    renegotiate the commit-sig batch size with the peer???
  • While writing the splice reconnect test, found a separate, smaller bug -
    splice_depth_cb() (channel_control.c) only notifies channeld of a
    reached confirmation depth if (channel->owner). If the depth threshold
    is reached while the peer is disconnected, that notification is silently
    dropped and isn't resent until the next new block (self-healing, but
    can delay splice lock-in by up to one confirmation after a disconnect)

Testing

  • wallet/test/run-wallet (DB round-trip unit test) - pass
  • tests/test_opening.py -k rbf (15 tests, including the extended
    test_rbf_reconnect_non_last_mined which now asserts losing inflights
    end up superseded) - pass
  • tests/test_splicing.py (full suite, 13 tests) - pass
  • make check-whitespace check-spelling - clean

Important

26.09 FREEZE August 5th: Non-bugfix PRs not ready by this date will wait for 26.12.

RC1 is scheduled on August 17th

The final release is scheduled for September 7th.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

@Andezion Andezion self-assigned this Aug 26, 2026
@Andezion
Andezion force-pushed the splice-superseded-inflights branch from 330c26a to de4018c Compare August 26, 2026 10:49
@Andezion
Andezion force-pushed the splice-superseded-inflights branch from de4018c to 457b959 Compare October 26, 2026 14:56
@Andezion
Andezion marked this pull request as ready for review October 26, 2026 14:56
@Andezion
Andezion requested a review from cdecker as a code owner October 26, 2026 14:56
@Andezion Andezion added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Oct 26, 2026
@Andezion
Andezion force-pushed the splice-superseded-inflights branch 2 times, most recently from 0e99fe1 to 3b9f980 Compare November 3, 2026 13:47
cdecker
cdecker previously approved these changes Nov 16, 2026

@cdecker cdecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix, thanks 👍
Just one curiosity, I am not too familiar with how splices exchange signatures, and the if + continue in peer_htlcs.c ends up skipping some inflights as soon as they are superseded. Could there be any situation where the peer has not identified an inflight as superseded themselves, and therefore expect a matching signature, that we just skip in that loop? I guess, can a peer deal with missing splice signatures in a commitment?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants