Skip to content

Conversation

jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Mar 10, 2025

Splicing allows either node to send tx_init_rbf as they may want to take the opportunity to contribute or withdraw additional funds to / from the channel. Allow the same for v2 channel establishment for consistency.

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

I have prototyped this in ACINQ/eclair#3021 and I don't see any reason to disallow it.

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

LGTM

Splicing allows either node to send `tx_init_rbf` as they may want to
take the opportunity to contribute or withdraw additional funds to /
from the channel. Allow the same for v2 channel establishment for
consistency.
@jkczyz jkczyz force-pushed the 2025-03-dual-funding-rbf branch from 7feaee0 to 966e550 Compare July 14, 2025 20:22
@jkczyz
Copy link
Contributor Author

jkczyz commented Jul 14, 2025

Squashed the fixups. @vincenzopalazzo Anyone else from CLN need to chime in on this?

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

ACK 966e550

@ddustin
Copy link
Contributor

ddustin commented Aug 25, 2025

I haven't tested it but this should work fine in CLN. We essentially treat RBF as just a splice_init anyway.

@t-bast
Copy link
Collaborator

t-bast commented Aug 26, 2025

@ddustin be careful, it must NOT be treated as splice_init, this is very different. If you treat it as splice_init, you're going to create a child transaction that spends the pending funding transaction. On the contrary, we want to create an RBF attempt, that double-spends (replaces) the pending funding transaction.

@t-bast
Copy link
Collaborator

t-bast commented Sep 9, 2025

@ddustin I tested against lightningd v25.09 and got this error: "Only the channel initiator is allowed to initiate RBF". So it looks like this isn't implemented in lightningd yet?

The sender of `tx_init_rbf`:
- MUST be the *initiator*
- MAY be either the *initiator* or the *accepter*
- If the sender is the accepter, it becomes the initiator of the `interactive-tx` session and thus:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hello! Looking at updating CLN to accommodate this, and ran into a question which seems obvious but wanted to confirm.

I'm taking this to mean that the serial_ids and all other role-related indicators are swapped for the entirety of the tx construction phase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct

niftynei added a commit to niftynei/lightning that referenced this pull request Oct 21, 2025
Work in progress to allow acceptor to initiate an RBF

Mostly works, except that the original funder isn't setup to re-add
their original funds to the channel, so the init fails because it's
missing any overlapping inputs.

lightning/bolts#1236
@niftynei
Copy link
Collaborator

Is it an implementation detail to have the OG opening peer re-adding their original inputs to the transaction or is that something we should specify?

@jkczyz
Copy link
Contributor Author

jkczyz commented Oct 21, 2025

Is it an implementation detail to have the OG opening peer re-adding their original inputs to the transaction or is that something we should specify?

I'd say it's an implementation detail. They could choose to not add them / take the opportunity to use entirely different inputs / amounts.

@jkczyz
Copy link
Contributor Author

jkczyz commented Oct 21, 2025

I'd say it's an implementation detail. They could choose to not add them / take the opportunity to use entirely different inputs / amounts.

Oh, and since they are no longer the initiator, they wouldn't be paying for the common fields nor the funding output. So they may decide to choose different UTXOs to spend as their fee responsibility may decrease.

@niftynei
Copy link
Collaborator

niftynei commented Oct 21, 2025 via email

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.

5 participants