Note: Please feel free to add comments to this document! (login with github)
Best starting point is Dusty Daemon's lightningsplice.com site.
What is Splicing?
Splicing can change the capacity of a channel, without closing it. It's possible to increase or decrease the capacity, by adding or removing some funds on-chain.
Why Splicing?
Splicing can be used for different goals. e.g.:
The main advantage is less on-chain operations (one instead of two in some use cases), but splicing also opens up new use cases (mentioned above).
The first implementation is/was in CLN, started by Dusty Daemon.
The splicing spec is quite mature, but not yet finalized. (bolts PR #863)
Core Lightning
CLN has released splicing implementation, experimental.
Released with 23.08
(Aug'23).
Eclair/Phoenix (Acinq)
Released, used in production, between their LSP node and the wallets. Not interoperable with other implementations.
(Versions: Lightning-kmp lib: version 1.5.0, Jul'23, Phoenix Android wallet release 2.0.0, Aug'23.)
It is work-in-progress, on the 2023 Roadmap.
Tracking issue: https://github.com/lightningdevkit/rust-lightning/issues/1621
23.08
.Warning: This prototype is experimental code, using it will likely result in some funds lost!
The current (splicing-hapa2
) prototype is a rudimentary splicing implementation in LDK, aimed to be the basis for the final implementation.
Some of the simplifying assumptions:
Repositories:
Please feel free to ask questions or give feedback:
Contains the splice proto: required messages, new API splice_channel
, and some events (e.g. SpliceAcked
), and also a step-by-step functional test.
Exposes the splice functionality, through a new splicein
command (splicein <channel_id> <peer_pubkey> <add_amt_satoshis>
). Works on an existing channel, and adds some more funds to it.
Currently not done, but it is planned to expose splicing functionality through ldk-node as well.
or alternatively you can use an existing LDK folder
Build it, simply with cargo build
You can try or look a splicing use case test: cargo test splic
ldk-sample
Cargo.toml
to point to locally built modified LDK.[dependencies]
replace the lightning...
lines:You need to do this for all lines (7 of them).
Build: cargo build
For running, you need a locally accessible Bitcoin Core node.
Run: cargo run <bitcoind-rpc-username>:<bitcoind-rpc-password>@<bitcoind-rpc-host>:<bitcoind-rpc-port> datadir1 19735 testnet
After startup, type help
command, you should see a splicein
command:
ldk-sample
instancesPrerequisites:
rust-lightning
); see above.ldk-sample
, using modifed LDK; see above.Steps
Start two shells (S1:
and S2:
indicate the shell):
Sample output: