I have a main node and a test node both running Core Lightning (v23.08rc1) with "experimental-splicing". They had about 100,000 sats on each side of the channel.
I then tried to add 100,000 sats to the main node side of the channel and it worked!
&
The channels are now: 211,220 sats (main) <=> 117,317 sats (test)
&
The tx of the splicing transaction is:
d6f6511be64dc6445af51d28098d7ecfa6c375c0e74f6410bc6a7953a114a1f1
&
This was achieved in the following manner:
&
Execute the Linux shell script splicing.sh
:
splicing.sh e6325356642fe5322456fe79412a9b6337abf7a7fd266f66649edcb4ad8ebd8b 100000
&
Where the first argument is the channel id, the second the 100,000 sats and splicing.sh
a shell script consisting of code I found in the documentation on splicing:
&
& CHANNEL_ID=$1
& SATS=$2
& sat="sat"
&
& RESULT=$(lightning-cli fundpsbt -k satoshi=$SATS$sat feerate=urgent startweight=800 excess_as_change=true)
& INITIALPSBT=$(echo $RESULT | jq -r ".psbt")
&
& RESULT=$(lightning-cli splice_init $CHANNEL_ID $SATS $INITIALPSBT)
& PSBT=$(echo $RESULT | jq -r ".psbt")
&
& RESULT="{\"commitments_secured\":false}"
& while [[ $(echo $RESULT | jq -r ".commitments_secured") == "false" ]]
& do
& & & RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT)
& & & PSBT=$(echo $RESULT | jq -r ".psbt")
& done
&
& RESULT=$(lightning-cli signpsbt -k psbt="$PSBT")
& PSBT=$(echo $RESULT | jq -r ".signed_psbt")
&
& lightning-cli splice_signed $CHANNEL_ID $PSBT
&
EDIT: yes, you don't have to close the channel although it was unreachable during the splicing process. The best way to see the advantage of splicing is that the number of sats on the other side of the channel (in this case the test node) remains the same (117,317 sats). If I had closed the channel and reopened it, all the sats would have been on one side of the channel (the main node). So:
211,220 sats (main) <=> 0 sats (test)
Of course it would have been possible to close and renegotiate the new balances but everything in one go is cheaper and easier.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments