<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-12-09&#xA;📝 Original message:&#xA;On Thu, Dec 09, 2021 at 12:34:00PM +1100, Lloyd Fournier wrote:&#xA;&gt; I wanted to add a theoretical note that you might be aware of. The final&#xA;&gt; message &#34;Bob -&gt; Alice: revoke_and_ack&#34; is not strictly necessary. Alice&#xA;&gt; does not care about Bob revoking a commit tx that gives her strictly more&#xA;&gt; coins.&#xA;&#xA;That&#39;s true if Alice is only sending new tx&#39;s paying Bob; and Rusty&#39;s&#xA;examples in the `option_simplified_update` proposal do only include new&#xA;HTLCs...&#xA;&#xA;But I think it&#39;s intended to cover *all* update messages, and if Alice is&#xA;also including any `update_fulfill_htlc` or `update_fail_htlc` messages in&#xA;the commitment, she&#39;s potentially gaining funds, both for the amount of&#xA;fees she saves by avoiding extra transactions, but for the fulfill case,&#xA;potentially also because she doesn&#39;t need to worry about the fulfilled&#xA;htlc reaching its timeout.&#xA;&#xA;Actually, as an alternative to the `option_simplified_update` approach,&#xA;has anyone considered an approach more like this:&#xA;&#xA; * each node can unilaterally send various messages that always update&#xA;   the state, eg:&#xA;     + new htlc/ptlc paying the other node (update_add_htlc)&#xA;     + secret reveal of htlc/ptlc paying self (update_fulfil_htlc)&#xA;     + rejection of htlc/ptlc paying self (update_fail_htlc)&#xA;     + timeout of htlc/ptlc paying the other node (not currently allowed?)&#xA;     + update the channel fee rate (update_fee)&#xA;&#xA; * continue to allow these to occur at any time, asynchronously, but&#xA;   to make it easier to keep track of them, add a uint64_t counter&#xA;   to each message, that each peer increments by 1 for each message.&#xA;&#xA; * each channel state (n) then corresponds to the accumulation of&#xA;   updates from each each peer, up to message (a) for Alice, and message&#xA;   (b) for Bob.&#xA;&#xA; * so when updating to a new commitment (n+1), the proposal message&#xA;   should just include both update values (a&#39;) and (b&#39;)&#xA;&#xA; * nodes can then track the state by having a list of&#xA;   htlcs/ptlcs/balances, etc for state (n), and a list of unapplied&#xA;   update messages for themselves and the other party (a+1,...,a&#39;) and&#xA;   (b+1,...,b&#39;), and apply them in order when constructing the new state&#xA;   (n+1) for a new commitment signing round&#xA;&#xA;I think that retains both the interesting async bits (anyone can queue&#xA;state updates immediately) but also makes it fairly simple to maintain&#xA;the state?&#xA;&#xA;&gt; Bob&#39;s new commit tx can use the same revocation key as the previous&#xA;&gt; one&#xA;&#xA;That&#39;s a neat idea, but I think the fail/fulfill messages break it.&#xA;_But_ I think that means it would still be an interesting technique to&#xA;use for fast forwards which get updated for every add message...&#xA;&#xA;&gt; Not sending messages you don&#39;t need to is usually&#xA;&gt; both more performant and simpler &#xA;&#xA;The extra message from Bob allows Alice to discard the adaptor sigs&#xA;associated with the old state, which I think is probably worthwhile&#xA;anyway?&#xA;&#xA;Cheers,&#xA;aj</html></oembed>