From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4751DC000E for ; Wed, 30 Jun 2021 19:21:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2CC56415F7 for ; Wed, 30 Jun 2021 19:21:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18r5PH7przT1 for ; Wed, 30 Jun 2021 19:21:48 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by smtp4.osuosl.org (Postfix) with ESMTPS id CC651415F3 for ; Wed, 30 Jun 2021 19:21:47 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id nd37so6117319ejc.3 for ; Wed, 30 Jun 2021 12:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZDqljy3qS4wOxWSfCS/fB0bGlYHgLrhjwDC6BMkZCO8=; b=J9xFzTsBNYz0sEj9sfqujvr1gE3qeA33Cl6+5/0MS5cKSeDRJR9M9zguQequRZI2Xf 1ehYqZWLHLCvrf1CIVAPcqPjSQ+5TLW2gpUVFFUgyWEfoPSwqlxt+vW0fnVSO+XpTQlk g6dn0dxK9qdiKwuYVbWUANURIhulXQCW/o47cUCuLIessslrGY//GJ3afkBQqId4fLXB BFsqhMw1IJkAGeOmidmKQ5gWvobVb+E2o3xSu0NtWcTuW3SmzcMWiV7GaHZKKuIDcBBW uMriX3ZeJIiE3ddU2uNI/QAQwpVoRzAJJnsr1NFHsNzas3/S7+nViD0oBOD7g4n8oT+M KeKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZDqljy3qS4wOxWSfCS/fB0bGlYHgLrhjwDC6BMkZCO8=; b=hoBUTsukklc+/DpGwAE27WHw+vkERekz7w9/j422+PA3N9SPyrPuwpM+kG/JsekD19 2pDop/jQnuOqahNVQWbkOkdfs48AuqhBLfHy55wLXob3GEDaS2Y3QParlZA8LFrNjHFY pj4+4Htn+vzOgh4Lzi4dskDaa14uKrAqC1feQMZvqqD6qiqWHa860oDf+XJu5X1r3uHa CcGPmEB/uLk6co544Ugl5Z+pXup3T5J/7yRQ4DUqif0AkGl0G3dyIwwSwzvXGPSHp9e6 9yNbdbCCYldQz+RlNWz9dw/mqyM7dOWThX0IioGLPxvZXEYflsniLuFHVq901/lj7WZt QEFQ== X-Gm-Message-State: AOAM530M7KfXSNH7L87Eh9LMdokhAfNE5wAD1DaKsQmeo3OqtJae+gbS JcREYEMVM0tVqth0YBeNbDWZuSKijem3dB8GP58= X-Google-Smtp-Source: ABdhPJyVcdqWuAYgxywO70tBj/jM/gpyrreuGd7qAQoGAZyfzbppN257PHI0ZJjtTyqKqjUdxvuPpGJnw/Cg+mniSaA= X-Received: by 2002:a17:907:3e88:: with SMTP id hs8mr35994028ejc.96.1625080905712; Wed, 30 Jun 2021 12:21:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Billy Tetrud Date: Wed, 30 Jun 2021 12:21:29 -0700 Message-ID: To: Corey Haddad , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="0000000000001dc81105c600a262" X-Mailman-Approved-At: Wed, 30 Jun 2021 20:01:43 +0000 Subject: Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0 X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:21:51 -0000 --0000000000001dc81105c600a262 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > I would prefer to see nodes forward any transaction conflicting transaction, so long as it has a higher fee. Is there a reason this would be undesirable? There is a spam risk there, where someone could intend to pay a fee of 1000 sats, but every time they make a payment, they generate a transaction with the minimum fee, then a transaction with a fee 1 sat higher, etc etc until they've generated about 1000 sats. So I think what nodes do is that they only forward transactions that have a fee at least X sats higher than one they already have in their mempool. The minimum delta between fees should probably be just as high as the absolute minimum fee, since it accounts for the cost of broadcasting the transaction. But on broader strokes, as long as you're bumping the fee by a significant amount, I agree that any transaction should be forwarded regardless of any RBF flag. On Wed, Jun 30, 2021 at 7:07 AM Corey Haddad via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > We cannot prevent people from choosing to take an action based on an > unconfirmed transaction. Even though it is trivial to have a > double-spending transaction confirmed, accepting a 0-conf tx can be > rational in many cases. 0-conf can be interpreted as the customer > signaling their 'intent to pay', and where there is an established > relationship between customer and merchant, or where there merchant is > providing a cancelable e-service, signaling intent may be enough. These u= se > cases do not depend on making it difficult for the user to attempt to > double-spend the merchant. > > Bitcoin is a system designed around a consensus on the blockchain, not th= e > mempool. I am in favor of providing the spender of bitcoins with all > possible tools and methods to help them submit their transactions - > double-spending or not - to miners for consideration. More than making RB= F > the default, I would prefer to see nodes forward any transaction > conflicting transaction, so long as it has a higher fee. Is there a reaso= n > this would be undesirable? > > Corey > > On Sat, Jun 26, 2021 at 3:00 PM Jeremy via bitcoin-dev < > bitcoin-dev@lists.linuxfoundation.org> wrote: > >> If the parties trust each other, rbf is still opt-in. Just don't do it? >> >> On Sat, Jun 26, 2021, 9:30 AM Billy Tetrud via bitcoin-dev < >> bitcoin-dev@lists.linuxfoundation.org> wrote: >> >>> > services providers are offering zero-conf channels, where you can >>> start to spend instantly [0]. I believe that's an interesting usage >>> >>> I agree those are interesting and useful cases. I suppose I should >>> clarify that when I asked if bitcoin should continue supporting 0-conf >>> transactions, I meant: should we make design decisions based on whether= it >>> makes raw 0-conf transactions more or less difficult to double spend on= ? I >>> do think 0-conf transactions can be useful in situations where there is >>> some level of trust (either direct trust between the interacting partie= s, >>> or disperse trust that most people won't try to double spend, perhaps >>> because the transaction is small or their identity is tied to it). Fide= lity >>> bonds sound like an interesting way to mitigate sybil attacks in a >>> reputation system. >>> >>> On Thu, Jun 24, 2021 at 5:23 PM Antoine Riard >>> wrote: >>> >>>> > Do we as a community want to support 0-conf payments in any way at >>>> this >>>> > point? It seems rather silly to make software design decisions to >>>> > accommodate 0-conf payments when there are better mechanisms for fas= t >>>> > payments (ie lightning). >>>> >>>> Well, we have zero-conf LN channels ? Actually, Lightning channel >>>> funding transactions should be buried under a few blocks, though few >>>> services providers are offering zero-conf channels, where you can star= t to >>>> spend instantly [0]. I believe that's an interesting usage, though IMH= O as >>>> mentioned we can explore different security models to make 0-conf safe >>>> (reputation/fidelity-bond). >>>> >>>> > One question I have is: how does software generally inform the user >>>> about >>>> 0-conf payment detection? >>>> >>>> Yes generally it's something like an "Unconfirmed" annotation on >>>> incoming txn, though at least this is what Blockstream Green or Electr= um >>>> are doing. >>>> >>>> > But I >>>> suppose it would depend on how often 0-conf is used in the bitcoin >>>> ecosystem at this point, which I don't have any data on. >>>> >>>> There are few Bitcoin services well-known to rely on 0-conf. Beyond ho= w >>>> much of the Bitcoin traffic is tied to a 0-conf is a hard question, a = lot >>>> of 0-confs service providers are going to be reluctant to share the >>>> information, for a really good reason you will learn a subset of their >>>> business volumes. >>>> >>>> I'll see if I can come up with some Fermi estimation on this front. >>>> >>>> [0] https://www.bitrefill.com/thor-turbo-channels/ >>>> >>>> Le mer. 16 juin 2021 =C3=A0 20:58, Billy Tetrud a >>>> =C3=A9crit : >>>> >>>>> Russel O'Connor recently opined >>>>> >>>>> that RBF should be standard treatment of all transactions, rather tha= n as a >>>>> transaction opt-in/out. I agree with that. Any configuration in a >>>>> transaction that has not been committed into a block yet simply can't= be >>>>> relied upon. Miners also have a clear incentive to ignore RBF rules a= nd >>>>> mine anything that passes consensus. At best opting out of RBF is a w= eak >>>>> defense, and at worst it's simply a false sense of security that is l= ikely >>>>> to actively lead to theft events. >>>>> >>>>> Do we as a community want to support 0-conf payments in any way at >>>>> this point? It seems rather silly to make software design decisions t= o >>>>> accommodate 0-conf payments when there are better mechanisms for fast >>>>> payments (ie lightning). >>>>> >>>>> One question I have is: how does software generally inform the user >>>>> about 0-conf payment detection? Does software generally tell the user >>>>> something along the lines of "This payment has not been finalized yet= . All >>>>> recipients should wait until the transaction has at least 1 confirmat= ion, >>>>> and most recipients should wait for 6 confirmations" ? I think unless= we >>>>> pressure software to be very explicit about what counts as finality, = users >>>>> will simply continue to do what they've always done. Rolling out this >>>>> policy change over the course of a year or two seems fine, no need to= rush. >>>>> But I suppose it would depend on how often 0-conf is used in the bitc= oin >>>>> ecosystem at this point, which I don't have any data on. >>>>> >>>>> On Tue, Jun 15, 2021 at 10:00 AM Antoine Riard via bitcoin-dev < >>>>> bitcoin-dev@lists.linuxfoundation.org> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm writing to propose deprecation of opt-in RBF in favor of full-RB= F >>>>>> as the Bitcoin Core's default replacement policy in version 24.0. As= a >>>>>> reminder, the next release is 22.0, aimed for August 1st, assuming >>>>>> agreement is reached, this policy change would enter into deployment= phase >>>>>> a year from now. >>>>>> >>>>>> Even if this replacement policy has been deemed as highly >>>>>> controversial a few years ago, ongoing and anticipated changes in th= e >>>>>> Bitcoin ecosystem are motivating this proposal. >>>>>> >>>>>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transaction= s >>>>>> >>>>>> As explained in "On Mempool Funny Games against Multi-Party Funded >>>>>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-pa= rty >>>>>> funded transactions by propagating an RBF opt-out double-spend of it= s >>>>>> contributed input before the honest transaction is broadcasted by th= e >>>>>> protocol orchester. DoSes are qualified in the sense of either an at= tacker >>>>>> wasting timevalue of victim's inputs or forcing exhaustion of the >>>>>> fee-bumping reserve. >>>>>> >>>>>> This affects a series of Bitcoin protocols such as Coinjoin, onchain >>>>>> DLCs and dual-funded LN channels. As those protocols are still in th= e early >>>>>> phase of deployment, it doesn't seem to have been executed in the wi= ld for >>>>>> now. That said, considering that dual-funded are more efficient fro= m a >>>>>> liquidity standpoint, we can expect them to be widely relied on, onc= e >>>>>> Lightning enters in a more mature phase. At that point, it should be= come >>>>>> economically rational for liquidity service providers to launch thos= e DoS >>>>>> attacks against their competitors to hijack user traffic. >>>>>> >>>>>> Beyond that, presence of those DoSes will complicate the design and >>>>>> deployment of multi-party Bitcoin protocols such as payment >>>>>> pools/multi-party channels. Note, Lightning Pool isn't affected as t= here is >>>>>> a preliminary stage where batch participants are locked-in their fun= ds >>>>>> within an account witnessScript shared with the orchestrer. >>>>>> >>>>>> Of course, even assuming full-rbf, propagation of the multi-party >>>>>> funded transactions can still be interfered with by an attacker, sim= ply >>>>>> broadcasting a double-spend with a feerate equivalent to the honest >>>>>> transaction. However, it tightens the attack scenario to a scorched = earth >>>>>> approach, where the attacker has to commit equivalent fee-bumping re= serve >>>>>> to maintain the pinning and might lose the "competing" fees to miner= s. >>>>>> >>>>>> # RBF opt-out as a Mempools Partitions Vector >>>>>> >>>>>> A longer-term issue is the risk of mempools malicious partitions, >>>>>> where an attacker exploits network topology or divergence in mempool= s >>>>>> policies to partition network mempools in different subsets. From th= en a >>>>>> wide range of attacks can be envisioned such as package pinning [1], >>>>>> artificial congestion to provoke LN channels closure or manipulation= of >>>>>> fee-estimator's feerate (the Core's one wouldn't be affected as it r= elies >>>>>> on block confirmation, though other fee estimators designs deployed = across >>>>>> the ecosystem are likely going to be affected). >>>>>> >>>>>> Traditionally, mempools partitions have been gauged as a spontaneous >>>>>> outcome of a distributed systems like Bitcoin p2p network and I'm no= t aware >>>>>> it has been studied in-depth for adversarial purposes. Though, deplo= yment >>>>>> of second-layer >>>>>> protocols, heavily relying on sanity of a local mempool for >>>>>> fee-estimation and robust propagation of their time-sensitive transa= ctions >>>>>> might lead to reconsider this position. Acknowledging this, RBF opt-= out is >>>>>> a low-cost partitioning tool, of which the existence nullifies most = of >>>>>> potential progresses to mitigate malicious partitioning. >>>>>> >>>>>> >>>>>> To resume, opt-in RBF doesn't suit well deployment of robust >>>>>> second-layers protocol, even if those issues are still early and des= erve >>>>>> more research. At the same time, I believe a meaningful subset of th= e >>>>>> ecosystem are still relying >>>>>> on 0-confs transactions, even if their security is relying on far >>>>>> weaker assumptions (opt-in RBF rule is a policy rule, not a consensu= s one) >>>>>> [2] A rapid change of Core's mempool rules would be harming their qu= ality >>>>>> of services and should be >>>>>> weighed carefully. On the other hand, it would be great to nudge the= m >>>>>> towards more secure handling of their 0-confs flows [3] >>>>>> >>>>>> Let's examine what could be deployed ecosystem-wise as enhancements >>>>>> to the 0-confs security model. >>>>>> >>>>>> # Proactive security models : Double-spend Monitoring/Receiver-side >>>>>> Fee-Topping with Package Relay >>>>>> >>>>>> From an attacker viewpoint, opt-in RBF isn't a big blocker to >>>>>> successful double-spends. Any motivated attacker can modify Core to >>>>>> mass-connect to a wide portion of the network, announce txA to this = subset, >>>>>> announce txA' to the >>>>>> merchant. TxA' propagation will be encumbered by the >>>>>> privacy-preserving inventory timers >>>>>> (`OUTBOUND_INVENTORY_BROADCAST_INTERVAL`), of which an attacker has = no care >>>>>> to respect. >>>>>> >>>>>> To detect a successful double-spend attempt, a Bitcoin service shoul= d >>>>>> run few full-nodes with well-spread connection graphs and unlinkable >>>>>> between them, to avoid being identified then maliciously partitioned= from >>>>>> the rest of the network. >>>>>> >>>>>> I believe this tactic is already deployed by few Bitcoin services, >>>>>> and even one can throw flame at it because it over consumes network >>>>>> resources (bandwidth, connection slots, ...), it does procure a secu= rity >>>>>> advantage to the ones doing it. >>>>>> >>>>>> One further improvement on top of this protection could be to react >>>>>> after the double-spend detection by attaching a CPFP to the merchant >>>>>> transaction, with a higher package feerate than the double-spend. Ex= pected >>>>>> deployment of package-relay as a p2p mechanism/mempool policy in Bit= coin >>>>>> Core should enable it to do so. >>>>>> >>>>>> # Reactive security models : EconomicReputation-based Compensations >>>>>> >>>>>> Another approach could be to react after the fact if a double-spend >>>>>> has been qualified. If the sender is already known to the service pr= ovider, >>>>>> the service account can be slashed. If the sender is a low-trusted >>>>>> counterparty to the merchant, "side-trust" models could be relied on= . For >>>>>> e.g a LN pubkey with a stacked reputation from your autopilot, LSATs= , stake >>>>>> certificates, a HTLC-as-a-fidelity-bond, ... The space is quite wide= there >>>>>> but I foresee those trust-minimized, decentralized solutions being a= dopted >>>>>> by the LN ecosystem to patch the risks when you enter in a channel/H= TLC >>>>>> operation with an anonymous counterparty. >>>>>> >>>>>> What other cool new tools could be considered to enhance 0-confs >>>>>> security ? >>>>>> >>>>>> To conclude, let's avoid replaying the contentious threads of a few >>>>>> years ago. What this new thread highlights is the fact that a transa= ction >>>>>> relay/mempool acceptance policy might be beneficial to some class of >>>>>> already-deployed >>>>>> Bitcoin applications while being detrimental to newer ones. How do w= e >>>>>> preserve the current interests of 0-confs users while enabling upcom= ing >>>>>> interests of fancy L2s to flourish is a good conversation to have. I= think. >>>>>> >>>>>> If there is ecosystem agreement on switching to full-RBF, but 0.24 >>>>>> sounds too early, let's defer it to 0.25 or 0.26. I don't think Core= has a >>>>>> consistent deprecation process w.r.t to policy rules heavily relied-= on by >>>>>> Bitcoin users, if we do so let sets a precedent satisfying as many f= olks as >>>>>> we can. >>>>>> >>>>>> Cheers, >>>>>> Antoine >>>>>> >>>>>> [0] >>>>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/0= 03033.html >>>>>> >>>>>> [1] See scenario 3 : >>>>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-June/= 002758.html >>>>>> >>>>>> [2] >>>>>> https://github.com/bitcoin/bitcoin/pull/10823#issuecomment-466485121 >>>>>> >>>>>> [3] And the LN ecosystem does have an interest to fix zero-confs >>>>>> security, if "turbo-channels"-like become normalized for mobile node= s >>>>>> _______________________________________________ >>>>>> bitcoin-dev mailing list >>>>>> bitcoin-dev@lists.linuxfoundation.org >>>>>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >>>>>> >>>>> _______________________________________________ >>> bitcoin-dev mailing list >>> bitcoin-dev@lists.linuxfoundation.org >>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >>> >> _______________________________________________ >> bitcoin-dev mailing list >> bitcoin-dev@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >> > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --0000000000001dc81105c600a262 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0 I would prefer to see nodes forward=C2=A0any transaction conflicting transa= ction, so long as it has a higher fee. Is there a reason this would be unde= sirable?

