[bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0

2021-06-15 Thread Antoine Riard via bitcoin-dev
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

Re: [bitcoin-dev] Opinion on proof of stake in future

2021-06-15 Thread James MacWhyte via bitcoin-dev
@Lloyd wrote:

Of course in reality no one wants to keep their coin holding keys online so
> in Alogorand you can authorize a set of "participation keys"[1] that will
> be used to create blocks on your coin holding key's behalf.
> Hopefully you've spotted the problem.
> You can send your participation keys to any malicious party with a nice
> website (see random example [2]) offering you a good return.
> Damn it's still Proof-of-SquareSpace!
>

I believe we are talking about a comparison to PoW, correct? If you want to
mine PoW, you need to buy expensive hardware and configure it to work, and
wait a long time to get any return by solo mining. Or you can join a mining
pool, which might use your hashing power for nefarious purposes. Or you
might skip the hardware all together and fall for some "cloud mining"
scheme with a pretty website and a high rate of advertised return. So as
you can see, Proof-of-SquareSpace exists in PoW as well!

The PoS equivalent of buying mining hardware is setting up your own
validator and not outsourcing that to anyone else. So both PoW and PoS have
the professional/expert way of participating, and the fraud-prone, amateur
way of participating. The only difference is, with PoS the
professional/expert way is accessible to anyone with a raspberry Pi and a
web connection, which is a much lower barrier to entry than PoW.
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] A Stroll through Fee-Bumping Techniques : Input-Based vs Child-Pay-For-Parent

2021-06-15 Thread Lloyd Fournier via bitcoin-dev
On Tue, 15 Jun 2021 at 10:59, Lloyd Fournier  wrote:

>
>
> On Tue, 15 Jun 2021 at 02:47, Antoine Riard 
> wrote:
>
>> > This makes a lot of sense as it matches the semantics of what we are
>> trying
>> to achieve: allow the owner of an output (whether an individual or group)
>> to reduce that output's value to pay a higher fee.
>>
>> Note, I think you're still struggling with some trust issue that anchor
>> upgrade is at least eliminating for LN, namely the pre-agreement among a
>> group of signers about the effective feerate to use at some unknown time
>> point in the future. If you authorize your counterparty for a broadcast at
>> feerate X, how do you prevent a broadcast at feerate Y, where Y is far
>> under X, thus maliciously burning a lot of your fee-bumping reserve ?
>>
>> Of course, one mitigation is to make a contribution to a common
>> fee-bumping output reserve proportional to what has been contributed as a
>> funding collateral. Thus disincentivizing misuse of the common fee-bumping
>> reserve in a game-theoretical way. But if you take the example of a LN
>> channel, you're now running into another issue. Off-chain balances might
>> fluctuate in a way that most of the time, your fee-bumping reserve
>> contribution is out-of-proportion with your balance amounts to protect ?
>> And as such enduring some significant timevalue bleeding on your
>> fee-bumping reserve.
>>
>> Single-party managed fee-bumping reserve doesn't seem to suffer from this
>> drawback ?
>>
>
> I claim that what I am suggesting is a single-party managed fee-bumping
> system that solves all fee-bumping requirements of lightning without
> needing external utxos and without additional interaction or fee
> pre-agreement between parties. On the commit tx you have your balance going
> exclusively towards you which you can unilaterally reduce to increase the
> fee up to whatever threshold you want. With a HTLC or PTLC you also always
> have a tx with an output that you can unilaterally drain to bump fee
> (either the hltc-success or htlc-timeout). Are you saying that there are
> protocols where this would require pre-arrangement or are you saying that
> it would require pre-arrangement in lightning for some reason I don't see?
>

Ok now I see what I am missing: We don't really know who owns certain
outputs in lightning until the most-recent-state-enforcement mechanism has
done its job. i.e. the outputs are 2-of-2s up until that has been resolved.
I was operating on some simplified imaginary lightning. Indeed this makes
the proposal far less attractive and does require interaction and
pre-agreement. This complexity here makes it worse than just keeping
external fee-bumping utxos around (as undesirable as this is). Thanks for
helping me figure this out.

LL
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev