chanbackup: pending force close channels not in backup file
Background
When you force close a channel of an lightning node not online its state come in the pending force close. The channel.backup file does not contain the pending force close channel
Your environment
- version of
lnd0.11.1-beta commit=v0.11.1-beta - which operating system (
uname -aon *Nix) Linux 5.10.9-201.fc33.x86_64 #1 SMP Wed Jan 20 16:56:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - version of
btcd,bitcoind, or other backend Bitcoin Core version v0.20.1 - any other relevant environment details n/a
Steps to reproduce
do a lncli closechannel --force on a channel of a node which is offline
Expected behaviour
channel.backup contains the channel in the pending force closed state
Actual behaviour
channel.backup does not contain the pending forced close channel
Should it contain the SCB? The channel has already been forced closed by your node. An SCB is only useful when the remote party force closes the channel. When your node force closes, it needs to go through a different path to recover the funds than if an SCB were used and the remote node closed their channel.
Thanks for sharing. I am in the middle of a emigration to a new country atm. Before i left i did a force close of all my channels. I trusted on restoring on a new node using the seed in combination with the channel.backup at the new address in other country. What a saw was a 45 byte channel.backup file. I fired up a new node with create restore the seed and the option specifying the channel.backup. This resulted in an empty node. Luckily I send also the raspberry pi with hd to my new home address. This shipment is still taking place. When the original node (raspian pi) arrives should I worry because I did already a restore on a fresh node? No new channels have been created. But I am worried because the network sees firing up the old node perhaps as an old backup. But maybe I am lucky because no transactions have been made with the new node? Hopefully you get my point. Anyway. I will let you know how it goes and close this ticket when needed.
a 45 byte channel.backup file
That is an empty backup file. The 45 bytes are just meta information and some encryption overhead. This means the new node you spun up definitely didn't have any channel state and therefore couldn't have compromised the channel funds. Also because you force-closed yourself from the latest state, there is no way for the other party to sweep the revocation path as they don't have the keys for that (because it was the latest state).
So you should be fine with just bringing up the old node once it arrives. It will sweep the funds as soon as the time locks have expired.
Thanks for clear that up! Only worry I have if the shipment arrives without any damage.
I close this ticket but let know how it went. thx
a 45 byte channel.backup file
That is an empty backup file. The 45 bytes are just meta information and some encryption overhead. This means the new node you spun up definitely didn't have any channel state and therefore couldn't have compromised the channel funds. Also because you force-closed yourself from the latest state, there is no way for the other party to sweep the revocation path as they don't have the keys for that (because it was the latest state).
So you should be fine with just bringing up the old node once it arrives. It will sweep the funds as soon as the time locks have expired.
As promised: Today i received my pi4 (yes this takes a lot of time here in Malta, receiving stuff). Everything went as you said. Sweep occurred. Took over six hours, but that is fine. Funds are rescued!
So happy.