ElementsProject / ElementsProject/lightning

Allow 0-conf splices

Open
#7,002 13 comments 0 reactions 1 assignee Claimed by @ddustin View on GitHub
feature protocol protocol::splicing
Dominant language
C
Stars
3.1k
Forks
1k
Avg merge
4d 10h
Merged PRs (30d)
13

Description

In the current splicing flow, there is no way to set the minimum required chain confirmations. It would be useful to be able to set the minimum amount of chain confirmations to 0 in the context of an LSP that operates with 0-conf channels.

- be able to set the minimum required confirmations to 0 (`mindepth`), like in fundchannel
- if `mindepth` is zero, immediately send splice_locked, without waiting for confirmations
- Do not RBF the channel when `mindepth` is 0, since that would invalidate the funding transaction

Typical splicing flow (see comment at splice_init):
```
RESULT=$(lightning-cli listpeerchannels);
CHANNEL_ID=$(echo $RESULT| jq -r ".channels[0].channel_id");
echo $RESULT;

RESULT=$(lightning-cli fundpsbt -k satoshi=100000sat feerate=urgent startweight=800 excess_as_change=true);
INITIALPSBT=$(echo $RESULT | jq -r ".psbt");
echo $RESULT;

# This could use a mindepth parameter, like fundchannel.
RESULT=$(lightning-cli splice_init $CHANNEL_ID 100000 $INITIALPSBT);
PSBT=$(echo $RESULT | jq -r ".psbt");
echo $RESULT;

RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT);
PSBT=$(echo $RESULT | jq -r ".psbt");
echo $RESULT;

RESULT=$(lightning-cli signpsbt -k psbt="$PSBT");
PSBT=$(echo $RESULT | jq -r ".signed_psbt");
echo $RESULT;

lightning-cli splice_signed $CHANNEL_ID $PSBT
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.