If this is true, which is appears to be, then this is a pretty serious problem with LN. To me, this would indicate that hardware failing, or a DB getting corrupted would essentially mean that all money within all open LN channels will be lost, as you cannot backup a LN wallet until after the fact, unlike with most wallet implementations in which you can backup private keys prior to receiving funds.
While it's true that channel states are obviously not deterministic and thus can't be backed up once via a mnemonic seed phrase like bitcoin private keys, the funds in the channel aren't irrevocably lost; the user can always close the
channel unilaterally once the CSV timeout on the transaction has elapsed.
Unless I am missing something, I don't think that is right. Consider this scenario:
"A" and "B" open a channel and engage in several transactions. If immidiately after the most recent transaction, "transaction
n", "B" losses all data associated with his LN wallet, and was unable to backup his data after "transaction
n", then he will have insufficient information available to close the channel without risking all of his funds (with near certainty of loss). Remember that "B" does not have the current state of the channel.
If "B" tries to close the channel, he must do so using an old state, and attempting to use this would result in "A" being able to claim all funds in the channel.
Sure, you might argue LN worked exactly as designed, however I would say the design is flawed.
The design of the protocol isn't flawed; broadcasting stale channel states
should be punishable or else nothing stops a peer from trying to cheat by broadcasting old channel states.
What ever caused the peer to broadcast an old channel state, be it dishonesty or error, is not the problem of the protocol.
I agree it is necessary to give incentives not to "cheat" within the protocol, however as it stands now, there will be too many false positives, and displaying these false positives is unavoidable every so often.
Sure, if you do things like leave cash on the ground on the street, or send bitcoin to an incorrect address, that money is gone forever, however there are things users can do in order to protect against this, including things like the checksum in Bitcoin addresses.
There should be a better way of storing/preserving old channel states that survives a hard disk crash or similar.
That design could be improved, but then again, Rome wasn't built in a day.
Agreed.
Back in the day, you had to backup Bitcoin-Qt after every transaction.
I don't think this is right. My understanding is that Bitcoin Core/QT would pre-generate 100 addresses in advance, so you could backup your wallet and the backup would contain the next 100 addresses you would receive bitcoin to.