<oembed><type>rich</type><version>1.0</version><author_name>npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_name><author_url>https://nostr.ae/npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-07-14&#xA;📝 Original message:&#xA;Not quite sure if this issue is unique to eltoo tbh. While in LN-penalty&#xA;loss-of-state equates to loss-of-funds, in eltoo this is reduced to&#xA;impact only funds that are in a PTLC at the time of the loss-of-state.&#xA;&#xA;We have a couple of options here, that don&#39;t touch the blockchain, and&#xA;are therefore rather lightweight:&#xA;&#xA; 1) Do nothing and keep the incentive to keep up to date backups. It&#xA; still is a reduction in risk w.r.t. LN-penalty, since this is just an&#xA; append only log of secrets, and old secrets don&#39;t harm you like&#xA; attempting to close with an old commitment would.&#xA; 2) Use the peer-storage idea, where we deposit an encrypted bundle with&#xA; our peers, and which we expect the peers to return. by hiding the fact&#xA; that we forgot some state, until the data has been exchanged we can&#xA; ensure that peers always return the latest snapshot of whatever we gave&#xA; them.&#xA;&#xA;The latter is the encrypted-blob idea that Rusty has been proposing for&#xA;a while now.&#xA;&#xA;Cheers,&#xA;Christian&#xA;&#xA;Anthony Towns &lt;aj at erisian.com.au&gt; writes:&#xA;&gt; Hello world,&#xA;&gt;&#xA;&gt; Suppose you have some payments going from Alice to Bob to Carol with&#xA;&gt; eltoo channels. Bob&#39;s lightning node crashes, and he recovers from an&#xA;&gt; old backup, and Alice and Carol end up dropping newer channel states&#xA;&gt; onto the blockchain.&#xA;&gt;&#xA;&gt; Suppose the timeout for the payments is a few hours away, while the&#xA;&gt; channels have specified a week long CSV delay to rectify any problems&#xA;&gt; on-chain.&#xA;&gt;&#xA;&gt; Then I think that that means that:&#xA;&gt;&#xA;&gt;  1) Carol will reveal the point preimages on-chain via adaptor&#xA;&gt;     signatures, but Bob won&#39;t be able to decode those adaptor signatures&#xA;&gt;     because those signatures will need to change for each state&#xA;&gt;&#xA;&gt;  2) Even if Bob knows the point preimages, he won&#39;t be able to&#xA;&gt;     claim the PTLC payments on-chain, for the same reason: he needs&#xA;&gt;     newer adaptor signatures that he&#39;ll have lost with the state update&#xA;&gt;&#xA;&gt;  3) For any payments that timeout, Carol doesn&#39;t have any particular&#xA;&gt;     incentive to make it easy for Bob to claim the refund, and Bob won&#39;t&#xA;&gt;     have the adaptor signatures for the latest state to do so&#xA;&gt;&#xA;&gt;  4) But Alice will be able to claim refunds easily. This is working how&#xA;&gt;     it&#39;s meant to, at least!&#xA;&gt;&#xA;&gt; I think you could fix (3) by giving Carol (who does have all the adaptor&#xA;&gt; signatures for the latest state) the ability to steal funds that are&#xA;&gt; meant to have been refunded, provided she gives Bob the option of claiming&#xA;&gt; them first.&#xA;&gt;&#xA;&gt; However fixing (1) and (2) aren&#39;t really going against Alice or Carol&#39;s&#xA;&gt; interests, so maybe you can just ask: Carol loses nothing by allowing&#xA;&gt; Bob to claim funds from Alice; and Alice has already indicated that&#xA;&gt; knowing P is worth more to her than the PTLC&#39;s funds -- otherwise she&#xA;&gt; wouldn&#39;t have forwarded the PTLC to Bob in the first place.&#xA;&gt;&#xA;&gt; Likewise, everyone&#39;s probably incentivised to negotiate cooperative&#xA;&gt; closes instead of going on-chain -- better privacy, less fees, and less&#xA;&gt; delay before the funds can be used elsewhere.&#xA;&gt;&#xA;&gt; FWIW, I think a similar flaw exists even in the original eltoo spec --&#xA;&gt; Alice could simply decline to publish the settlement transaction until&#xA;&gt; the timeout has been reached, preventing Bob from revealing the HTLC&#xA;&gt; preimage before Alice can claim the refund.&#xA;&gt;&#xA;&gt; So I think that adds up to:&#xA;&gt;&#xA;&gt;  a) Nodes should share state on reconnection; if you find a node that&#xA;&gt;     doesn&#39;t do this, close the channel and put the node on your enemies&#xA;&gt;     list. If you disagree on what the current state is, share your most&#xA;&gt;     recent state, and if the other guy&#39;s state is more recent, and all&#xA;&gt;     the signatures verify, update your state to match theirs.&#xA;&gt;&#xA;&gt;  b) Always negotiate a mutual/cooperative close if possible, to avoid&#xA;&gt;     actually using the eltoo protocol on-chain.&#xA;&gt;&#xA;&gt;  c) If you want to allow continuing the channel after restoring an old&#xA;&gt;     state from backup, set the channel state index based on the real time,&#xA;&gt;     eg (real_time-start_time)*(max_updates_per_second). That way your&#xA;&gt;     first update after a restore from backup will ensure that any old&#xA;&gt;     states that your channel partner may not have told you about are&#xA;&gt;     invalidated.&#xA;&gt;&#xA;&gt;  d) Accept that if you lose connectivity to a channel partner, you will&#xA;&gt;     have to pay any PTLCs that were going to them, and won&#39;t be able&#xA;&gt;     to claim the PTLCs that were funding them. Perhaps limit the total&#xA;&gt;     value of inbound PTLCs for forwarding that you&#39;re willing to accept&#xA;&gt;     at any one itme?&#xA;&gt;&#xA;&gt; Also, layered commitments seem like they make channel factories&#xA;&gt; complicated too. Nobody came up with a way to avoid layered commitments&#xA;&gt; while I wasn&#39;t watching did they?&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; aj&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev</html></oembed>