<oembed><type>rich</type><version>1.0</version><title>Lloyd Fournier [ARCHIVE] wrote</title><author_name>Lloyd Fournier [ARCHIVE] (npub1kh…y05yp)</author_name><author_url>https://yabu.me/npub1khlhcuz0jrjwa0ayznq2q9agg4zvxfvx5x7jljrvwnpfzngrcf0q7y05yp</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-10-11&#xA;📝 Original message:&#xA;Hey aj,&#xA;&#xA;This is awesome work. My line of research on &#34;witness asymmetric channels&#34;&#xA;essentially ended up in a dead end because I couldn&#39;t see how they were&#xA;much better than naive PTLC lightning. The idea I really liked from it was&#xA;&#34;revocable signatures&#34;. I hoped someone would eventually figure out what to&#xA;do with them. Looks like you&#39;ve done that!&#xA;&#xA;I also didn&#39;t make the connection to how revocable signatures actually&#xA;solves the constant size storage problem. I knew it could make the protocol&#xA;in &#34;generalized payment channels&#34; [1] only require constant size which was&#xA;the target of the idea but I hadn&#39;t considered that lightning already&#xA;suffers from this problem so it can be applied more generally.&#xA;&#xA;The other big breakthrough you made is showing how you can do concurrent&#xA;non-interactive payment forwarding by using a refined version of Z&#39;s fast&#xA;forward idea. In my mind the most practical way to make FF work on&#xA;Poon-Dryja channels was to do it asymmetrically [3] but this meant that if&#xA;a payment was sent the other way you&#39;d have to do a 3 phase commit first.&#xA;With your idea as long as you have balance to spare in your balance output&#xA;you can always forward a payment in one message. A nice speed boost for&#xA;busy routing nodes.&#xA;&#xA;### Scorched earth punishment&#xA;&#xA;Another thing that I&#39;d like to mention is that using revocable signatures&#xA;enables scorched earth punishments [2]. The key you reveal when you post a&#xA;revoked state does not have to be limited to your channel -- it could be&#xA;used in multiple channels allowing the wronged party to take coins from all&#xA;their channels with the perpetrator. Furthermore, a lightning service&#xA;provider that offers channels with the same channel key to all their&#xA;customers is putting up all their coins in all their existing channels as&#xA;their good behaviour bond rather than just the coins they have in the&#xA;channels they have with you.&#xA;&#xA;For many users this will be sufficient to go without a &#34;watchtower&#34; to do&#xA;punishments for them. They know if the LSP takes their coins with a revoked&#xA;state whenever they come back online they can punish the LSP by revealing&#xA;their static channel key to everyone. They can even do this weeks or months&#xA;after the theft assuming the LSP is still operating with the same key.&#xA;&#xA;Some people feel this idea is too spicy but I prefer it to introducing a&#xA;trusted third party for people that cannot be online all the time.&#xA;&#xA;[1] https://eprint.iacr.org/2020/476.pdf&#xA;[2]&#xA;https://github.com/LLFourn/witness-asymmetric-channel#scorched-earth-punishments&#xA;[3]&#xA;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-June/003045.html&#xA;&#xA;Some queries below:&#xA;&#xA;On Sat, 9 Oct 2021 at 12:12, Anthony Towns &lt;aj at erisian.com.au&gt; wrote:&#xA;&#xA;&gt;&#xA;&gt; We will use &#34;i&#34; to represent the number of times a given inflight&#xA;&gt; transaction has been updated for the nth update to the balance&#xA;&gt; transaction.&#xA;&gt;&#xA;&gt; At any time Alice can update the inflight transaction spending her balance&#xA;&gt; to transfer funds towards Bob, either by updating the balances directly,&#xA;&gt; or adding a htlc/ptlc entry to conditionally transfer funds to Bob. (And&#xA;&gt; conversely for Bob)&#xA;&gt;&#xA;&gt; We will define RP=musig(A/2/n/i, RB2(n,i)).&#xA;&gt;&#xA;&gt; The inflight transaction spending Alice&#39;s balance can have multiple&#xA;&gt; types of outputs:&#xA;&gt;&#xA;&gt;  * Alice&#39;s remaining balance: pays directly to A/2/n/i&#xA;&gt;&#xA;&gt;  * Bob&#39;s remaining balances: pays to RP/2 with script path&#xA;&gt;    &#34;&lt;B/2/n/i&gt; CHECKSIGVERIFY &lt;D&gt; CSV&#34;&#xA;&gt;&#xA;&gt;  * An htlc paying to Bob: pays to RP/2/k with script paths:&#xA;&gt;    + &#34;LENGTH 32 EQUALVERIFY HASH160 &lt;X&gt; EQUALVERIFY &lt;B/2/n/i/k&gt;&#xA;&gt; CHECKSIGVERIFY &lt;A/2/n/i/k&gt; CHECKSIG&#34;&#xA;&gt;    + &#34;&lt;A/2/n/i/k/1&gt; CHECKSIGVERIFY &lt;T&gt; CLTV&#34;&#xA;&gt;&#xA;&gt;  * A ptlc paying to Bob: pays to RP/2/k with script paths:&#xA;&gt;    + &#34;&lt;B/2/n/i/k&gt; CHECKSIG NOTIF &lt;T&gt; CLTV DROP ENDIF &lt;A/2/n/i/k&gt; CHECKSIG&#34;&#xA;&gt;&#xA;&gt; Any outputs that would be zero or dust are not included.&#xA;&gt;&#xA;&gt; Note that we number each currently inflight transaction by &#34;k&#34;,&#xA;&gt; starting at 0. The same htlc/ptlc may have a different value for k&#xA;&gt; between different inflight transactions.&#xA;&gt;&#xA;&#xA;Can you expand on why &#34;k&#34; is needed in addition to &#34;n&#34; and &#34;i&#34;. k sounds&#xA;like the same thing as i to me.&#xA;&#xA;Also what does RP/2/k notation imply given the definition of RP you gave&#xA;above?&#xA;&#xA;&#xA;&gt;  * if the inflight transaction contains a ptlc output, then if Alice&#xA;&gt;    has not retained the old ptlc details (the point and the timeout)&#xA;&gt;    she will not trivially be able to reconstruct the script path,&#xA;&gt;    which includes the timeout. However, presuming the timeout was&#xA;&gt;    within 5000 blocks, then the only possible timeouts are the inflight&#xA;&gt;    tx&#39;s nlocktime+i with 0&lt;i&lt;=5000, and she will only need to calculate&#xA;&gt;    5000*k cases and match the corresponding scriptPubKeys to exhaustively&#xA;&gt;    enumerate every possible ptlc output, which should take under a minute,&#xA;&gt;    and be easily achievable. In addition, if Bob attempts to claim the&#xA;&gt;    funds, he will reveal the script path, and Alice will be either able&#xA;&gt;    to claim the inflight output directly or the layered output.&#xA;&gt;&#xA;&#xA;What about just doing a scriptless PTLC to avoid this (just CSV input of&#xA;presigned tx)? The cost is pre-sharing more nonces per PTLC message.&#xA;&#xA;This does not support option_static_remotekey, but compensates for that&#xA;&gt; by allowing balances to be recovered with only the channel setup data&#xA;&gt; even if all revocation data is lost.&#xA;&gt;&#xA;&#xA;This is rather big drawback but is this really the case? Can&#39;t &#34;in-flight&#34;&#xA;transactions send the balance of the remote party to their unencumbered&#xA;static remote key? Since there is no &#34;in-flight&#34; transaction just after you&#xA;create a new balance tx you can just sign a &#34;good will&#34; in-flight tx&#xA;whenever you create a new balance tx that sends all the coins to your&#xA;static key. Of course, your counterparty has no incentive to broadcast this&#xA;when they close the channel but we can just specify that as part of the&#xA;protocol you broadcast this anyway (even if it gives you nothing). It&#39;s no&#xA;skin off their back.&#xA;Ok so what about the fee for the &#34;good will&#34; tx? Well let&#39;s say it is a&#xA;special case and just pays for itself with a reasonable fee. The &#34;good&#xA;will&#34; tx is low time preference and can be CPFP easily if you haven&#39;t lost&#xA;your state. If you have lost your state then this is much better than&#xA;nothing.&#xA;&#xA;Cheers,&#xA;&#xA;LL&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211011/a619e4b8/attachment-0001.html&gt;</html></oembed>