There is a spam risk there, where someone could= intend to pay a fee of 1000 sats, but every time they make a payment, they= generate a transaction with the minimum fee, then a transaction with a fee= 1 sat higher, etc etc until they've generated about 1000 sats. So I th= ink what nodes do is that they only forward transactions that have a fee at= least X sats higher than one they already have in their mempool. The minim= um delta between fees should probably be just as high as the absolute minim= um fee, since it accounts for the cost of broadcasting the transaction.=C2= =A0

But on broader strokes, as long as you're = bumping the fee by a significant amount, I agree that any transaction shoul= d be forwarded regardless of any RBF flag.=C2=A0

On Wed, Jun 30, 2021= at 7:07 AM Corey Haddad via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wr= ote:
We cannot=C2=A0prevent people from choosing=C2=A0to take an action ba= sed on an unconfirmed=C2=A0transaction. Even though it is trivial to have a= double-spending transaction confirmed, accepting a 0-conf tx can be ration= al in many cases.=C2=A0=C2=A00-conf can be interpreted as the = customer signaling their 'intent to pay', and where there is an est= ablished relationship between customer and merchant, or where there merchan= t=C2=A0is providing a cancelable e-service, signaling intent may be enough.= These use cases do not depend on making it difficult for the user to attem= pt to double-spend the merchant.

