Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Draft: Splicing #168

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

WIP: Draft: Splicing #168

wants to merge 16 commits into from

Conversation

JssDWt
Copy link
Collaborator

@JssDWt JssDWt commented Jan 19, 2024

Under the following conditions the lsp will splice in a channel, rather than opening a new channel:

  • The lsp node supports splicing (cln with --experimental-splicing enabled)
  • The peer supports splicing
  • The lsp has a zero-fee-htlc-tx channel with the peer

If above conditions are true, the LSP selects a channel to splice in based on some rules, to try and make sure always the same channel is used to splice-in over. Basically using the oldest zero-fee-htlc-tx channel, or the 'lowest' tx hash if all channels are unconfirmed.

TODO:

Caveats:

  • If the splice funding fails, the channel may forever be in stfu/quiescence mode. Making it impossible to use again. I'm not sure yet whether there is a way out of that.
  • If htlcs are in-flight on the channel when trying to splice-in, the splice-in would fail and thus the htlcs that would pay for the splice-in would fail too.

Notes:

  • Zero conf splices can be chained. So there can be a chain of unconfirmed splices in the mempool, just like with regular channel opens. We have to be careful that the lightning implementation does not try to RBF the splice transaction, because that would make the channel invalid. Probably they won't do that after splice_locked in sent, which should be immediate for 0-conf splices.

@JssDWt JssDWt force-pushed the splicing-poc branch 2 times, most recently from ac9efc9 to 0dbe6ec Compare February 26, 2024 14:35
@ddustin
Copy link

ddustin commented Aug 2, 2024

The enable splicing config option was moved to runtime -- it's set the the conf file or runtime parameter now

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