Skip to content

Conversation

@jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Oct 23, 2025

LDK 0.2 added beta support for splicing. This PR exposes it in LDK Node as two new Node methods: splice_in and splice_out. Funds used for splicing in are taken from the on-chain BDK wallet. When splicing out, any on-chain address can be provided as the destination.

Two new events are provided: SplicePending and SpliceFailed. The former is emitted once the new funding transaction has been broadcast. The latter indicates that any contributed inputs may be re-used, though this is not currently exposed. It should be used internally to unlock UTXOs that were intended to be spent.

When a channel is spliced, the existing funding transaction's output is
spent and a new funding transaction output is formed. Once the splice is
considered locked by both parties, LDK will emit a ChannelReady event
which will include the new funding_txo. Additionally, the initial
ChannelReady event now includes the original funding_txo. Include this
data in LDK Node's ChannelReady event.
LDK introduced similar events with splicing. SplicePending is largely
informational like ChannelPending. SpliceFailed indicates the used UTXOs
can be reclaimed. This requires UTXO locking, which is not yet
implemented.
When the interactive-tx construction protocol completes in LDK during
splicing (and in the future dual-funding), LDK Node must provide
signatures for any non-shared inputs belonging to its on-chain wallet.
This commit implements this when handling the corresponding
FundingTransactionReadyForSigning event.
Extract the funds availability checking logic from open_channel_inner
into a separate method so that it can be reused for channel splicing.
Instead of closing and re-opening a channel when outbound liquidity is
exhausted, splicing allows to adding more funds (splice-in) while
keeping the channel operational. This commit implements splice-in using
funds from the BDK on-chain wallet.
Instead of closing and re-opening a channel when on-chain funds are
needed, splicing allows removing funds (splice-out) while keeping the
channel operational. This commit implements splice-out sending funds to
a user-provided on-chain address.
By default LDK sets UserConfig::reject_inbound_splices to true, thus
disallowing splices not specifically requested by the user. This ensures
that a counterparty cannot break backwards compatibility. Expose this
setting in LDK Node in order to enable splicing for interoperability
testing.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Oct 23, 2025

👋 Thanks for assigning @wpaulino 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.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull @TheBlueMatt @wpaulino! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

2 similar comments
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull @TheBlueMatt @wpaulino! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull @TheBlueMatt @wpaulino! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

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