<oembed><type>rich</type><version>1.0</version><author_name>npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_name><author_url>https://nostr.ae/npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-07-12&#xA;📝 Original message:&#xA;Hello world,&#xA;&#xA;Suppose you have some payments going from Alice to Bob to Carol with&#xA;eltoo channels. Bob&#39;s lightning node crashes, and he recovers from an&#xA;old backup, and Alice and Carol end up dropping newer channel states&#xA;onto the blockchain.&#xA;&#xA;Suppose the timeout for the payments is a few hours away, while the&#xA;channels have specified a week long CSV delay to rectify any problems&#xA;on-chain.&#xA;&#xA;Then I think that that means that:&#xA;&#xA; 1) Carol will reveal the point preimages on-chain via adaptor&#xA;    signatures, but Bob won&#39;t be able to decode those adaptor signatures&#xA;    because those signatures will need to change for each state&#xA;&#xA; 2) Even if Bob knows the point preimages, he won&#39;t be able to&#xA;    claim the PTLC payments on-chain, for the same reason: he needs&#xA;    newer adaptor signatures that he&#39;ll have lost with the state update&#xA;&#xA; 3) For any payments that timeout, Carol doesn&#39;t have any particular&#xA;    incentive to make it easy for Bob to claim the refund, and Bob won&#39;t&#xA;    have the adaptor signatures for the latest state to do so&#xA;&#xA; 4) But Alice will be able to claim refunds easily. This is working how&#xA;    it&#39;s meant to, at least!&#xA;&#xA;I think you could fix (3) by giving Carol (who does have all the adaptor&#xA;signatures for the latest state) the ability to steal funds that are&#xA;meant to have been refunded, provided she gives Bob the option of claiming&#xA;them first.&#xA;&#xA;However fixing (1) and (2) aren&#39;t really going against Alice or Carol&#39;s&#xA;interests, so maybe you can just ask: Carol loses nothing by allowing&#xA;Bob to claim funds from Alice; and Alice has already indicated that&#xA;knowing P is worth more to her than the PTLC&#39;s funds -- otherwise she&#xA;wouldn&#39;t have forwarded the PTLC to Bob in the first place.&#xA;&#xA;Likewise, everyone&#39;s probably incentivised to negotiate cooperative&#xA;closes instead of going on-chain -- better privacy, less fees, and less&#xA;delay before the funds can be used elsewhere.&#xA;&#xA;FWIW, I think a similar flaw exists even in the original eltoo spec --&#xA;Alice could simply decline to publish the settlement transaction until&#xA;the timeout has been reached, preventing Bob from revealing the HTLC&#xA;preimage before Alice can claim the refund.&#xA;&#xA;So I think that adds up to:&#xA;&#xA; a) Nodes should share state on reconnection; if you find a node that&#xA;    doesn&#39;t do this, close the channel and put the node on your enemies&#xA;    list. If you disagree on what the current state is, share your most&#xA;    recent state, and if the other guy&#39;s state is more recent, and all&#xA;    the signatures verify, update your state to match theirs.&#xA;&#xA; b) Always negotiate a mutual/cooperative close if possible, to avoid&#xA;    actually using the eltoo protocol on-chain.&#xA;&#xA; c) If you want to allow continuing the channel after restoring an old&#xA;    state from backup, set the channel state index based on the real time,&#xA;    eg (real_time-start_time)*(max_updates_per_second). That way your&#xA;    first update after a restore from backup will ensure that any old&#xA;    states that your channel partner may not have told you about are&#xA;    invalidated.&#xA;&#xA; d) Accept that if you lose connectivity to a channel partner, you will&#xA;    have to pay any PTLCs that were going to them, and won&#39;t be able&#xA;    to claim the PTLCs that were funding them. Perhaps limit the total&#xA;    value of inbound PTLCs for forwarding that you&#39;re willing to accept&#xA;    at any one itme?&#xA;&#xA;Also, layered commitments seem like they make channel factories&#xA;complicated too. Nobody came up with a way to avoid layered commitments&#xA;while I wasn&#39;t watching did they?&#xA;&#xA;Cheers,&#xA;aj</html></oembed>