public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
@ 2021-06-15 16:55 Antoine Riard
  2021-06-17  0:58 ` Billy Tetrud
  2021-12-18 16:51 ` Jeremy
  0 siblings, 2 replies; 12+ messages in thread
From: Antoine Riard @ 2021-06-15 16:55 UTC (permalink / raw)
  To: Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 7434 bytes --]

Hi,

I'm writing to propose 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 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 the Bitcoin ecosystem are
motivating this proposal.

# RBF opt-out as a DoS Vector against Multi-Party Funded Transactions

As explained in "On Mempool Funny Games against Multi-Party Funded
Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
funded transactions by propagating an RBF opt-out double-spend of its
contributed input before the honest transaction is broadcasted by the
protocol orchester. DoSes are qualified in the sense of either an attacker
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 the early
phase of deployment, it doesn't seem to have been executed in the wild for
now.  That said, considering 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 mature phase. At that point, it should become
economically rational for liquidity service providers to launch those 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 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 funded
transactions can still be interfered with by an attacker, simply
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 reserve
to maintain the pinning and might lose the "competing" fees to miners.

# 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 mempools policies to
partition network mempools in different subsets. From then 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 relies
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 not aware
it has been studied in-depth for adversarial purposes. Though, deployment
of second-layer
protocols, heavily relying on sanity of a local mempool for fee-estimation
and robust propagation of their time-sensitive transactions 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 deserve more research.
At the same time, I believe a meaningful subset of the 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 consensus one) [2] A
rapid change of Core's mempool rules would be harming their quality of
services and should be
weighed carefully. On the other hand, it would be great to nudge them
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 should 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 security 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. Expected deployment of
package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
relay/mempool acceptance policy might be beneficial to some class of
already-deployed
Bitcoin applications while being detrimental to newer ones. How do we
preserve the current interests of 0-confs users while enabling upcoming
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 folks as
we can.

Cheers,
Antoine

[0]
https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes

[-- Attachment #2: Type: text/html, Size: 8068 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-15 16:55 [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0 Antoine Riard
@ 2021-06-17  0:58 ` Billy Tetrud
  2021-06-17 22:28   ` Greg Sanders
  2021-06-25  0:23   ` Antoine Riard
  2021-12-18 16:51 ` Jeremy
  1 sibling, 2 replies; 12+ messages in thread
From: Billy Tetrud @ 2021-06-17  0:58 UTC (permalink / raw)
  To: Antoine Riard, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 9526 bytes --]

Russel O'Connor recently opined
<https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
that RBF should be standard treatment of all transactions, rather than 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 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 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 to
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 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 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 bitcoin
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-RBF 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 the Bitcoin ecosystem are
> motivating this proposal.
>
> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>
> As explained in "On Mempool Funny Games against Multi-Party Funded
> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
> funded transactions by propagating an RBF opt-out double-spend of its
> contributed input before the honest transaction is broadcasted by the
> protocol orchester. DoSes are qualified in the sense of either an attacker
> 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 the early
> phase of deployment, it doesn't seem to have been executed in the wild for
> now.  That said, considering 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 mature phase. At that point, it should become
> economically rational for liquidity service providers to launch those 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 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 funded
> transactions can still be interfered with by an attacker, simply
> 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 reserve
> to maintain the pinning and might lose the "competing" fees to miners.
>
> # 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 mempools policies to
> partition network mempools in different subsets. From then 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 relies
> 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 not aware
> it has been studied in-depth for adversarial purposes. Though, deployment
> of second-layer
> protocols, heavily relying on sanity of a local mempool for fee-estimation
> and robust propagation of their time-sensitive transactions 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 deserve more research.
> At the same time, I believe a meaningful subset of the 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 consensus one) [2] A
> rapid change of Core's mempool rules would be harming their quality of
> services and should be
> weighed carefully. On the other hand, it would be great to nudge them
> 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 should 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 security 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. Expected deployment of
> package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
> relay/mempool acceptance policy might be beneficial to some class of
> already-deployed
> Bitcoin applications while being detrimental to newer ones. How do we
> preserve the current interests of 0-confs users while enabling upcoming
> 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 folks as
> we can.
>
> Cheers,
> Antoine
>
> [0]
> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

[-- Attachment #2: Type: text/html, Size: 10535 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-17  0:58 ` Billy Tetrud
@ 2021-06-17 22:28   ` Greg Sanders
  2021-06-25  0:23   ` Antoine Riard
  1 sibling, 0 replies; 12+ messages in thread
From: Greg Sanders @ 2021-06-17 22:28 UTC (permalink / raw)
  To: Billy Tetrud, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 10362 bytes --]

Transaction analysis tools do take the signal into account, but I'm unsure
if retail, non-custodial wallets use this information.

Historically the biggest pushback has been from services like Bitrefill
which have had quite a bit of success with 0-conf payments, but perhaps LN
adoption is at a point where it's less of an impact?

On Fri, Jun 18, 2021 at 4:15 AM Billy Tetrud via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Russel O'Connor recently opined
> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
> 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 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 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 bitcoin
> 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-RBF 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 the Bitcoin ecosystem are
>> motivating this proposal.
>>
>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>
>> As explained in "On Mempool Funny Games against Multi-Party Funded
>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>> funded transactions by propagating an RBF opt-out double-spend of its
>> contributed input before the honest transaction is broadcasted by the
>> protocol orchester. DoSes are qualified in the sense of either an attacker
>> 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 the early
>> phase of deployment, it doesn't seem to have been executed in the wild for
>> now.  That said, considering 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 mature phase. At that point, it should become
>> economically rational for liquidity service providers to launch those 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 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 funded
>> transactions can still be interfered with by an attacker, simply
>> 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 reserve
>> to maintain the pinning and might lose the "competing" fees to miners.
>>
>> # 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 mempools policies to
>> partition network mempools in different subsets. From then 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 relies
>> 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 not aware
>> it has been studied in-depth for adversarial purposes. Though, deployment
>> of second-layer
>> protocols, heavily relying on sanity of a local mempool for
>> fee-estimation and robust propagation of their time-sensitive transactions
>> 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 deserve
>> more research. At the same time, I believe a meaningful subset of the
>> 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 consensus one) [2] A
>> rapid change of Core's mempool rules would be harming their quality of
>> services and should be
>> weighed carefully. On the other hand, it would be great to nudge them
>> 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 should 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 security 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. Expected deployment of
>> package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
>> relay/mempool acceptance policy might be beneficial to some class of
>> already-deployed
>> Bitcoin applications while being detrimental to newer ones. How do we
>> preserve the current interests of 0-confs users while enabling upcoming
>> 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 folks as
>> we can.
>>
>> Cheers,
>> Antoine
>>
>> [0]
>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>> _______________________________________________
>> 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
>

[-- Attachment #2: Type: text/html, Size: 11716 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-17  0:58 ` Billy Tetrud
  2021-06-17 22:28   ` Greg Sanders
@ 2021-06-25  0:23   ` Antoine Riard
  2021-06-26 16:13     ` Billy Tetrud
  1 sibling, 1 reply; 12+ messages in thread
From: Antoine Riard @ 2021-06-25  0:23 UTC (permalink / raw)
  To: Billy Tetrud; +Cc: Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 11476 bytes --]

> 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 fast
> 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 start to spend
instantly [0]. I believe that's an interesting usage, though IMHO 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 Electrum 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 how
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 à 20:58, Billy Tetrud <billy.tetrud@gmail.com> a
écrit :

> Russel O'Connor recently opined
> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
> 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 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 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 bitcoin
> 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-RBF 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 the Bitcoin ecosystem are
>> motivating this proposal.
>>
>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>
>> As explained in "On Mempool Funny Games against Multi-Party Funded
>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>> funded transactions by propagating an RBF opt-out double-spend of its
>> contributed input before the honest transaction is broadcasted by the
>> protocol orchester. DoSes are qualified in the sense of either an attacker
>> 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 the early
>> phase of deployment, it doesn't seem to have been executed in the wild for
>> now.  That said, considering 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 mature phase. At that point, it should become
>> economically rational for liquidity service providers to launch those 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 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 funded
>> transactions can still be interfered with by an attacker, simply
>> 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 reserve
>> to maintain the pinning and might lose the "competing" fees to miners.
>>
>> # 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 mempools policies to
>> partition network mempools in different subsets. From then 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 relies
>> 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 not aware
>> it has been studied in-depth for adversarial purposes. Though, deployment
>> of second-layer
>> protocols, heavily relying on sanity of a local mempool for
>> fee-estimation and robust propagation of their time-sensitive transactions
>> 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 deserve
>> more research. At the same time, I believe a meaningful subset of the
>> 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 consensus one) [2] A
>> rapid change of Core's mempool rules would be harming their quality of
>> services and should be
>> weighed carefully. On the other hand, it would be great to nudge them
>> 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 should 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 security 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. Expected deployment of
>> package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
>> relay/mempool acceptance policy might be beneficial to some class of
>> already-deployed
>> Bitcoin applications while being detrimental to newer ones. How do we
>> preserve the current interests of 0-confs users while enabling upcoming
>> 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 folks as
>> we can.
>>
>> Cheers,
>> Antoine
>>
>> [0]
>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>

[-- Attachment #2: Type: text/html, Size: 12540 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-25  0:23   ` Antoine Riard
@ 2021-06-26 16:13     ` Billy Tetrud
  2021-06-26 19:00       ` Jeremy
  0 siblings, 1 reply; 12+ messages in thread
From: Billy Tetrud @ 2021-06-26 16:13 UTC (permalink / raw)
  To: Antoine Riard; +Cc: Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 12623 bytes --]

>  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 parties,
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). Fidelity
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 <antoine.riard@gmail.com>
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 fast
> > 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 start to spend
> instantly [0]. I believe that's an interesting usage, though IMHO 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 Electrum 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 how
> 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 à 20:58, Billy Tetrud <billy.tetrud@gmail.com> a
> écrit :
>
>> Russel O'Connor recently opined
>> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
>> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
>> 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 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 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 bitcoin
>> 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-RBF 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 the Bitcoin ecosystem
>>> are motivating this proposal.
>>>
>>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>>
>>> As explained in "On Mempool Funny Games against Multi-Party Funded
>>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>>> funded transactions by propagating an RBF opt-out double-spend of its
>>> contributed input before the honest transaction is broadcasted by the
>>> protocol orchester. DoSes are qualified in the sense of either an attacker
>>> 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 the early
>>> phase of deployment, it doesn't seem to have been executed in the wild for
>>> now.  That said, considering 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 mature phase. At that point, it should become
>>> economically rational for liquidity service providers to launch those 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 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 funded
>>> transactions can still be interfered with by an attacker, simply
>>> 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 reserve
>>> to maintain the pinning and might lose the "competing" fees to miners.
>>>
>>> # 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 mempools policies to
>>> partition network mempools in different subsets. From then 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 relies
>>> 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 not aware
>>> it has been studied in-depth for adversarial purposes. Though, deployment
>>> of second-layer
>>> protocols, heavily relying on sanity of a local mempool for
>>> fee-estimation and robust propagation of their time-sensitive transactions
>>> 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 deserve
>>> more research. At the same time, I believe a meaningful subset of the
>>> 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 consensus one) [2] A
>>> rapid change of Core's mempool rules would be harming their quality of
>>> services and should be
>>> weighed carefully. On the other hand, it would be great to nudge them
>>> 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 should
>>> 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 security 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. Expected
>>> deployment of package-relay as a p2p mechanism/mempool policy in Bitcoin
>>> 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 provider, 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 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 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 transaction
>>> relay/mempool acceptance policy might be beneficial to some class of
>>> already-deployed
>>> Bitcoin applications while being detrimental to newer ones. How do we
>>> preserve the current interests of 0-confs users while enabling upcoming
>>> 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 folks as
>>> we can.
>>>
>>> Cheers,
>>> Antoine
>>>
>>> [0]
>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>>> _______________________________________________
>>> bitcoin-dev mailing list
>>> bitcoin-dev@lists.linuxfoundation.org
>>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>>
>>

[-- Attachment #2: Type: text/html, Size: 13781 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-26 16:13     ` Billy Tetrud
@ 2021-06-26 19:00       ` Jeremy
  2021-06-30 14:06         ` Corey Haddad
  0 siblings, 1 reply; 12+ messages in thread
From: Jeremy @ 2021-06-26 19:00 UTC (permalink / raw)
  To: Billy Tetrud, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 13255 bytes --]

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 parties,
> 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). Fidelity
> 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 <antoine.riard@gmail.com>
> 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 fast
>> > 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 start to spend
>> instantly [0]. I believe that's an interesting usage, though IMHO 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 Electrum 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 how
>> 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 à 20:58, Billy Tetrud <billy.tetrud@gmail.com> a
>> écrit :
>>
>>> Russel O'Connor recently opined
>>> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
>>> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
>>> 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 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 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 bitcoin
>>> 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-RBF
>>>> 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 the Bitcoin ecosystem
>>>> are motivating this proposal.
>>>>
>>>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>>>
>>>> As explained in "On Mempool Funny Games against Multi-Party Funded
>>>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>>>> funded transactions by propagating an RBF opt-out double-spend of its
>>>> contributed input before the honest transaction is broadcasted by the
>>>> protocol orchester. DoSes are qualified in the sense of either an attacker
>>>> 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 the early
>>>> phase of deployment, it doesn't seem to have been executed in the wild for
>>>> now.  That said, considering 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 mature phase. At that point, it should become
>>>> economically rational for liquidity service providers to launch those 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 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
>>>> funded transactions can still be interfered with by an attacker, simply
>>>> 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 reserve
>>>> to maintain the pinning and might lose the "competing" fees to miners.
>>>>
>>>> # 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 mempools policies to
>>>> partition network mempools in different subsets. From then 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 relies
>>>> 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 not aware
>>>> it has been studied in-depth for adversarial purposes. Though, deployment
>>>> of second-layer
>>>> protocols, heavily relying on sanity of a local mempool for
>>>> fee-estimation and robust propagation of their time-sensitive transactions
>>>> 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 deserve
>>>> more research. At the same time, I believe a meaningful subset of the
>>>> 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 consensus one)
>>>> [2] A rapid change of Core's mempool rules would be harming their quality
>>>> of services and should be
>>>> weighed carefully. On the other hand, it would be great to nudge them
>>>> 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 should
>>>> 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 security 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. Expected
>>>> deployment of package-relay as a p2p mechanism/mempool policy in Bitcoin
>>>> 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 provider, 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 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 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 transaction
>>>> relay/mempool acceptance policy might be beneficial to some class of
>>>> already-deployed
>>>> Bitcoin applications while being detrimental to newer ones. How do we
>>>> preserve the current interests of 0-confs users while enabling upcoming
>>>> 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 folks as
>>>> we can.
>>>>
>>>> Cheers,
>>>> Antoine
>>>>
>>>> [0]
>>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>>>> _______________________________________________
>>>> 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
>

[-- Attachment #2: Type: text/html, Size: 14831 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-26 19:00       ` Jeremy
@ 2021-06-30 14:06         ` Corey Haddad
  2021-06-30 19:21           ` Billy Tetrud
  0 siblings, 1 reply; 12+ messages in thread
From: Corey Haddad @ 2021-06-30 14:06 UTC (permalink / raw)
  To: Jeremy, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 14872 bytes --]

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 use
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 the
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 RBF
the default, 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?

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 parties,
>> 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). Fidelity
>> 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 <antoine.riard@gmail.com>
>> 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 fast
>>> > 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 start to
>>> spend instantly [0]. I believe that's an interesting usage, though IMHO 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 Electrum
>>> 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 how
>>> 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 à 20:58, Billy Tetrud <billy.tetrud@gmail.com> a
>>> écrit :
>>>
>>>> Russel O'Connor recently opined
>>>> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
>>>> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
>>>> 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 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 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 bitcoin
>>>> 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-RBF
>>>>> 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 the
>>>>> Bitcoin ecosystem are motivating this proposal.
>>>>>
>>>>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>>>>
>>>>> As explained in "On Mempool Funny Games against Multi-Party Funded
>>>>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>>>>> funded transactions by propagating an RBF opt-out double-spend of its
>>>>> contributed input before the honest transaction is broadcasted by the
>>>>> protocol orchester. DoSes are qualified in the sense of either an attacker
>>>>> 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 the early
>>>>> phase of deployment, it doesn't seem to have been executed in the wild for
>>>>> now.  That said, considering 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 mature phase. At that point, it should become
>>>>> economically rational for liquidity service providers to launch those 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 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
>>>>> funded transactions can still be interfered with by an attacker, simply
>>>>> 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 reserve
>>>>> to maintain the pinning and might lose the "competing" fees to miners.
>>>>>
>>>>> # 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 mempools
>>>>> policies to partition network mempools in different subsets. From then 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 relies
>>>>> 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 not aware
>>>>> it has been studied in-depth for adversarial purposes. Though, deployment
>>>>> of second-layer
>>>>> protocols, heavily relying on sanity of a local mempool for
>>>>> fee-estimation and robust propagation of their time-sensitive transactions
>>>>> 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 deserve
>>>>> more research. At the same time, I believe a meaningful subset of the
>>>>> 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 consensus one)
>>>>> [2] A rapid change of Core's mempool rules would be harming their quality
>>>>> of services and should be
>>>>> weighed carefully. On the other hand, it would be great to nudge them
>>>>> 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 should
>>>>> 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 security 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. Expected
>>>>> deployment of package-relay as a p2p mechanism/mempool policy in Bitcoin
>>>>> 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 provider,
>>>>> 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 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 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 transaction
>>>>> relay/mempool acceptance policy might be beneficial to some class of
>>>>> already-deployed
>>>>> Bitcoin applications while being detrimental to newer ones. How do we
>>>>> preserve the current interests of 0-confs users while enabling upcoming
>>>>> 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 folks as
>>>>> we can.
>>>>>
>>>>> Cheers,
>>>>> Antoine
>>>>>
>>>>> [0]
>>>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>>>>> _______________________________________________
>>>>> 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
>

[-- Attachment #2: Type: text/html, Size: 17007 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-30 14:06         ` Corey Haddad
@ 2021-06-30 19:21           ` Billy Tetrud
  0 siblings, 0 replies; 12+ messages in thread
From: Billy Tetrud @ 2021-06-30 19:21 UTC (permalink / raw)
  To: Corey Haddad, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 16378 bytes --]

>  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 use
> 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 the
> 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 RBF
> the default, 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?
>
> 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 parties,
>>> 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). Fidelity
>>> 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 <antoine.riard@gmail.com>
>>> 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 fast
>>>> > 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 start to
>>>> spend instantly [0]. I believe that's an interesting usage, though IMHO 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 Electrum
>>>> 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 how
>>>> 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 à 20:58, Billy Tetrud <billy.tetrud@gmail.com> a
>>>> écrit :
>>>>
>>>>> Russel O'Connor recently opined
>>>>> <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019061.html>
>>>>> that RBF should be standard treatment of all transactions, rather than 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 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 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 to
>>>>> 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 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 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 bitcoin
>>>>> 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-RBF
>>>>>> 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 the
>>>>>> Bitcoin ecosystem are motivating this proposal.
>>>>>>
>>>>>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>>>>>
>>>>>> As explained in "On Mempool Funny Games against Multi-Party Funded
>>>>>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>>>>>> funded transactions by propagating an RBF opt-out double-spend of its
>>>>>> contributed input before the honest transaction is broadcasted by the
>>>>>> protocol orchester. DoSes are qualified in the sense of either an attacker
>>>>>> 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 the early
>>>>>> phase of deployment, it doesn't seem to have been executed in the wild for
>>>>>> now.  That said, considering 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 mature phase. At that point, it should become
>>>>>> economically rational for liquidity service providers to launch those 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 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
>>>>>> funded transactions can still be interfered with by an attacker, simply
>>>>>> 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 reserve
>>>>>> to maintain the pinning and might lose the "competing" fees to miners.
>>>>>>
>>>>>> # 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 mempools
>>>>>> policies to partition network mempools in different subsets. From then 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 relies
>>>>>> 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 not aware
>>>>>> it has been studied in-depth for adversarial purposes. Though, deployment
>>>>>> of second-layer
>>>>>> protocols, heavily relying on sanity of a local mempool for
>>>>>> fee-estimation and robust propagation of their time-sensitive transactions
>>>>>> 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 deserve
>>>>>> more research. At the same time, I believe a meaningful subset of the
>>>>>> 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 consensus one)
>>>>>> [2] A rapid change of Core's mempool rules would be harming their quality
>>>>>> of services and should be
>>>>>> weighed carefully. On the other hand, it would be great to nudge them
>>>>>> 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 should
>>>>>> 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 security
>>>>>> 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. Expected
>>>>>> deployment of package-relay as a p2p mechanism/mempool policy in Bitcoin
>>>>>> 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 provider,
>>>>>> 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 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 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 transaction
>>>>>> relay/mempool acceptance policy might be beneficial to some class of
>>>>>> already-deployed
>>>>>> Bitcoin applications while being detrimental to newer ones. How do we
>>>>>> preserve the current interests of 0-confs users while enabling upcoming
>>>>>> 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 folks as
>>>>>> we can.
>>>>>>
>>>>>> Cheers,
>>>>>> Antoine
>>>>>>
>>>>>> [0]
>>>>>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>>>>>> _______________________________________________
>>>>>> 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
>

[-- Attachment #2: Type: text/html, Size: 18515 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-06-15 16:55 [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0 Antoine Riard
  2021-06-17  0:58 ` Billy Tetrud
@ 2021-12-18 16:51 ` Jeremy
  2021-12-18 17:52   ` Peter Todd
  2021-12-19 18:55   ` Antoine Riard
  1 sibling, 2 replies; 12+ messages in thread
From: Jeremy @ 2021-12-18 16:51 UTC (permalink / raw)
  To: Antoine Riard, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 8523 bytes --]

Small idea:

ease into getting rid of full-rbf by keeping the flag working, but make
enforcement of non-replaceability something that happens n seconds after
first seen.

this reduces the ability to partition the mempools by broadcasting
irreplaceable conflicts all at once, and slowly eases clients off of
relying on non-RBF.

we might start with 60 seconds, and then double every release till we get
to 600 at which point we disable it.
--
@JeremyRubin <https://twitter.com/JeremyRubin>
<https://twitter.com/JeremyRubin>


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-RBF 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 the Bitcoin ecosystem are
> motivating this proposal.
>
> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>
> As explained in "On Mempool Funny Games against Multi-Party Funded
> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
> funded transactions by propagating an RBF opt-out double-spend of its
> contributed input before the honest transaction is broadcasted by the
> protocol orchester. DoSes are qualified in the sense of either an attacker
> 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 the early
> phase of deployment, it doesn't seem to have been executed in the wild for
> now.  That said, considering 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 mature phase. At that point, it should become
> economically rational for liquidity service providers to launch those 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 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 funded
> transactions can still be interfered with by an attacker, simply
> 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 reserve
> to maintain the pinning and might lose the "competing" fees to miners.
>
> # 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 mempools policies to
> partition network mempools in different subsets. From then 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 relies
> 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 not aware
> it has been studied in-depth for adversarial purposes. Though, deployment
> of second-layer
> protocols, heavily relying on sanity of a local mempool for fee-estimation
> and robust propagation of their time-sensitive transactions 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 deserve more research.
> At the same time, I believe a meaningful subset of the 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 consensus one) [2] A
> rapid change of Core's mempool rules would be harming their quality of
> services and should be
> weighed carefully. On the other hand, it would be great to nudge them
> 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 should 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 security 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. Expected deployment of
> package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
> relay/mempool acceptance policy might be beneficial to some class of
> already-deployed
> Bitcoin applications while being detrimental to newer ones. How do we
> preserve the current interests of 0-confs users while enabling upcoming
> 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 folks as
> we can.
>
> Cheers,
> Antoine
>
> [0]
> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

[-- Attachment #2: Type: text/html, Size: 10418 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-12-18 16:51 ` Jeremy
@ 2021-12-18 17:52   ` Peter Todd
  2021-12-20  2:30     ` damian
  2021-12-19 18:55   ` Antoine Riard
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Todd @ 2021-12-18 17:52 UTC (permalink / raw)
  To: Jeremy, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

On Sat, Dec 18, 2021 at 08:51:46AM -0800, Jeremy via bitcoin-dev wrote:
> Small idea:
> 
> ease into getting rid of full-rbf by keeping the flag working, but make
> enforcement of non-replaceability something that happens n seconds after
> first seen.
> 
> this reduces the ability to partition the mempools by broadcasting
> irreplaceable conflicts all at once, and slowly eases clients off of
> relying on non-RBF.
> 
> we might start with 60 seconds, and then double every release till we get
> to 600 at which point we disable it.

Making replacability turn on _after_ an expiry time is reached has been
suggested before, IIRC by Matt Corallo. However I believe the approach of
enabling full-rbf _until_ a time is reached is clever and novel.

I'd suggest doing both at once. Long-running txs are certainly useful. But if a
tx hasn't been mined in a few blocks, it certainly can't be relied on for
zeroconf.

-- 
https://petertodd.org 'peter'[:-1]@petertodd.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-12-18 16:51 ` Jeremy
  2021-12-18 17:52   ` Peter Todd
@ 2021-12-19 18:55   ` Antoine Riard
  1 sibling, 0 replies; 12+ messages in thread
From: Antoine Riard @ 2021-12-19 18:55 UTC (permalink / raw)
  To: Jeremy; +Cc: Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 10517 bytes --]

> we might start with 60 seconds, and then double every release till we get
to 600 at which point we disable it.

This is clearly new. However, I'm not sure if it's solving multi-party
funding transaction DoS, which was of the motivation to propose to
deprecate opt-in RBF. The malicious counterparty can broadcast its
low-feerate, opt-out spending of its own collateral input far before to
engage in the cooperative funding.

When the funding transaction starts to propagate, the opt-out has been
"first seen" for a while, the replaceability is turned off, the honest
funding is bounced off ?


Taking opportunity to laid out another proposal which has whispered to me
offline :

"(what) if the nversion of outputs (which is set by their creating
transaction) were inspected and
triggered any spend of the output to be required to be flagged to be
replaceable-- as a standardness rule?"

While working to solve the DoS, I believe this approach is introducing an
overhead cost in the funding of multi-party transactions, as from now on,
you have to sanitize your collateral inputs by sending them first to a
replaceable nVersion outputs ? (iirc, this is done by Lightning Pool, where
you have a first step where the inputs are locked in a 2-of-2 with the
orchester before to engage in the batch execution tx).

Current state of the discussion is to introduce a `fullrbf` config-knob
turned to false, see more context here :
https://gnusha.org/bitcoin-core-dev/2021-10-21.log. Proposing an
implementation soon.

Antoine

Le sam. 18 déc. 2021 à 11:51, Jeremy <jlrubin@mit.edu> a écrit :

> Small idea:
>
> ease into getting rid of full-rbf by keeping the flag working, but make
> enforcement of non-replaceability something that happens n seconds after
> first seen.
>
> this reduces the ability to partition the mempools by broadcasting
> irreplaceable conflicts all at once, and slowly eases clients off of
> relying on non-RBF.
>
> we might start with 60 seconds, and then double every release till we get
> to 600 at which point we disable it.
> --
> @JeremyRubin <https://twitter.com/JeremyRubin>
> <https://twitter.com/JeremyRubin>
>
>
> 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-RBF 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 the Bitcoin ecosystem are
>> motivating this proposal.
>>
>> # RBF opt-out as a DoS Vector against Multi-Party Funded Transactions
>>
>> As explained in "On Mempool Funny Games against Multi-Party Funded
>> Transactions'', 2nd issue [0], an attacker can easily DoS a multi-party
>> funded transactions by propagating an RBF opt-out double-spend of its
>> contributed input before the honest transaction is broadcasted by the
>> protocol orchester. DoSes are qualified in the sense of either an attacker
>> 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 the early
>> phase of deployment, it doesn't seem to have been executed in the wild for
>> now.  That said, considering 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 mature phase. At that point, it should become
>> economically rational for liquidity service providers to launch those 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 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 funded
>> transactions can still be interfered with by an attacker, simply
>> 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 reserve
>> to maintain the pinning and might lose the "competing" fees to miners.
>>
>> # 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 mempools policies to
>> partition network mempools in different subsets. From then 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 relies
>> 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 not aware
>> it has been studied in-depth for adversarial purposes. Though, deployment
>> of second-layer
>> protocols, heavily relying on sanity of a local mempool for
>> fee-estimation and robust propagation of their time-sensitive transactions
>> 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 deserve
>> more research. At the same time, I believe a meaningful subset of the
>> 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 consensus one) [2] A
>> rapid change of Core's mempool rules would be harming their quality of
>> services and should be
>> weighed carefully. On the other hand, it would be great to nudge them
>> 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 should 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 security 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. Expected deployment of
>> package-relay as a p2p mechanism/mempool policy in Bitcoin 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 provider, 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 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 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 transaction
>> relay/mempool acceptance policy might be beneficial to some class of
>> already-deployed
>> Bitcoin applications while being detrimental to newer ones. How do we
>> preserve the current interests of 0-confs users while enabling upcoming
>> 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 folks as
>> we can.
>>
>> Cheers,
>> Antoine
>>
>> [0]
>> https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.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 nodes
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>