Bitcoin is a system des= igned around a consensus=C2=A0on the blockchain, not the mempool. I am in f= avor of providing the spender of bitcoins with all possible tools and metho= ds to help them submit their transactions - double-spending or not - to min= ers for consideration. More than making RBF the default, I would prefer to = see nodes forward=C2=A0any transaction conflicting transaction, so long as = it has a higher fee. Is there a reason this would be undesirable?

Corey

On Sat, Jun 26, 2021 at 3:00 PM Jeremy via bitco= in-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
If the p= arties trust each other, rbf is still opt-in. Just don't do it?
On Sat, = Jun 26, 2021, 9:30 AM Billy Tetrud via bitcoin-dev <bitcoin-dev@lists.li= nuxfoundation.org> wrote:
>=C2=A0 services providers are offering zero-conf channels, where you can start to = spend instantly [0]. I believe that's an interesting usage

I agree those are interesting and useful cases. I suppose I should c= larify that when I asked if bitcoin should continue supporting 0-conf trans= actions, I meant: should we make design decisions based on whether it makes= raw 0-conf transactions more or less difficult to double spend on? I do th= ink 0-conf transactions=C2=A0can be useful in situations where there is som= e level of trust (either direct trust between the interacting parties, or d= isperse trust that most people won't try to double spend, perhaps becau= se the transaction is small or their identity is tied to it). Fidelity bond= s sound like an interesting way to mitigate=C2=A0sybil attacks in a reputat= ion system.

On Thu, Jun 24, 2021 at 5:23 PM Antoine Riard <an= toine.riard@gmail.com> wrote:
> Do we as a community want to sup= port 0-conf payments in any way at this
> point? It seems rather sill= y to make software design decisions to
> accommodate 0-conf payments = when there are better mechanisms for fast
> payments (ie lightning).<= br>
Well, we have zero-conf LN channels ? Actually, Lightning channel fu= nding transactions should be buried under a few blocks, though few services= providers are offering zero-conf channels, where you can start to spend in= stantly [0]. I believe that's an interesting usage, though IMHO as ment= ioned we can explore different security models to make 0-conf safe (reputat= ion/fidelity-bond).

> One question I have is: how does software g= enerally inform the user about
0-conf payment detection?

Yes gene= rally it's something like an "Unconfirmed" annotation on inco= ming txn, though at least this is what Blockstream Green or Electrum are do= ing.

> But I
suppose it would depend on how often 0-conf is us= ed in the bitcoin
ecosystem at this point, which I don't have any da= ta on.

There are few Bitcoin services well-known to rely on 0-conf. = Beyond how much of the Bitcoin traffic is tied to a 0-conf is a hard questi= on, a lot of 0-confs service providers are going to be reluctant to share t= he information, for a really good reason you will learn a subset of their b= usiness volumes.

I'll see if I can come up with some Fermi estim= ation on this front.

[0] https://www.bitrefill.= com/thor-turbo-channels/

Le=C2=A0mer. 16 juin 2021 =C3=A0=C2=A020:58= , Billy Tetrud <billy.tetrud@gmail.com> a =C3=A9crit=C2=A0:
= Russel O'Connor rec= ently opined that RBF should=C2=A0be standard treatment of all transact= ions, rather than as a transaction opt-in/out. I agree with that. Any confi= guration in a transaction that has not been committed into a block yet simp= ly can't be relied upon. Miners also have a clear incentive to ignore R= BF rules and mine anything that passes consensus. At best opting out of RBF= is a weak defense, and at worst it's simply a false sense of security = that is likely to actively=C2=A0lead to theft events.=C2=A0

Do we as a community want to support 0-conf payments in any way at = this point? It seems rather silly=C2=A0to make software design decisions to= accommodate=C2=A00-conf payments when there are better mechanisms for fast= payments (ie lightning).=C2=A0

One question I hav= e is: how does software generally inform the user about 0-conf payment dete= ction? Does software generally tell the user something along the lines of &= quot;This payment has not been finalized yet. All recipients should wait un= til the transaction has at least 1 confirmation, and most recipients should= wait for 6 confirmations" ? I think unless we pressure software to be= very explicit about what counts as finality, users will simply continue to= do what they've always done. Rolling out this policy change over the c= ourse of a year or two seems fine, no need to rush. But I suppose it would = depend on how often 0-conf is used in the bitcoin ecosystem at this point, = which I don't have any data on.=C2=A0

On Tue, Jun 15, 2021 at 10:0= 0 AM Antoine Riard via bitcoin-dev <bitcoin-dev@lists= .linuxfoundation.org> wrote:
Hi,

I'm writing to pro= pose deprecation of opt-in RBF in favor of full-RBF as the Bitcoin Core'= ;s default replacement policy in version 24.0. As a reminder, the next rele= ase is 22.0, aimed for August 1st, assuming agreement is reached, this poli= cy change would enter into deployment phase a year from now.

Even i= f this replacement policy has been deemed as highly controversial a few yea= rs ago, ongoing and anticipated changes in the Bitcoin ecosystem are motiva= ting this proposal.

# RBF opt-out as a DoS Vector against Multi-Part= y Funded Transactions

As explained in "On Mempool Funny Games a= gainst Multi-Party Funded Transactions'', 2nd issue [0], an attacke= r can easily DoS a multi-party funded transactions by propagating an RBF op= t-out double-spend of its contributed input before the honest transaction i= s broadcasted by the protocol orchester. DoSes are qualified in the sense o= f either an attacker wasting timevalue of victim's inputs or forcing ex= haustion of the fee-bumping =C2=A0reserve.

This affects a series of = Bitcoin protocols such as Coinjoin, onchain DLCs and dual-funded LN channel= s. As those protocols are still in the early phase of deployment, it doesn&= #39;t seem to have been executed in the wild for now.=C2=A0 That said, cons= idering that dual-funded are more efficient from a liquidity standpoint, we= can expect them to be widely relied on, once Lightning enters in a more ma= ture phase. At that point, it should become economically rational for liqui= dity service providers to launch those DoS attacks against their competitor= s to hijack user traffic.

Beyond that, presence of those DoSes will = complicate the design and deployment of multi-party Bitcoin protocols such = as payment pools/multi-party channels. Note, Lightning Pool isn't affec= ted as there is a preliminary stage where batch participants are locked-in = their funds within an account witnessScript shared with the orchestrer.
=
Of course, even assuming full-rbf, propagation of the multi-party funde= d transactions can still be interfered with by an attacker, simply broadcas= ting a double-spend with a feerate equivalent to the honest transaction. Ho= wever, it tightens the attack scenario to a scorched earth approach, where = the attacker has to commit equivalent fee-bumping reserve to maintain the p= inning and might lose the "competing" fees to miners.

# RB= F opt-out as a Mempools Partitions Vector

A longer-term issue is the= risk of mempools malicious partitions, where an attacker exploits network = topology or divergence in mempools policies to partition network mempools i= n different subsets. From then a wide range of attacks can be envisioned su= ch as package pinning [1], artificial congestion to provoke LN channels clo= sure or manipulation of fee-estimator's feerate (the Core's one wou= ldn't be affected as it relies on block confirmation, though other fee = estimators designs deployed across the ecosystem are likely going to be aff= ected).

Traditionally, mempools partitions have been gauged as a spo= ntaneous outcome of a distributed systems like Bitcoin p2p network and I= 9;m not aware it has been studied in-depth for adversarial purposes. Though= , deployment of second-layer
protocols, heavily relying on sanity of a l= ocal mempool for fee-estimation and robust propagation of their time-sensit= ive transactions might lead to reconsider this position. Acknowledging this= , RBF opt-out is a low-cost partitioning tool, of which the existence nulli= fies most of potential progresses to mitigate malicious partitioning.

To resume, opt-in RBF doesn't suit well deployment of robust seco= nd-layers protocol, even if those issues are still early and deserve more r= esearch. At the same time, I believe a meaningful subset of the ecosystem = =C2=A0are still relying
on 0-confs transactions, even if their security = is relying on far weaker assumptions (opt-in RBF rule is a policy rule, not= a consensus one) [2] A rapid change of Core's mempool rules would be h= arming their quality of services and should be
weighed carefully. On the= other hand, it would be great to nudge them towards more secure handling o= f their 0-confs flows [3]

Let's examine what could be deployed e= cosystem-wise as enhancements to the 0-confs security model.

# Proac= tive security models : Double-spend Monitoring/Receiver-side Fee-Topping wi= th Package Relay

From an attacker viewpoint, opt-in RBF isn't a = big blocker to successful double-spends. Any motivated attacker can modify = Core to mass-connect to a wide portion of the network, announce txA to this= subset, announce txA' to the
merchant. TxA' propagation will be= encumbered by the privacy-preserving inventory timers (`OUTBOUND_INVENTORY= _BROADCAST_INTERVAL`), of which an attacker has no care to respect.

= To detect a successful double-spend attempt, a Bitcoin service should run f= ew full-nodes with well-spread connection graphs and unlinkable between the= m, to avoid being identified then maliciously partitioned from the rest of = the network.

I believe this tactic is already deployed by few Bitcoi= n services, and even one can throw flame at it because it over consumes net= work resources (bandwidth, connection slots, ...), it does procure a securi= ty advantage to the ones doing it.

One further improvement on top of= this protection could be to react after the double-spend detection by atta= ching a CPFP to the merchant transaction, with a higher package feerate tha= n the double-spend. Expected deployment of package-relay as a p2p mechanism= /mempool policy in Bitcoin Core should enable it to do so.

# Reactiv= e security models : EconomicReputation-based Compensations

Another a= pproach could be to react after the fact if a double-spend has been qualifi= ed. If the sender is already known to the service provider, the service acc= ount can be slashed.=C2=A0 If the sender is a low-trusted counterparty to t= he merchant, "side-trust" models could be relied on. For e.g a LN= pubkey with a stacked reputation from your autopilot, LSATs, stake certifi= cates, a HTLC-as-a-fidelity-bond, ... The space is quite wide there but I f= oresee those trust-minimized, decentralized solutions being adopted by the = LN ecosystem to patch the risks when you enter in a channel/HTLC operation = with an anonymous counterparty.

What other cool new tool= s could be considered to enhance 0-confs security ?

To co= nclude, let's avoid replaying the contentious threads of a few years ag= o. What this new thread highlights is the fact that a transaction relay/mem= pool acceptance policy might be beneficial to some class of already-deploye= d
Bitcoin applications while being detrimental to newer ones. How do we= preserve the current interests of 0-confs users while enabling upcoming in= terests of fancy L2s to flourish is a good conversation to have. I think.
If there is ecosystem agreement on switching to full-RBF, but 0.24 so= unds too early, let's defer it to 0.25 or 0.26. I don't think Core = has a consistent deprecation process w.r.t to policy rules heavily relied-o= n by Bitcoin users, if we do so let sets a precedent satisfying as many fol= ks as we can.

Cheers,
Antoine

[0] https://lists.linuxfoundation.org/pipermail/li= ghtning-dev/2021-May/003033.html

[1] See scenario 3 : https://lists.linuxfoundation.o= rg/pipermail/lightning-dev/2020-June/002758.html

[2] https://github.com/bitcoin/bitcoin/pull/1= 0823#issuecomment-466485121

[3] And the LN ecosystem does = have an interest to fix zero-confs security, if "turbo-channels"-= like become normalized for mobile nodes
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
--0000000000001dc81105c600a262--