<oembed><type>rich</type><version>1.0</version><title>Anthony Towns [ARCHIVE] wrote</title><author_name>Anthony Towns [ARCHIVE] (npub17r…x9l2h)</author_name><author_url>https://yabu.me/npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-12-08&#xA;📝 Original message:&#xA;On Tue, Dec 07, 2021 at 11:52:04PM +0000, ZmnSCPxj via Lightning-dev wrote:&#xA;&gt; Alternately, fast-forwards, which avoid this because it does not change commitment transactions on the payment-forwarding path.&#xA;&gt; You only change commitment transactions once you have enough changes to justify collapsing them.&#xA;&#xA;I think the problem t-bast describes comes up here as well when you&#xA;collapse the fast-forwards (or, anytime you update the commitment&#xA;transaction even if you don&#39;t collapse them).&#xA;&#xA;That is, if you have two PTLCs, one from A-&gt;B conditional on X, one&#xA;from B-&gt;A conditional on Y. Then if A wants to update the commitment tx,&#xA;she needs to&#xA;&#xA;  1) produce a signature to give to B to spend the funding tx&#xA;  2) produce an adaptor signature to authorise B to spend via X from his&#xA;     commitment tx&#xA;  3) produce a signature to allow B to recover Y after timeout from his&#xA;     commitment tx spending to an output she can claim if he cheats&#xA;  4) *receive* an adaptor signature from B to be able to spend the Y output&#xA;     if B posts his commitment tx using A&#39;s signature in (1)&#xA;&#xA;The problem is, she can&#39;t give B the result of (1) until she&#39;s received&#xA;(4) from B.&#xA;&#xA;It doesn&#39;t matter if the B-&gt;A PTLC conditional on Y is in the commitment&#xA;tx itself or within a fast-forward child-transaction -- any previous&#xA;adaptor sig will be invalidated because there&#39;s a new commitment&#xA;transaction, and if you allowed any way of spending without an adaptor&#xA;sig, B wouldn&#39;t be able to recover the secret and would lose funds.&#xA;&#xA;It also doesn&#39;t matter if the commitment transaction that A and B will&#xA;publish is the same or different, only that it&#39;s different from the&#xA;commitment tx that previous adaptor sigs committed to. (So ANYPREVOUT&#xA;would fix this if it were available)&#xA;&#xA;So I think this is still a relevant question, even if fast-forwards&#xA;make it a rare problem, that perhaps is only applicable to very heavily&#xA;used channels.&#xA;&#xA;(I said the following in email to t-bast already)&#xA;&#xA;I think doing a synchronous update of commitments to the channel state,&#xA;something like:&#xA;&#xA;   Alice -&gt; Bob: propose_new_commitment&#xA;       channel id&#xA;       adaptor sigs for PTLCs to Bob&#xA;&#xA;   Bob -&gt; Alice: agree_new_commitment&#xA;       channel id&#xA;       adaptor sigs for PTLCs to Alice&#xA;       sigs for Alice to spend HTLCs and PTLCs to Bob from her own&#xA;         commitment tx&#xA;       signature for Alice to spend funding tx&#xA;&#xA;   Alice -&gt; Bob: finish_new_commitment_1&#xA;       channel id&#xA;       sigs for Bob to spend HTLCs and PTLCs to Alice from his own&#xA;         commitment tx&#xA;       signature for Bob to spend funding tx&#xA;       reveal old prior commitment secret&#xA;       new commitment nonce&#xA;&#xA;   Bob -&gt; Alice: finish_new_commitment_2&#xA;       reveal old prior commitment secret&#xA;       new commitment nonce&#xA;&#xA;would work pretty well.&#xA;&#xA;This adds half a round-trip compared to now:&#xA;&#xA;   Alice -&gt; Bob: commitment_signed&#xA;   Bob -&gt; Alice: revoke_and_ack, commitment_signed&#xA;   Alice -&gt; Bob: revoke_and_ack&#xA;&#xA;The timings change like so:&#xA;&#xA;  Bob can use the new commitment after 1.5 round-trips (previously 0.5)&#xA;&#xA;  Alice can be sure Bob won&#39;t use the old commitment after 2 round-trips&#xA;  (previously 1)&#xA;&#xA;  Alice can use the new commitment after 1 round-trip (unchanged)&#xA;&#xA;  Bob can be sure Alice won&#39;t use the old commitment after 1.5 round-trips&#xA;  (unchanged -- note: this is what&#39;s relevant for forwarding)&#xA;&#xA;Making the funding tx a musig setup would mean also supplying 64B&#xA;of musig2 nonces along with the &#34;adaptor sigs&#34; in one direction,&#xA;and providing the other side&#39;s 64B of musig2 nonces back along with the&#xA;(now partial) signature for spending the funding tx (a total of 256B of&#xA;nonce data, not 128B).&#xA;&#xA;Because it keeps both peers&#39; commitments synchronised to a single channel&#xA;state, I think the same protocol should work fine with the revocable&#xA;signatures on a single tx approach too, though I haven&#39;t tried working&#xA;through the details.&#xA;&#xA;Fast forwards would then be reducing the 2 round-trip protocol to&#xA;update the state commitment to a 0.5 round-trip update, to reduce&#xA;latency when forwarding by the same amount as before (1.5 round-trips&#xA;to 0.5 round-trips).&#xA;&#xA;Cheers,&#xA;aj</html></oembed>