Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static channel backup: What does it do? #5439

Closed
SimonVrouwe opened this issue Jul 19, 2022 · 3 comments
Closed

Static channel backup: What does it do? #5439

SimonVrouwe opened this issue Jul 19, 2022 · 3 comments
Assignees

Comments

@SimonVrouwe
Copy link
Collaborator

I cannot find any documentation about the chanbackup plugin.

What does it do?
When should it be used?
What is the difference with the other backup methods?

Maybe an chapter can be added to BACKUP.md ?

@adi2011
Copy link
Collaborator

adi2011 commented Jul 25, 2022

Adding this PR #5361

@cdecker
Copy link
Member

cdecker commented Jul 28, 2022

The goal of the static channel backup (lnd chose this name) is to provide a recovery method of last resort. It contains a subset of the data in the DB for each channel that was active at the time the file was generated. This subset is sufficient for a recovering node to reach out to the peer, despite having lost all the DB data, and ask it nicely to close the channel, and then grab the funds from on-chain.

It is not really a backup because:

  1. Channels have to be closed in case of a recovery, there is no way you can continue using the channels. Real backups in LN-penalty have to be real-time backups, such as the backup.py plugin, which however has a whole slew of issues (backup not reachable? your node can't proceed)
  2. You are relying on the peer to be collaborative and close the channel when you ask it to and not to cheat. It could very well just replay an old state in which they had the majority of funds and you wouldn't be able to retaliate (remember: you lost your DB with the penalty transactions).

It is however a very good last resort option, recovering as many funds as possible, even if your peer might cheat you out of a part of the funds or attempt to blackmail you.

@ShahanaFarooqui
Copy link
Collaborator

Closing it as no further action is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants