<oembed><type>rich</type><version>1.0</version><title>Bastien TEINTURIER [ARCHIVE] wrote</title><author_name>Bastien TEINTURIER [ARCHIVE] (npub17f…ntr0s)</author_name><author_url>https://yabu.me/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-12-07&#xA;📝 Original message:&#xA;Hi Z, Lloyd,&#xA;&#xA;Let&#39;s ignore the musig nonce exchanges for now. I believe these can be&#xA;easily included in existing messages: they probably aren&#39;t the reason we&#xA;need more round-trips (at least not the one I&#39;m concerned about for now).&#xA;&#xA;Basically, if my memory and understanding are accurate, in the above,&#xA;&gt; it is the *PTLC-offerrer* which provides an adaptor signature.&#xA;&gt; That adaptor signature would be included in the `update_add_ptlc` message.&#xA;&#xA;&#xA;Neat, you&#39;re completely right, I didn&#39;t realize that the adaptor signature&#xA;could be completed by the other party, this is a great property I had&#xA;missed.&#xA;Thanks for pointing it out, it does simplify the protocol a lot!&#xA;&#xA;I don&#39;t think you can include it in `update_add_ptlc` though, it has to&#xA;be in `commitment_signed`, because if you do a batch of updates before&#xA;signing, you would immediately invalidate the adaptor signatures you&#xA;previously sent.&#xA;&#xA;But it would be a simple change, where the signatures in `commitment_signed`&#xA;would actually be adaptor signatures for PTLC-success transactions and&#xA;normal signatures for PTLC-timeout transactions.&#xA;&#xA;Isn&#39;t it the case that all previous PTLC adaptor signatures need to be&#xA;&gt; re-sent for each update_add_ptlc message because the signatures would&#xA;&gt; no longer be valid once the commit tx changes&#xA;&#xA;&#xA;Yes indeed, whenever the commitment changes, peers need to create new&#xA;signatures and adaptor signatures for all pending PTLCs.&#xA;&#xA;This is completely fine for PTLC-success and PTLC-timeout transactions,&#xA;but we also need to exchange signatures for the new pre-signed transactions&#xA;that spend a PTLC from the remote commitment. Let&#39;s call this new pre-signed&#xA;transaction PTLC-remote-success (not a great name).&#xA;&#xA;I believe these new transactions may require an additional round-trip.&#xA;Let&#39;s take a very simple example, where we have one pending PTLC in each&#xA;direction: PTLC_AB was offered by A to B and PTLC_BA was offered by B to A.&#xA;&#xA;Now A makes some unrelated updates and wants to sign a new commitment.&#xA;A cannot immediately send her `commitment_signed` to B.&#xA;If she did, B would be able to broadcast this new commitment, and A would&#xA;not be able to claim PTLC_BA from B&#39;s new commitment (even if she knew&#xA;the payment secret) because she wouldn&#39;t have B&#39;s signature for the new&#xA;PTLC-remote-success transaction.&#xA;&#xA;So we first need B to send a new message `remote_ptlcs_signed` to A that&#xA;contains B&#39;s adaptor signatures for the PTLC-remote-success transactions&#xA;that would spend B&#39;s future commitment. After that A can safely send her&#xA;`commitment_signed`. Similarly, A must send `remote_ptlcs_signed` to B&#xA;before B can send its `commitment_signed`.&#xA;&#xA;It&#39;s actually not that bad, we&#39;re only adding one message in each direction,&#xA;and we&#39;re not adding more data (apart from nonces) to existing messages.&#xA;&#xA;If you have ideas on how to avoid this new message, I&#39;d be glad to hear&#xA;them, hopefully I missed something again and we can make it better!&#xA;&#xA;Thanks,&#xA;Bastien&#xA;&#xA;Le mar. 7 déc. 2021 à 09:04, ZmnSCPxj &lt;ZmnSCPxj at protonmail.com&gt; a écrit :&#xA;&#xA;&gt; Good morning LL, and t-bast,&#xA;&gt;&#xA;&gt; &gt; &gt; Basically, if my memory and understanding are accurate, in the above,&#xA;&gt; it is the *PTLC-offerrer* which provides an adaptor signature.&#xA;&gt; &gt; &gt; That adaptor signature would be included in the `update_add_ptlc`&#xA;&gt; message.&#xA;&gt; &gt;&#xA;&gt; &gt; Isn&#39;t it the case that all previous PTLC adaptor signatures need to be&#xA;&gt; re-sent for each update_add_ptlc message because the signatures would no&#xA;&gt; longer be valid once the commit tx changes. I think it&#39;s better to put it&#xA;&gt; in `commitment_signed` if possible. This is what is done with pre-signed&#xA;&gt; HTLC signatures at the moment anyway.&#xA;&gt;&#xA;&gt; Agreed.&#xA;&gt;&#xA;&gt; This is also avoided by fast-forwards, BTW, simply because fast-forwards&#xA;&gt; delay the change of the commitment tx.&#xA;&gt; It is another reason to consider fast-forwards, too....&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211207/55feef47/attachment.html&gt;</html></oembed>