<oembed><type>rich</type><version>1.0</version><author_name>npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_name><author_url>https://nostr.ae/npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-06-21&#xA;📝 Original message:&#xA;Hi Jeremy,&#xA;&#xA;The up-front costs can be further mitigated even without something like CTV&#xA;(which makes things more efficient) by adding a layer of in-direction w.r.t&#xA;how&#xA;HTLCs are manifested within the commitment transactions. To do this, we add&#xA;a&#xA;new 2-of-2 multi-sig output (an HTLC indirect block) to the commitment&#xA;transactions. This is then spent by a new transaction (the HTLC block) that&#xA;actually manifests (creates the HTLC outputs) the HTLCs.&#xA;&#xA;With this change, the cost to have a commitment be mined in the chain is now&#xA;_independent of the number of HTLCs in the channel_. In the past I&#39;ve called&#xA;this construction &#34;coupe commitments&#34; (lol).&#xA;&#xA;Other flavors of this technique are possible as well, allowing both sides to&#xA;craft varying HTLC indirection trees (double layers of indirection are&#xA;possible, etc) which may factor in traits like HTLC expiration time (HTLCs&#xA;that&#xA;expire later are further down in the tree).&#xA;&#xA;Something like CTV does indeed make this technique more powerful+efficient&#xA;as&#xA;it allows one to succinctly commit to all the relevant desirable&#xA;combinations&#xA;of HTLC indirect blocks, and HTLC fan-out transactions.&#xA;&#xA;-- Laolu&#xA;&#xA;&#xA;On Sat, Jun 20, 2020 at 4:14 PM Jeremy &lt;jlrubin at mit.edu&gt; wrote:&#xA;&#xA;&gt; I am not steeped enough in Lightning Protocol issues to get the full&#xA;&gt; design space, but I&#39;m fairly certain BIP-119 Congestion Control trees would&#xA;&gt; help with this issue.&#xA;&gt;&#xA;&gt; You can bucket a tree by doing a histogram of HTLC size, so that all small&#xA;&gt; HTLCs live in a common CTV subtree and don&#39;t interfere with higher value&#xA;&gt; HTLCs. You can also play with sequencing to prevent those HTLCs from&#xA;&gt; getting longchains in the mempool until they&#39;re above a certain value.&#xA;&gt; --&#xA;&gt; @JeremyRubin &lt;https://twitter.com/JeremyRubin&gt;&#xA;&gt; &lt;https://twitter.com/JeremyRubin&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; On Thu, Jun 18, 2020 at 1:41 AM Antoine Riard &lt;antoine.riard at gmail.com&gt;&#xA;&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Hi Rene,&#xA;&gt;&gt;&#xA;&gt;&gt; Thanks for disclosing this vulnerability,&#xA;&gt;&gt;&#xA;&gt;&gt; I think this blackmail scenario holds but sadly there is a lower scenario.&#xA;&gt;&gt;&#xA;&gt;&gt; Both &#34;Flood &amp; Loot&#34; and your blackmail attack rely on `update_fee`&#xA;&gt;&gt; mechanism and unbounded commitment transaction size inflation. Though the&#xA;&gt;&gt; first to provoke block congestion and yours to lockdown in-flight fees as&#xA;&gt;&gt; funds hostage situation.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 1. The current solution is to just not use up the max value of&#xA;&gt;&gt; htlc&#39;s. Eclaire and c-lightning by default only use up to 30 htlcs.&#xA;&gt;&gt;&#xA;&gt;&gt; As of today, yes I would recommend capping commitment size both for&#xA;&gt;&gt; ensuring competitive propagation/block selection and limiting HTLC exposure.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 2. Probably the best fix (not sure if I understand the consequences&#xA;&gt;&gt; correctly) is coming from this PR to bitcoin core (c.f.&#xA;&gt;&gt; https://github.com/bitcoin/bitcoin/pull/15681 by @TheBlueMatt . If I get&#xA;&gt;&gt; it correctly with that we could always have low fees and ask the person who&#xA;&gt;&gt; want to claim their outputs to pay fees. This excludes overpayment and&#xA;&gt;&gt; could happen at a later stage when fees are not spiked. Still the victim&#xA;&gt;&gt; who offered the htlcs would have to spend those outputs at some time.&#xA;&gt;&gt;&#xA;&gt;&gt; It&#39;s a bit more complex, carve-out output, even combined with anchor&#xA;&gt;&gt; output support on the LN-side won&#39;t protect against different flavors of&#xA;&gt;&gt; pinning. I invite you to go through logs of past 2 LN dev meetings.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 3. Don&#39;t overpay fees in commitment transactions. We can&#39;t foresee the&#xA;&gt;&gt; future anyway&#xA;&gt;&gt;&#xA;&gt;&gt; Once 2. is well-addressed we may deprecate `update_fee`.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 4. Don&#39;t add htlcs for which the on chain fee is higher than the HTLCs&#xA;&gt;&gt; value (like we do with sub dust amounts and sub satoshi amounts. This would&#xA;&gt;&gt; at least make the attack expensive as the attacker would have to bind a lot&#xA;&gt;&gt; of liquidity.&#xA;&gt;&gt;&#xA;&gt;&gt; Ideally we want dust_limit to be dynamic, dust cap should be based on&#xA;&gt;&gt; HTLC economic value, feerate of its output, feerate of HTLC-transaction,&#xA;&gt;&gt; feerate estimation of any CPFP to bump it. I think that&#39;s kind of worthy to&#xA;&gt;&gt; do once we solved 3. and 4&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 5. Somehow be able to aggregate htlc&#39;s. In a world where we use payment&#xA;&gt;&gt; points instead of preimages we might be able to do so. It would be really&#xA;&gt;&gt; cool if separate HTLC&#39;s could be combined to 1 single output. I played&#xA;&gt;&gt; around a little bit but I have not come up with a scheme that is more&#xA;&gt;&gt; compact in all cases. Thus I just threw in the idea.&#xA;&gt;&gt;&#xA;&gt;&gt; Yes we may encode all HTLC in some Taproot tree in the future. There are&#xA;&gt;&gt; some wrinkles but for a high-level theoretical construction see my post on&#xA;&gt;&gt; CoinPool.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; 6. Split onchain fees differently (now the attacker would also lose&#xA;&gt;&gt; fees by conducting this attack) - No I don&#39;t want to start yet another fee&#xA;&gt;&gt; bikeshadding debate. (In particular I believe that a different split of&#xA;&gt;&gt; fees might make the Flood &amp; Loot attack economically more viable which&#xA;&gt;&gt; relies on the same principle)&#xA;&gt;&gt;&#xA;&gt;&gt; Likely a bit more of fee bikeshedding is something we have to do to make&#xA;&gt;&gt; LN secure... Switching fee from pre-committed ones to a single-party,&#xA;&gt;&gt; dynamic one.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; Independently I think we should have a hint in our readme file about&#xA;&gt;&gt; where and how people can disclose attacks and vulnerabilities.&#xA;&gt;&gt; Implementations have this but the BOLTs do not.&#xA;&gt;&gt;&#xA;&gt;&gt; I 100% agree, that&#39;s exactly&#xA;&gt;&gt; https://github.com/lightningnetwork/lightning-rfc/pull/772, waiting for&#xA;&gt;&gt; your feedback :)&#xA;&gt;&gt;&#xA;&gt;&gt; Cheers,&#xA;&gt;&gt;&#xA;&gt;&gt; Antoine&#xA;&gt;&gt;&#xA;&gt;&gt; Le mer. 17 juin 2020 à 09:41, ZmnSCPxj via Lightning-dev &lt;&#xA;&gt;&gt; lightning-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Good morning all,&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt;&#xA;&gt;&gt;&gt; &gt; Fee futures could help against this.&#xA;&gt;&gt;&gt; &gt; I remember writing about this some time ago but cannot find where (not&#xA;&gt;&gt;&gt; sure if it was in lightning-dev or bitcoin-dev).&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; `harding` found it:&#xA;&gt;&gt;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-January/017601.html&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Regards,&#xA;&gt;&gt;&gt; ZmnSCPxj&#xA;&gt;&gt;&gt; _______________________________________________&#xA;&gt;&gt;&gt; Lightning-dev mailing list&#xA;&gt;&gt;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Lightning-dev mailing list&#xA;&gt;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200621/934a081d/attachment.html&gt;</html></oembed>