<oembed><type>rich</type><version>1.0</version><author_name>npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_name><author_url>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-04-20&#xA;📝 Original message:&#xA;Christian Decker &lt;decker.christian at gmail.com&gt; writes:&#xA;&gt; Rusty Russell &lt;rusty at rustcorp.com.au&gt; writes:&#xA;&gt;&gt;&gt; This is in stark contrast to the leader-based approach, where both&#xA;&gt;&gt;&gt; parties can just keep queuing updates without silent times to&#xA;&gt;&gt;&gt; transferring the token from one end to the other.&#xA;&gt;&gt;&#xA;&gt;&gt; You&#39;ve swayed me, but it needs new wire msgs to indicate &#34;these are&#xA;&gt;&gt; your proposals I&#39;m reflecting to you&#34;.&#xA;&gt;&gt;&#xA;&gt;&gt; OTOH they don&#39;t need to carry data, so we can probably just have:&#xA;&gt;&gt;&#xA;&gt;&gt; update_htlcs_ack:&#xA;&gt;&gt;    * [`channel_id`:`channel_id`]&#xA;&gt;&gt;    * [`u16`:`num_added`]&#xA;&gt;&gt;    * [`num_added*u64`:`added`]&#xA;&gt;&gt;    * [`u16`:`num_removed`]&#xA;&gt;&gt;    * [`num_removed*u64`:`removed`]&#xA;&gt;&gt;&#xA;&gt;&gt; update_fee can stay the same.&#xA;&gt;&gt;&#xA;&gt;&gt; Thoughts?&#xA;&gt;&#xA;&gt; So this would pretty much be a batch-ack, sent after a whole series of&#xA;&gt; changes were proposed to the leader, and referenced by their `htlc_id`,&#xA;&gt; correct? This is one optimization step further than what I was thinking,&#xA;&gt; but it can work. My proposal would have been to either reflect the whole&#xA;&gt; message (nodes need to remember proposals they&#39;ve sent anyway in case of&#xA;&gt; disconnects, so matching incoming changes with the pending ones should&#xA;&gt; not be too hard), or send back individual acks, containing the hash of&#xA;&gt; the message if we want to safe on bytes transferred. Alternatively we&#xA;&gt; could also use reference the change by its htlc_id.&#xA;&#xA;[ Following up on an old thread ]&#xA;&#xA;After consideration, I prefer alternation.  It fits better with the&#xA;existing implementations, and it is more optimal than reflection for&#xA;optimized implementations.&#xA;&#xA;In particular, you have a rule that says you can send updates and&#xA;commitment_signed when it&#39;s not your turn, and the leader either&#xA;responds with a &#34;giving way&#34; message, or ignores your changes and sends&#xA;its own.&#xA;&#xA;A simple implementation *never* sends a commitment_signed until it&#xA;receives &#34;giving way&#34; so it doesn&#39;t have to deal with orphaned&#xA;commitments.  A more complex implementation sends opportunistically and&#xA;then has to remember that it&#39;s committed if it loses the race.  Such an&#xA;implementation is only slower than the current system if that race&#xA;happens.&#xA;&#xA;I&#39;ve been revisiting this because it makes things like splicing easier:&#xA;the current draft requires stopping changes while splicing is being&#xA;negotiated, which is not entirely trivial.  With the simplified method,&#xA;you don&#39;t have to wait at all.&#xA;&#xA;Cheers,&#xA;Rusty.</html></oembed>