Delivery-date: Thu, 28 Mar 2024 12:29:32 -0700 Received: from mail-qt1-f189.google.com ([209.85.160.189]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rpvRL-0007yh-NO for bitcoindev@gnusha.org; Thu, 28 Mar 2024 12:29:32 -0700 Received: by mail-qt1-f189.google.com with SMTP id d75a77b69052e-4317b440bcesf10930811cf.2 for ; Thu, 28 Mar 2024 12:29:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711654165; cv=pass; d=google.com; s=arc-20160816; b=oDfCRaE+IsK0bgNk6rn0FL+v8ffMYx96+gZqabDDu9c/yeqo6P132ozOV+hauXwD7L R6SmAKKX7ahOaFzK5JWTTw0bn3uXv+aT+9UphkcAIxkCOieYx30uuuGr5UgBmj87bQ8K 8hCLQWPl39zjrRkAQpGzv4Yjn1Om8maENKDE1VbmM+t86/RYjlLzYQxoqYmkwFtK8Bkj nT+Maw7kXfq3dYlAgYV0b1CqrveawX3UNc7KXZby5YiPIDkGNq99xZ5x8ItCn8BIWO5J seIgnKskuXsLPgJllLsoXdtDTlyJo0GaCljm9TcQii9e2DkKGJ+LsB2/5N2YBzzuTQLg qs1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=4rNueEZwHcqOp7cvfZQXfWlUccovAOrQQ2nZc0xtewA=; fh=l9/B7RWad72s0SRfYu/aTBF5zIUdU4Z3uIp6AQC+M3g=; b=FJoWoJB5IbyjK74Ogk+TKjFxA9SBlkYa5cYen+SonmaXsF7n6AQnDe+FjOjJiMY0y4 ZPKovFWjNsZQgqnhfWxTLSSIpyfTR8Us4ryZ+ao3FUY3dh+wATtv5n+IIABVwfUR47Im 6P4lcEFc5OJl5VMHi5rPkwBor0hpuDkqE/J3+ob2QlvHfcqOrGEdLbxtokuMnQLqnZGi uwiycRHvvIMkHiuG0JewtTTx4E+6k7cV7kyhKaxha6p1orzZw05APbft6AKZxdf1pSr6 Vk3Tr8+8zU4TdUhoEtSOjJyB0sAqOcSIe7fkPVMzhaJDIv49MN/S3y2QiCWyTJEtBTgZ PepA==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LeZC+T9y; spf=pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d29 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1711654165; x=1712258965; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=4rNueEZwHcqOp7cvfZQXfWlUccovAOrQQ2nZc0xtewA=; b=MOWC/sAjxy6KoSHXRN78GKt+DkcvQpqAlMRiSj54/iARr4m4wsjjkqy6XqFDEAZ2jA foxq1Irf5LYMGTz4FVYNlFMGwVc847/Wl7I8MAGZHPQORVXiaIsuY86H0DCF/fklloby hoOi7jKIEDXzk3fQ/D2p7hsNg3rUrWy48ePFBxycvR3OXA32r1JLE1x+g7wBS1lYXMOd I/BG+5hcKAiSinC2G4ZU8oexsUnMH7ZM/hEp2pA7gVRnKO62oD1D6nwIsfOo2oT67oY8 IFzV5V4t0k3qrb00o4+BK2ztbXKympKQdRN1HqZ+DjGN9EZMmexxbdBQ7kyVjT62kWXp qftg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711654165; x=1712258965; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4rNueEZwHcqOp7cvfZQXfWlUccovAOrQQ2nZc0xtewA=; b=UJ8AB7o2XTO07aLwL1LFPeTY+9xBgcdG5mGMQlXUy6CKqS63+vg4BJd2EgaI/SY83w SFreQbqYZIc7S5VW+WuiJ9eL+3usDvtcYnvdzlWwXEKna6PsvVLYzz5FYLVK5BjBeRE9 gJOAG0r8mbNpok5XLg8hXm3bJjsrJTedgFnzRAsbJNHOEs9Wxsip9Z3hrk7pqJ9dvpEN oPava0/PZNyfh2N26Lk0OJ/OMe2H5sd8QpJ6+lxixZRWSurXAjyzgYqp9cyxG0GygVCQ H2MISGEc7PZEcY0flf9v5vT2scdBL+j0QYpGPCyHKHfU8qW/YcDpnOkvhmVpARBuDaom +z8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711654165; x=1712258965; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=4rNueEZwHcqOp7cvfZQXfWlUccovAOrQQ2nZc0xtewA=; b=bwNN1qqPPUHXzejGBA/YOwHlNNKTA+aH0Ui79cjuhFpNR1MbVpkcKTfP3ToP4no6rm enH5sG/g7w84thJ8JyR4HDrxk6M6PeurIpktdnL1v3Mag0EC7p9Cds54N7ww3hfydApy u+RzJjJcN6hnJink+XW89tb5WR0hK1n1jL+ejLzgmTVpKwcxYxNYlGd0tJnXyWCZjPM3 ZGCtlbTZKf3hgPsmbFwBzppS0BIRrJAqDWVy5dXq1KPO6Koq3+oEOhOz3I6FtMSXmUSp uLH3MYh55N+5RF3buq5Yz2qvzOQ+eK/rDz0sJ+b5gbNmQuWYOrKqYvdtqG6Ny5w4ZVAo uoXg== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVWpdDExzezbRKnsZx0DrTOxdmNmN6DkvoI35WT4AONpJ7OJjMEPnOVLwCXlQQ3sOzX9uFvLhc6ZnmQCtu1ExxNYZM5f3Y= X-Gm-Message-State: AOJu0YzdbtXmueCcZdbDPwVeVm4VqCRvBmfQUr/xL5pK+Yq61XUzoSqN VZTxd3VWkAH7SEACfBFjYTgqtOBLrAVZsI1I3sqEmtFRnFfqp64S X-Google-Smtp-Source: AGHT+IGS1qXfFmrJseqMiPHe92uDJROmyHypo90z6U8nU4lQfSX/rOxPC9d3NxJBFjQZt87k7xxA7g== X-Received: by 2002:ac8:5c15:0:b0:430:ea45:75e8 with SMTP id i21-20020ac85c15000000b00430ea4575e8mr343519qti.60.1711654165230; Thu, 28 Mar 2024 12:29:25 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com Received: by 2002:ac8:7c95:0:b0:432:b2f9:64f4 with SMTP id y21-20020ac87c95000000b00432b2f964f4ls1095603qtv.2.-pod-prod-05-us; Thu, 28 Mar 2024 12:29:24 -0700 (PDT) X-Received: by 2002:a05:620a:4610:b0:78a:7495:aff8 with SMTP id br16-20020a05620a461000b0078a7495aff8mr1294qkb.1.1711654164421; Thu, 28 Mar 2024 12:29:24 -0700 (PDT) Received: by 2002:a05:620a:28d0:b0:78a:4813:d207 with SMTP id af79cd13be357-78bc5d1eca3ms85a; Thu, 28 Mar 2024 12:13:51 -0700 (PDT) X-Received: by 2002:a67:f14a:0:b0:476:c40b:e717 with SMTP id t10-20020a67f14a000000b00476c40be717mr109430vsm.0.1711653230507; Thu, 28 Mar 2024 12:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711653230; cv=none; d=google.com; s=arc-20160816; b=uziECJu09CW46siNrw/gQpMwCNjYdonNfkhNfMQQOwGlJbqO+EJt0YsWnRE5Kt0q9A McKUHVz+ymL+WWnDh6UL67qLesuqQVAdp+Vml7dEkJy70QHY4TX/SWTFJrUIhhpP2iRL 5E6FUCCamQuCPKuFF9pFwTukAEaYsyef/oOQHwxmQA5nxK0xxHMAAfH0yig2pZJsISXV Desas9Zrncsid2eKJbStAqlPAMG/SR6I42E7mrBC6c1lN8N6gwXq9LMJiZEJxjATS+D4 g2ZXn6UCYrH8/OCEjkAb9cg1xsRPd6r3U+rFJznN7v1dL8LQMsLeziny3Akb+Wj4cG79 FNqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=dAXNhD2yxvYAvpCnsEX8QEKTf+zvey7MY0afHPQ/UmE=; fh=yPd8HNyAt94w6+9mawPnFhKq8crEnOt8R5D/kg3m3ro=; b=zIxseMLm+pqD0LDiznlOOJDRx2v11jiirJzJA2qDVsavg9e4TMzVEzFiumN8yMxq3t jMPCkiOjH4JMcN8/3Ub2xtXGVHfcbdeS4bkodMt5eK8lqLuj1rrtBxZisX3Pf/2reTrU /bQSCL9tTXJeUtbwAdlzN5Pf4Q1ABMnbx/HervIjsuQOGKeWFfDXQn8XRxjy5jXXCog/ V9ul1jh/mdyuOz+FeIpRbbstzCHTtrlSDFA2Kn7YVeXi+98jBywu9jNIZyy45kvIZhoR 07GPzsW4sVAzBj8TnZjWe63mO9Oe8OO+K4cja6mO7FNa9sq8IrmhqEx8kMBn7ZPKhrAh urGQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LeZC+T9y; spf=pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d29 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com. [2607:f8b0:4864:20::d29]) by gmr-mx.google.com with ESMTPS id d13-20020a056102148d00b00476b8a1fbefsi239365vsv.0.2024.03.28.12.13.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Mar 2024 12:13:50 -0700 (PDT) Received-SPF: pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d29 as permitted sender) client-ip=2607:f8b0:4864:20::d29; Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7c89cd8df36so31732739f.1 for ; Thu, 28 Mar 2024 12:13:50 -0700 (PDT) X-Received: by 2002:a6b:e71a:0:b0:7d0:3d39:5fbc with SMTP id b26-20020a6be71a000000b007d03d395fbcmr113920ioh.1.1711653229756; Thu, 28 Mar 2024 12:13:49 -0700 (PDT) MIME-Version: 1.0 References: <0a377ddb-b001-41ba-9208-27b3fa059bb5n@googlegroups.com> In-Reply-To: From: Antoine Riard Date: Thu, 28 Mar 2024 19:13:38 +0000 Message-ID: Subject: Re: [bitcoindev] Re: A Free-Relay Attack Exploiting RBF Rule #6 To: Peter Todd Cc: Bitcoin Development Mailing List Content-Type: multipart/alternative; boundary="000000000000bd0c740614bd5289" X-Original-Sender: antoine.riard@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LeZC+T9y; spf=pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d29 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.5 (/) --000000000000bd0c740614bd5289 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Peter, Answering the latest 2 emails. > Indeed, at this point I strongly suspect had I instead lobbied for a fix > privately, given that one obvious mitigation is replace-by-fee-rate, I'd > instead just get accused of nefarious behavior for not doing so openly. I'll confirm publicly again that transaction-relay bandwidth DoS risks have been known or suspected by some senior developers for a while, including sometimes mentioned half-way on the Bitcoin Core GH repository years ago. > Correct me if I'm wrong. But I don't believe that the `dust_limit_satoshis` > value can be changed on an existing channel. > It *should* be possible to change on an existing channel, as the economic dust > limit is fee-rate dependent. But the protocol does not support that yet IIUC. This is correct, it cannot be changed once it has been negotiated at opening flow. Per-BOLT3 "Commitment Transaction Construction", the dust HTLCs are trimmed and the amount added to the commitment transaction absolute fee. This ability can let you generate an ascending feerate range of commitment transactions: - state_1, size 1000 kb, 1 trimmed HTLC ~500 sats absolute fee - state_2, size 900 kb, 2 trimmed HTLC ~1000 sats absolute fee - state_3, size 800 kb, 3 trimmed HTLC ~1500 sats absolute fee - etc Non-dust HTLC fully materializing on the commitment transaction can be added at wish to adjust commitment transaction size if you're using a public channel used for routing, without the "honest interactivity" of your counterparty. > There's also a convenience aspect to this: large mempools are convenient for > transaction senders, as it allows them to go off line after sending > transactions that aren't going to be mined in the near future. If we had = a > world of purely always-online transaction senders, mempools could be smaller. Yes. This is a good question if a world of common size mempool for hobbyist full-nodes can still be the network standard in the evolving world of today where re-broadcasting and pricing the next few blocks become more done by transaction issuers, evicting transactions without high odds to be mined in the near future. Said differently, Bitcoin clients with high-timevalue preferences for their use-cases are out-pricing Bitcoin clients with low-timevalue preferences from network mempools. > Modulo economic irrationalities with differently sized txs like the Rule #6 > attack, the proof-of-UTXO is almost economically paid even when mempools are > partitioned because the bandwidth used by a given form of a transaction i= s > limited to the % of peers that relay it. Eg if I broadcast TxA to 50% of nodes, > and TxB to the other 50%, both spending the same txout, the total cost/KB used > in total would exactly the same... except that nodes have more than one peer. > This acts as an amplification fator to attacks depending on the exact topology > as bandwidth is wasted in proportion to the # of peers txs need to be broadcast > too. Basically, a fan-out factor. > If the # of peers is reduced, the impact of this type of attack is also > reduced. Of course, a balance has to be maintained. Sure, proof-of-UTXO is imperfectly economically charged, however I think you can re-use the same proof-of-UTXO for each subset of Sybilled transaction-relay peers. And for sure, # peers and network topology can be leveraged as amplification factors for this class of "free-relay" attacks. Balance would have to be find compared to worthiness of carried-on transaction-relay traffic. > Oh, and to expand on this discussion a bit... Assuming that LN implementations > did enable this type of attack, I'll point out that it's essentially based on > having incoming liquidity, which is not free. Either you paid for it by paying > someone to open channels to you. Or you operated a lightning node that provided > sufficiently attractive survice that people chose to open channels to you= . > Either way getting that incoming capacity cost you money, probably at similar > if not worse rates than just borrowing BTC. Yes, note I used the term "allocated" in one of my previous emails, which I concede is not well-defined and it's indeed dependent on Lightning channel network dynamics. I'll leave as an exercise to the reader to find common liquidity management asymmetries in today's LN implementation to be leveraged as a discount vector for "free-relay" bandwidth attacks at the transaction-relay network-level. Best, Antoine Le jeu. 28 mars 2024 =C3=A0 14:27, Peter Todd a =C3=A9= crit : > On Wed, Mar 27, 2024 at 07:17:24PM +0000, Antoine Riard wrote: > > > I don't believe the other attacks in this attack class are even > possible > > to > > fix. We just have to live with the fact that a degree of free relay is > > always > > going to be possible. > > > > See comments under proof-of-UTXO ownership as plausible mitigations. > > > > In anway, I think this is not the type of fixes we can land in a covert > > fashion given the > > order of magnitude of engineering effort and potential tx-relay network > > impact. > > Indeed, at this point I strongly suspect had I instead lobbied for a fix > privately, given that one obvious mitigation is replace-by-fee-rate, I'd > instead just get accused of nefarious behavior for not doing so openly. > > > > Can you explain in more detail how exactly you'd pull that off? Are y= ou > > aware > > of LN implementations that actually create feerate ascending LN states? > > > > I think you can create feerates ascending LN states with today's LN > > implementations by playing with BOLT2's `dust_limit_satoshis`. > > State 1 has 1 dust HTLC trimmed, state 2 has 2 dust HTLCs trimmed, ... > > State N has N dust HTLCs trimmed. > > Correct me if I'm wrong. But I don't believe that the `dust_limit_satoshi= s` > value can be changed on an existing channel. > > It *should* be possible to change on an existing channel, as the economic > dust > limit is fee-rate dependent. But the protocol does not support that yet > IIUC. > > > > Imagine if the mempool size was 1TB, an amount larger than the entire > BTC > > > blocksize to date. I think that example helps make it obvious that wi= th > > such an > > > enormous mempool, there *must* be free relay attacks, because it's > simply > > > impossible for all broadcast transactions to even get mined. > > > > I think there is an interesting distinction that can be made between > > mempool size > > ressources dedicated to increase block template efficiency and minimum > > mempool size > > to just ensure you have good BIP152 compact block validation time. > > Obviously if you're > > aiming for the first, you're incentivized to offer "free-relay" bandwid= th > > to your peers and > > increase your view of the ongoing transaction traffic. > > There's also a convenience aspect to this: large mempools are convenient > for > transaction senders, as it allows them to go off line after sending > transactions that aren't going to be mined in the near future. If we had = a > world of purely always-online transaction senders, mempools could be > smaller. > > > > All the existing replacement mechanisms _are_ basically a proof-of-UT= XO > > > ownership, because they're transactions spending UTXOs. The only > question > > is > > > the details of how that proof works. > > > > Yeah somehow it's correct that any replacement mechanisms encompass a > > proof-of-UTXO > > ownership mechanism. Yet in a world you can partition mempool like you > show > > with your > > for example, it's easy to make this proof-of-UTXO economically unpaid b= y > > the attacker. Asking > > aged UTXOs attached to a replacement candidate could be make such proof > > more robust, in > > my understanding. > > I think you're missing a third aspect to this: # of peers. > > Modulo economic irrationalities with differently sized txs like the Rule = #6 > attack, the proof-of-UTXO is almost economically paid even when mempools > are > partitioned because the bandwidth used by a given form of a transaction i= s > limited to the % of peers that relay it. Eg if I broadcast TxA to 50% of > nodes, > and TxB to the other 50%, both spending the same txout, the total cost/KB > used > in total would exactly the same... except that nodes have more than one > peer. > This acts as an amplification fator to attacks depending on the exact > topology > as bandwidth is wasted in proportion to the # of peers txs need to be > broadcast > too. Basically, a fan-out factor. > > If the # of peers is reduced, the impact of this type of attack is also > reduced. Of course, a balance has to be maintained. > > I call the Rule #6 attack an economic irrationality because the higher > fee-rate > transaction should have replaced the low fee-rate transactions: it's the > one > that got mined, so bandwidth spend on the low fee-rate txs was clearly > wasted, > and miners lost out on some fees. > > -- > https://petertodd.org 'peter'[:-1]@petertodd.org > --=20 You received this message because you are subscribed to the Google Groups "= Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoindev+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= bitcoindev/CALZpt%2BH2B1pSbqNa9phxZMxHX%2B30AiDqX7TgiRjH4rtirLwb9g%40mail.g= mail.com. --000000000000bd0c740614bd5289 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Peter,

Answering the latest 2 emails= .

> Indeed, at this point I strongly suspect ha= d I instead lobbied for a fix
> privately, given that one obvious mit= igation is replace-by-fee-rate, I'd
> instead just get accused of= nefarious behavior for not doing so openly.

I= 'll confirm publicly again that transaction-relay bandwidth DoS risks h= ave been
known or suspected by some senior=C2=A0developers for a = while, including sometimes=C2=A0
mentioned half-way on the Bitcoi= n Core GH repository years ago.

> Correct me if= I'm wrong. But I don't believe that the `dust_limit_satoshis`> value can be changed on an existing channel.

> It *should* = be possible to change on an existing channel, as the economic dust
> = limit is fee-rate dependent. But the protocol does not support that yet IIU= C.

This is correct, it cannot be changed once it has bee= n negotiated at opening flow.

Per-B= OLT3 "Commitment Transaction=C2=A0Construction", the dust HTLCs a= re trimmed and
the amount added to the commitment transaction abs= olute fee.

This ability can let you generate an as= cending feerate range of commitment transactions:
- state_1, size= 1000 kb, 1 trimmed HTLC ~500 sats absolute fee
- state_2, size 9= 00 kb, 2 trimmed HTLC ~1000 sats absolute fee
- state_3, size 800= kb, 3 trimmed HTLC ~1500 sats absolute fee
- etc

<= /div>
Non-dust HTLC fully materializing on the commitment transaction c= an be added at wish to
adjust commitment transaction size =C2=A0i= f you're using a public channel used for routing, without
the= "honest interactivity" of your counterparty.

> There's also a convenience aspect to this: large mempools ar= e convenient for
> transaction senders, as it allows them to go off l= ine after sending
> transactions that aren't going to be mined in= the near future. If we had a
> world of purely always-online transac= tion senders, mempools could be smaller.

Yes. = This is a good question if a world of common size mempool for hobbyist
full-nodes can still be the network standard in the evolving world of= today where=C2=A0
re-broadcasting and pricing the next few block= s become more done by transaction
issuers, evicting transactions = without high odds to be mined in the near future.

= Said differently, Bitcoin clients with high-timevalue preferences for their= use-cases
are out-pricing Bitcoin clients with low-timevalue pre= ferences from network mempools.

> Modulo econom= ic irrationalities with differently sized txs like the Rule #6
> atta= ck, the proof-of-UTXO is almost economically paid even when mempools are> partitioned because the bandwidth used by a given form of a transacti= on is
> limited to the % of peers that relay it. Eg if I broadcast Tx= A to 50% of nodes,
> and TxB to the other 50%, both spending the same= txout, the total cost/KB used
> in total would exactly the same... e= xcept that nodes have more than one peer.
> This acts as an amplifica= tion fator to attacks depending on the exact topology
> as bandwidth = is wasted in proportion to the # of peers txs need to be broadcast
> = too. Basically, a fan-out factor.

> If the # of peers is reduced,= the impact of this type of attack is also
> reduced. Of course, a ba= lance has to be maintained.

Sure, proof-of-UTX= O is imperfectly economically charged, however I think you can
re= -use the same proof-of-UTXO for each subset of Sybilled transaction-relay p= eers.

And for sure, # peers and network topology c= an be leveraged as amplification factors
for this class of "= free-relay" attacks. Balance would have to be find compared to worthin= ess
of carried-on transaction-relay traffic.

=
> Oh, and to expand on this discussion a bit... Assuming that LN im= plementations
> did enable this type of attack, I'll point out th= at it's essentially based on
> having incoming liquidity, which i= s not free. Either you paid for it by paying
> someone to open channe= ls to you. Or you operated a lightning node that provided
> sufficien= tly attractive survice that people chose to open channels to you.
> E= ither way getting that incoming capacity cost you money, probably at simila= r
> if not worse rates than just borrowing BTC.

Yes, note I used the term "allocated" in one of my previo= us emails, which I concede
is not well-defined and it's indee= d dependent on Lightning channel network dynamics.

I'll leave as an exercise to the reader to find common liquidity manag= ement asymmetries
in today's LN implementation to be leverage= d as a discount vector for "free-relay" bandwidth
attac= ks at the transaction-relay network-level.

Best,
Antoine



Le=C2=A0jeu. 28 mars 20= 24 =C3=A0=C2=A014:27, Peter Todd <= pete@petertodd.org> a =C3=A9crit=C2=A0:
= On Wed, Mar 27, 2024 at 07:17:24PM +0000, Antoine Riard wrote:
> > I don't believe the other attacks in this attack class are ev= en possible
> to
> fix. We just have to live with the fact that a degree of free relay is=
> always
> going to be possible.
>
> See comments under proof-of-UTXO ownership as plausible mitigations. >
> In anway, I think this is not the type of fixes we can land in a cover= t
> fashion given the
> order of magnitude of engineering effort and potential tx-relay networ= k
> impact.

Indeed, at this point I strongly suspect had I instead lobbied for a fix privately, given that one obvious mitigation is replace-by-fee-rate, I'= d
instead just get accused of nefarious behavior for not doing so openly.

> > Can you explain in more detail how exactly you'd pull that of= f? Are you
> aware
> of LN implementations that actually create feerate ascending LN states= ?
>
> I think you can create feerates ascending LN states with today's L= N
> implementations by playing with BOLT2's `dust_limit_satoshis`.
> State 1 has 1 dust HTLC trimmed, state 2 has 2 dust HTLCs trimmed, ...=
> State N has N dust HTLCs trimmed.

Correct me if I'm wrong. But I don't believe that the `dust_limit_s= atoshis`
value can be changed on an existing channel.

It *should* be possible to change on an existing channel, as the economic d= ust
limit is fee-rate dependent. But the protocol does not support that yet IIU= C.

> > Imagine if the mempool size was 1TB, an amount larger than the en= tire BTC
> > blocksize to date. I think that example helps make it obvious tha= t with
> such an
> > enormous mempool, there *must* be free relay attacks, because it&= #39;s simply
> > impossible for all broadcast transactions to even get mined.
>
> I think there is an interesting distinction that can be made between > mempool size
> ressources dedicated to increase block template efficiency and minimum=
> mempool size
> to just ensure you have good BIP152 compact block validation time.
> Obviously if you're
> aiming for the first, you're incentivized to offer "free-rela= y" bandwidth
> to your peers and
> increase your view of the ongoing transaction traffic.

There's also a convenience aspect to this: large mempools are convenien= t for
transaction senders, as it allows them to go off line after sending
transactions that aren't going to be mined in the near future. If we ha= d a
world of purely always-online transaction senders, mempools could be smalle= r.

> > All the existing replacement mechanisms _are_ basically a proof-o= f-UTXO
> > ownership, because they're transactions spending UTXOs. The o= nly question
> is
> > the details of how that proof works.
>
> Yeah somehow it's correct that any replacement mechanisms encompas= s a
> proof-of-UTXO
> ownership mechanism. Yet in a world you can partition mempool like you= show
> with your
> for example, it's easy to make this proof-of-UTXO economically unp= aid by
> the attacker. Asking
> aged UTXOs attached to a replacement candidate could be make such proo= f
> more robust, in
> my understanding.

I think you're missing a third aspect to this: # of peers.

Modulo economic irrationalities with differently sized txs like the Rule #6=
attack, the proof-of-UTXO is almost economically paid even when mempools ar= e
partitioned because the bandwidth used by a given form of a transaction is<= br> limited to the % of peers that relay it. Eg if I broadcast TxA to 50% of no= des,
and TxB to the other 50%, both spending the same txout, the total cost/KB u= sed
in total would exactly the same... except that nodes have more than one pee= r.
This acts as an amplification fator to attacks depending on the exact topol= ogy
as bandwidth is wasted in proportion to the # of peers txs need to be broad= cast
too. Basically, a fan-out factor.

If the # of peers is reduced, the impact of this type of attack is also
reduced. Of course, a balance has to be maintained.

I call the Rule #6 attack an economic irrationality because the higher fee-= rate
transaction should have replaced the low fee-rate transactions: it's th= e one
that got mined, so bandwidth spend on the low fee-rate txs was clearly wast= ed,
and miners lost out on some fees.

--
http= s://petertodd.org 'peter'[:-1]@petertodd.org

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.= google.com/d/msgid/bitcoindev/CALZpt%2BH2B1pSbqNa9phxZMxHX%2B30AiDqX7TgiRjH= 4rtirLwb9g%40mail.gmail.com.
--000000000000bd0c740614bd5289--