Managed to add 100,000 sats to a channel between 2 of my lightning nodes via splicing!

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



Submitted August 08, 2023 at 03:46AM by vanmarcel https://ift.tt/QOaW9Uy

Comments

Popular posts from this blog

Coinmarketcap are listing BCH sites as BTC

15 years of BTC Power Law