event icon indicating copy to clipboard operation
event copied to clipboard

Backup Delay During Channel Opening in Version 0.9.1 RC2

Open Perlover opened this issue 1 year ago • 3 comments

In version 0.9.1 RC2 (and likely in the final 0.9.1 release), I noticed that when opening an outgoing channel to a specific node, the backup process does not occur immediately as expected. Upon checking the "Disaster Recovery" section in the built-in node settings, I saw that the last backup date was from the previous day, despite the channel being in the process of opening.

In previous versions, the backup to the "Olympus" node would trigger right after starting the channel opening. However, now it seems to happen after the channel is fully opened. This creates a vulnerable period where, before the backup happens, the new channel is not restorable in case of failure.

It’s critical that the backup occurs before the channel opening to avoid this gap in recovery. This behavior appears to be a bug, potentially leaving the system at risk during the channel setup process.

Perlover avatar Oct 14 '24 20:10 Perlover

I don't believe the code has changed here. Will investigate.

kaloudis avatar Oct 14 '24 20:10 kaloudis

You mention a delay, does the backup eventually trigger? @Perlover

kaloudis avatar Oct 14 '24 20:10 kaloudis

I opened a channel, then went into the settings. After that, I waited, went back and forth, and checked again a few minutes later. The backup date still showed yesterday’s backup, so I manually pressed the button to copy the backup to the Olympus servers. I’m not sure if a backup would have been made once the channel was fully opened, but in previous versions like 0.8.0 and earlier, I noticed that the backup date updated immediately after initiating the channel opening.

Perlover avatar Oct 14 '24 21:10 Perlover

Here are the list of event types: https://lightning.engineering/api-docs/api/lnd/lightning/subscribe-channel-events/index.html#lnrpcchanneleventupdate

Here are the ones that trigger events in our code: https://github.com/ZeusLN/zeus/blob/master/stores/ChannelBackupStore.ts#L342

We might want to add pending_open_channel to the list

kaloudis avatar Oct 26 '24 14:10 kaloudis