Skip to content

Remove the splice intent from pending-payment entries - #1232

Open
jkczyz wants to merge 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-11-remove-dead-splice-intent
Open

jkczyz wants to merge 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-11-remove-dead-splice-intent

Conversation

@jkczyz

@jkczyz jkczyz commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1079 and #1080.

#1079 added a splice intent to pending-payment entries as groundwork: the splice entry points in #1080 were to persist it before handing a contribution to LDK, so a splice LDK never durably learned of could be recognized after a restart. Those entry points were dropped from #1080 before it merged (recovery of a lost splice is to come with the input locks of #1037), so on main LDK Node never writes the intent. Its one reader, find_splice_payment_id, never finds one, and the field, SpliceIntent, SpliceKind, the merge rule that protected the intent, and their tests are dead.

This removes them. The first signed round of a splice gets a fresh id, as it already did whenever the intent was absent. TLV type 10 of PendingPaymentDetails is left unused; it never reached a release.

The tests that set up an intent to assert it was adopted or left alone are dropped or reduced to what they still show: a replayed signing writes nothing, a counterparty's broadcast joins the record under the id the signing chose rather than the transaction's own, and a fee bump joins the record of the round it replaces.

Written with the help of an AI tool.

🤖 Generated with Claude Code

@ldk-reviews-bot

ldk-reviews-bot commented Nov 11, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull tnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Love to see the negative diff.

Comment thread src/payment/pending_payment_store.rs Outdated
(6, funding_channels, optional_vec),
(8, candidates, optional_vec),
(10, splice_intent, option),
// Type 10 is unused: it held a splice intent that was dropped before any release wrote it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can be removed as we never released it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I also renumbered locked_rounds since this hasn't been released.

Comment thread src/wallet/mod.rs Resolved
@tnull tnull added this to the 0.8 milestone Nov 12, 2026
@jkczyz
jkczyz requested a review from tnull November 12, 2026 15:26

@tnull tnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please squash.

One nit from claude that you might want to address while squashing:

  1. The main commit's message is wrong after the last fixup (medium, needs fixing before squash). Commit 16b7ed0 says "TLV type 10 of the entry is left unused; it never reached a release." Fixup 302b1ae then gives type 10 to locked_rounds (src/payment/pending_payment_store.rs:178). Once the
    fixups are squashed, the message describes the opposite of the code. It should say instead that locked_rounds moves from 12 to 10.

The splice intent was added to pending-payment entries as groundwork for
tracking a user-initiated splice from its submission (lightningdevkit#1079); the splice
entry points that were to write it were part of lightningdevkit#1080 and were dropped
from it before it merged. As a result, LDK Node never writes the intent.
Its one reader, the id resolution at signing time, never finds one, so
the field, the types describing it, the merge rule that kept it from
being overwritten, and the tests exercising them are dead.

Remove them. The first signed round of a splice gets a fresh id, as it
already did whenever the intent was absent. The entry's locked rounds
move from TLV type 12 to the freed type 10; no release has written an
entry, so neither type has reached users.

The tests that set up an intent to assert it was adopted or left alone
are dropped or reduced to what they still show: a replayed signing
writes nothing, a counterparty's broadcast joins the record under the id
the signing chose rather than the transaction's own, and a fee bump
joins the record of the round it replaces.

Written with the help of an AI tool.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@jkczyz
jkczyz force-pushed the 2026-11-remove-dead-splice-intent branch from 302b1ae to c113d92 Compare November 17, 2026 16:49
@jkczyz
jkczyz requested a review from tnull November 17, 2026 17:03
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.

3 participants