7

If my lightning node crashes after receiving payments (but before I have closed the channel) can I recover my funds? What happens if I do not have backups of all the channel updates?

Is the restoration process fundamentally different from dealing with on-chain Bitcoin?

2

Unlike bitcoin stored in an on-chain wallet, funds in the lightning network are stateful. Some channel data cannot be deterministically reconstructed like keys derived from a BIP32 seed. If you do not have backups and your channel counterparty is non-responsive, you will likely experience permanent loss of funds. Make sure to have backups of your channel data made with each additional transaction you send/receive/route to other nodes in the network.

If a node falls down and loses critical state data it is important not to broadcast commitment transactions from old backups. If these commitment transactions have been revoked, the channel counterparty will submit a justice transaction to the network and claim all of the funds in the channel.

This failure scenario can be partially mitigated by nodes that use option_data_loss_protect as specified in BOLT 2. This allows a node to detect that it has fallen behind when reestablishing its connection. This only works when both nodes support this feature and the node that has not fallen behind is honest. If the honest node detects its counterparty has fallen out of sync, it should unilaterally close the channel and the fallen-behind node can then reclaim its funds with data it received on connection reestablishment (my_current_commitment_point).

In the future, state backups can be outsourced to 3rd parties on-the-fly, such that if a node falls down it can call on these 3rd parties to provide the necessary data for channel reconstruction. It has been proposed that Watchtowers - nodes that can be compensated to monitor channels for bad behavior - could also be tasked with storing encrypted state backups.

If you do have a backup you can restore it and reestablish connections with your peers and get back to business!

  • I believe Selfishminer is referring to Bolt 2, not Bolt 12. Bolt 12 doesn't exist (11 is the last BOLT). – paul rozehnal May 1 at 18:32
  • @paulrozehnal: You can suggest an edit! – Murch May 1 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.