<oembed><type>rich</type><version>1.0</version><author_name>npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_name><author_url>https://nostr.ae/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-06-19&#xA;📝 Original message:&#xA;Good morning list,&#xA;&#xA;Sorry for being (very) late to the party on that subject, but better late&#xA;than never.&#xA;&#xA;A lot of ideas have been thrown at the problem and are scattered across&#xA;emails, IRC discussions,&#xA;and github issues. I&#39;ve spent some time putting it all together in one&#xA;gist, hoping that it will&#xA;help stir the discussion forward as well as give newcomers all the&#xA;background they need to ramp up&#xA;on this issue and join the discussion, bringing new ideas to the table.&#xA;&#xA;The gist is here, and I&#39;d appreciate your feedback if I have wrongly&#xA;interpreted some of the ideas:&#xA;https://gist.github.com/t-bast/22320336e0816ca5578fdca4ad824d12&#xA;&#xA;Readers of this list can probably directly skip to the &#34;Future work&#34;&#xA;section. I believe my&#xA;&#34;alternative proposal&#34; should loosely reflect Matt&#39;s proposal from the very&#xA;first mail of this&#xA;thread; note that I included anchors and new txs only in some places, as I&#xA;think they aren&#39;t&#xA;necessary everywhere.&#xA;&#xA;My current state-of-mind (subject to change as I discover more potential&#xA;attacks) is that:&#xA;&#xA;* The proposal to add more anchors and pre-signed txs adds non-negligible&#xA;complexity and hurts&#xA;small HTLCs, so it would be better if we didn&#39;t need it&#xA;* The blind CPFP carve-out trick is a one shot, so you&#39;ll likely need to&#xA;pay a lot of fees for it&#xA;to work which still makes you lose money in case an attacker targets you&#xA;(but the money goes to&#xA;miners, not to the attacker - unless he is the miner). It&#39;s potentially&#xA;hard to estimate what fee&#xA;you should put into that blind CPFP carve-out because you have no idea what&#xA;the current fee of the&#xA;pinned success transaction package is, so it&#39;s unsure if that solution will&#xA;really work in practice&#xA;* If we take a step back, the only attack we need to protect against is an&#xA;attacker pinning a&#xA;preimage transaction while preventing us from learning that preimage for at&#xA;least `N` blocks&#xA;(see the gist for the complete explanation). Please correct me if that&#xA;claim is incorrect as it&#xA;will invalidate my conclusion! Thus if we have:&#xA;* a high enough `cltv_expiry_delta`&#xA;* [off-chain preimage broadcast](&#xA;https://github.com/lightningnetwork/lightning-rfc/issues/783)&#xA;(or David&#39;s proposal to do it by sending txs that can be redeemed via only&#xA;the preimage)&#xA;* LN hubs (or any party commercially investing in running a lightning node)&#xA;participating in&#xA;various mining pools to help discover preimages&#xA;* decent mitigations for eclipse attacks&#xA;* then the official anchor outputs proposal should be safe enough and is&#xA;much simpler?&#xA;&#xA;Thank you for reading, I hope the work I put into this gist will be useful&#xA;for some of you.&#xA;&#xA;Bastien&#xA;&#xA;Le ven. 24 avr. 2020 à 00:47, Matt Corallo via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&#xA;&gt;&#xA;&gt;&#xA;&gt; On 4/23/20 8:46 AM, ZmnSCPxj wrote:&#xA;&gt; &gt;&gt;&gt; -   Miners, being economically rational, accept this proposal and&#xA;&gt; include this in a block.&#xA;&gt; &gt;&gt;&gt;&#xA;&gt; &gt;&gt;&gt; The proposal by Matt is then:&#xA;&gt; &gt;&gt;&gt;&#xA;&gt; &gt;&gt;&gt; -   The hashlock branch should instead be:&#xA;&gt; &gt;&gt;&gt; -   B and C must agree, and show the preimage of some hash H (hashlock&#xA;&gt; branch).&#xA;&gt; &gt;&gt;&gt; -   Then B and C agree that B provides a signature spending the&#xA;&gt; hashlock branch, to a transaction with the outputs:&#xA;&gt; &gt;&gt;&gt; -   Normal payment to C.&#xA;&gt; &gt;&gt;&gt; -   Hook output to B, which B can use to CPFP this transaction.&#xA;&gt; &gt;&gt;&gt; -   Hook output to C, which C can use to CPFP this transaction.&#xA;&gt; &gt;&gt;&gt; -   B can still (somehow) not maintain a mempool, by:&#xA;&gt; &gt;&gt;&gt; -   B broadcasts its timelock transaction.&#xA;&gt; &gt;&gt;&gt; -   B tries to CPFP the above hashlock transaction.&#xA;&gt; &gt;&gt;&gt; -   If CPFP succeeds, it means the above hashlock transaction exists&#xA;&gt; and B queries the peer for this transaction, extracting the preimage and&#xA;&gt; claiming the A-&gt;B HTLC.&#xA;&gt; &gt;&gt;&#xA;&gt; &gt;&gt; Note that no query is required. The problem has been solved and the&#xA;&gt; preimage-containing transaction should now confirm just fine.&#xA;&gt; &gt;&#xA;&gt; &gt; Ah, right, so it gets confirmed and the `blocksonly` B sees it in a&#xA;&gt; block.&#xA;&gt; &gt;&#xA;&gt; &gt; Even if C hooks a tree of low-fee transactions on its hook output or&#xA;&gt; normal payment, miners will still be willing to confirm this and the B hook&#xA;&gt; CPFP transaction without, right?&#xA;&gt;&#xA;&gt; Correct, once it makes it into the mempool we can CPFP it and all the&#xA;&gt; regular sub-package CPFP calculation will pick it&#xA;&gt; and its descendants up. Of course this relies on it not spending any other&#xA;&gt; unconfirmed inputs.&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200619/70e88f70/attachment.html&gt;</html></oembed>