<oembed><type>rich</type><version>1.0</version><title>ZmnSCPxj [ARCHIVE] wrote</title><author_name>ZmnSCPxj [ARCHIVE] (npub1g5…3ms3l)</author_name><author_url>https://yabu.me/npub1g5zswf6y48f7fy90jf3tlcuwdmjn8znhzaa4vkmtxaeskca8hpss23ms3l</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;Good morning t-bast,&#xA;&#xA;&#xA;&gt; I believe these new transactions may require an additional round-trip.&#xA;&gt; Let&#39;s take a very simple example, where we have one pending PTLC in each&#xA;&gt; direction: PTLC_AB was offered by A to B and PTLC_BA was offered by B to A.&#xA;&gt;&#xA;&gt; Now A makes some unrelated updates and wants to sign a new commitment.&#xA;&gt; A cannot immediately send her `commitment_signed` to B.&#xA;&gt; If she did, B would be able to broadcast this new commitment, and A would&#xA;&gt; not be able to claim PTLC_BA from B&#39;s new commitment (even if she knew&#xA;&gt; the payment secret) because she wouldn&#39;t have B&#39;s signature for the new&#xA;&gt; PTLC-remote-success transaction.&#xA;&gt;&#xA;&gt; So we first need B to send a new message `remote_ptlcs_signed` to A that&#xA;&gt; contains B&#39;s adaptor signatures for the PTLC-remote-success transactions&#xA;&gt; that would spend B&#39;s future commitment. After that A can safely send her&#xA;&gt; `commitment_signed`. Similarly, A must send `remote_ptlcs_signed` to B&#xA;&gt; before B can send its `commitment_signed`.&#xA;&gt;&#xA;&gt; It&#39;s actually not that bad, we&#39;re only adding one message in each direction,&#xA;&gt; and we&#39;re not adding more data (apart from nonces) to existing messages.&#xA;&gt;&#xA;&gt; If you have ideas on how to avoid this new message, I&#39;d be glad to hear&#xA;&gt; them, hopefully I missed something again and we can make it better!&#xA;&#xA;`SIGHASH_NONE | SIGHASH_NOINPUT` (which will take another what, four years?) or a similar &#34;covenant&#34; opcode, such as `OP_CHECKTEMPLATEVERIFY` without any commitments or an `OP_CHECKSIGFROMSTACK` on an empty message.&#xA;All you really need is a signature for an empty message, really...&#xA;&#xA;Alternately, fast-forwards, which avoid this because it does not change commitment transactions on the payment-forwarding path.&#xA;You only change commitment transactions once you have enough changes to justify collapsing them.&#xA;Even in the aj formulation, when A adds a PTLC it only changes the transaction that hosts **only** A-&gt;B PTLCs as well as the A main output, all of which can be sent outright by A without changing any B-&gt;A PTLCs.&#xA;&#xA;Basically... instead of a commitment tx like this:&#xA;&#xA;                        +-------+&#xA;    funding outpoint --&gt;|       |--&gt; A main&#xA;                        |       |--&gt; B main&#xA;                        |       |--&gt; A-&gt;B PTLC&#xA;                        |       |--&gt; B-&gt;A PTLC&#xA;                        +-------+&#xA;&#xA;We could do this instead:&#xA;&#xA;                        +-------+2of2  +-----+&#xA;    funding outpoint --&gt;|       |-----&gt;|     |--&gt; A main&#xA;                        |       |      |     |--&gt; A-&gt;B PTLC&#xA;                        |       |      +-----+&#xA;                        |       |2or2  +-----+&#xA;                        |       |-----&gt;|     |--&gt; B main&#xA;                        |       |      |     |--&gt; B-&gt;A PTLC&#xA;                        +-------+      +-----+&#xA;&#xA;Then whenever A wants to add a new A-&gt;B PTLC it only changes the tx inputs of the *other* A-&gt;B PTLCs without affecting the B-&gt;A PTLCs.&#xA;Payment forwarding is fast, and you only change the &#34;big&#34; commitment tx rarely to clean up claimed and failed PTLCs, moving the extra messages out of the forwarding hot path.&#xA;&#xA;But this is basically highly similar to what aj designed anyway, so...&#xA;&#xA;Regards,&#xA;ZmnSCPxj</html></oembed>