[-- Attachment #2: Type: text/html, Size: 12375 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
  2021-12-18 17:52   ` Peter Todd
@ 2021-12-20  2:30     ` damian
  0 siblings, 0 replies; 12+ messages in thread
From: damian @ 2021-12-20  2:30 UTC (permalink / raw)
  To: Peter Todd, Bitcoin Protocol Discussion

Good Afternoon,

There is no such thing in Bitcoin as zeroconf but any individual may use 
gossip from mempool if they choose it to prefer it could be possible a 
transaction could exist in the future. You are talking about the 
mempool. The mempool exists on gossip. There are no transactions until 
they are mined and included in a block and information can disappear 
from the mempool. This is Bitcoin where we scientifically make a 
consensus to assure fungibility.

KING JAMES HRMH
Great British Empire

Regards,
The Australian
LORD HIS EXCELLENCY JAMES HRMH (& HMRH)
of Hougun Manor & Glencoe & British Empire
MR. Damian A. James Williamson
Wills

et al.


Willtech
www.willtech.com.au
www.go-overt.com
duigco.org DUIGCO API
and other projects


m. 0487135719
f. +61261470192


This email does not constitute a general advice. Please disregard this 
email if misdelivered.
On 2021-12-18 09:52, Peter Todd via bitcoin-dev wrote:
> On Sat, Dec 18, 2021 at 08:51:46AM -0800, Jeremy via bitcoin-dev wrote:
>> Small idea:
>> 
>> ease into getting rid of full-rbf by keeping the flag working, but 
>> make
>> enforcement of non-replaceability something that happens n seconds 
>> after
>> first seen.
>> 
>> this reduces the ability to partition the mempools by broadcasting
>> irreplaceable conflicts all at once, and slowly eases clients off of
>> relying on non-RBF.
>> 
>> we might start with 60 seconds, and then double every release till we 
>> get
>> to 600 at which point we disable it.
> 
> Making replacability turn on _after_ an expiry time is reached has been
> suggested before, IIRC by Matt Corallo. However I believe the approach 
> of
> enabling full-rbf _until_ a time is reached is clever and novel.
> 
> I'd suggest doing both at once. Long-running txs are certainly useful. 
> But if a
> tx hasn't been mined in a few blocks, it certainly can't be relied on 
> for
> zeroconf.
> 
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-12-20  2:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 16:55 [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0 Antoine Riard
2021-06-17  0:58 ` Billy Tetrud
2021-06-17 22:28   ` Greg Sanders
2021-06-25  0:23   ` Antoine Riard
2021-06-26 16:13     ` Billy Tetrud
2021-06-26 19:00       ` Jeremy
2021-06-30 14:06         ` Corey Haddad
2021-06-30 19:21           ` Billy Tetrud
2021-12-18 16:51 ` Jeremy
2021-12-18 17:52   ` Peter Todd
2021-12-20  2:30     ` damian
2021-12-19 18:55   ` Antoine Riard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox