[Lightning-dev] Recovering a channel state

Anton Kumaigorodskiy anton.kumaigorodskiy at outlook.com
Fri Oct 21 13:52:48 UTC 2016


Mobile devices often get lost/stolen/data erased/etc so possibility of channel recovering or at least having an ability to break it unilaterally on a new device has to be somehow accounted for.

These are my thoughts so far:

1. The easiest one seems to be an ability to do a unilateral close: on new channel creation it's essential parameters (sufficient to establish an encrypted connection and send an `error` message) are recorded on some server and later retrieved in a case of need.

2. Ability to fully recover a latest channel state seems tricky: a server could be used to sync an entire state on each commit but in this case we'd have to trust a server to never provide an outdated snapshot (and attempt to use an outdated snapshot with a revoked commit is the worst possible scenario). Also once we lose a history of revoked transactions we'd have to completely rely on a chain watcher's honesty from here on (assuming we use a watcher which has to be a case on mobile device).

I was thinking maybe it is somehow possible to directly ask counterparty to provide us the latest channel state? Since counterparty has a mirrored view of our current state it should be fully reconstructible and we can check our own commit tx signature to make sure the snapshot is not completely made up (assuming commit and final keys are derived from a mnemonic code so we can always regenerate them). But once again there seems to be no way to check that snapshot supplied by counterparty is an unrevoked one because at this point we have neither a ShaChain nor a history of revoked commit transactions (we could probably ask a chain watcher if it has such a commit transaction but it once again involves trust).

I'd like to hear your thoughts whether it's possible to get a latest channel snapshot from counterparty in a trustless manner or if it's a good idea at all. If not then what about unilateral close in a way described above?

Anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20161021/ba8ed4ba/attachment.html>


More information about the Lightning-dev mailing list