<div dir="ltr"><div>Hi list,</div><div><br></div><div>I've been considering the problem of recovering lightning channels after losing channel state in a boating accident. The modern way of doing this seems to be "static channel backups" -- these are essentially lists of channel ids and the nodes you had the channels with.</div><div><br></div><div>The idea is that with this backup you can remember who you had channels with, connect to them and ask them to force close the channel (can someone link me the concrete protocol messages you send to do this?).<br></div><div><br></div><div>It occurred to me that if the lightning protocol were changed slightly you could do this without the channel backup at all. Consider the open channel message and its two fields `funding_pubkey` and `temporary_channel_id`. <br></div><div><br></div><div><a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#the-open_channel-message">https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#the-open_channel-message</a></div><div><br></div><div>The reason `temporary_channel_id` is necessarily "temporary" is because we don't know the other party's `funding_pubkey`. Instead I propose using deterministically randomized version of the node's static public key as the `funding_pubkey` so we know it up front. Specifically, when opening a channel with a remote node, do a Diffie-Hellman operation with their public key and use the resulting shared secret to deterministically produce scalars r1 and r2 and use 2-of-2(r1*G + P_local, r2*P_remote) as the script pubkey of funding output. Now we know what the funding output would look like with any node without interacting with them. Of course, to open multiple channels with the same node we would have to generate a new shared secret from each one by hashing a counter.<br></div><div><br></div><div>Now that we can figure out what our funding outputs with each node look like non-interactively, when we lose our channel state we can find them in the UTXO set as long as we can recreate a list of node's we may have had channels with. For most non-enterprise users (such as myself) this can be done automatically because we exclusively have channels with well known reliable public nodes whose public keys can be discovered through routing gossip or from public indexes. Therefore if I can just restore my node's keypair from my seed I should be able to scan the network for nodes and figure out if I have channels open with them and then carry out the recovery process. From my perspective this seems to be a rather nice improvement in user experience. <br></div><div><br></div><div>Thoughts?<br></div><div><br></div><div>Cheers,</div><div><br></div><div>LL<br></div></div>