1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
Return-Path: <antoine.riard@gmail.com>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
by lists.linuxfoundation.org (Postfix) with ESMTP id A3F27C000B
for <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 15 Jun 2021 16:55:29 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 97C5C831C1
for <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 15 Jun 2021 16:55:29 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: smtp1.osuosl.org (amavisd-new);
dkim=pass (2048-bit key) header.d=gmail.com
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id q-uS5ZaVeSYn
for <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 15 Jun 2021 16:55:28 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com
[IPv6:2a00:1450:4864:20::32d])
by smtp1.osuosl.org (Postfix) with ESMTPS id 04B008305A
for <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 15 Jun 2021 16:55:27 +0000 (UTC)
Received: by mail-wm1-x32d.google.com with SMTP id
l7-20020a05600c1d07b02901b0e2ebd6deso20267wms.1
for <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 15 Jun 2021 09:55:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:from:date:message-id:subject:to;
bh=I4y7xjs/r6PAVos9W/NE8CT3Eg5l+OlVllfNwRE+RK4=;
b=cLlWspzlt2cy7ewiItLV3wThY4iy4UddV1DiqmBEY7ciXU+2EuUFrCZiAo91B8JNKO
cK0vwSq6iSRKUuJjN8GCejCVaLVvhlBmO2h2xHRRlmY+os8gA7FZg6+kTE8WfXffhLv7
+ADENEaRL5nQHM3uzfW21s24j0XRszkCwKMCa5lLadvjwFMDIiZ7NrPzALvmS7TxojLE
qMETfvJwEkcAFjBm++AjLhO0luIu0mQL1J5Q105l2AP+RNFV3+OqF8Vn24DP07LBtWur
p2eWBRznK7KQuTmQLN9aa0wcwk9hKFUe9wx0P9Ye2FJaHZP4McknSnJKkEufrwm6nPXm
+rUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=I4y7xjs/r6PAVos9W/NE8CT3Eg5l+OlVllfNwRE+RK4=;
b=AO+kzfMFHC+vSfTtBrGs93iUYVRbGVAoSEVUTVXeJbeEsZ0ig2ibVb95d05iKmoZ3q
akvMWiipTyAg48MYUar5YxjypERv/RRX6kFn/D7LkJd6XBoLdrPkBaQdzHZB1/mqTW68
N+jNBFJbXEY383II6Gc0MTA9XI+U4HtOthAHt/ILb7rr/nnuOrLDB4ADNOFMcMi/oBq9
w4qXTSA/BARmZ+26vsoCiwtlu64GykXL2JSjpwGBBeUbqHJ/Xz9NcnwAReuWVl/Gsa6o
ILV5EgIycMDB8znUnMAUR7xDZt81SyRdnIufupq76+tUERRjIDCnMwlYnwMHRPjD8hG/
Vk9g==
X-Gm-Message-State: AOAM533tYQWhG9s5Olokww3p3q4pGUxLlyjHfM6HQ09TlDc7GhV0F9cf
Vn1y5wSUDCtXcL/dxnWABWhQXRd8wu2Fl34AduwxEsEEb78=
X-Google-Smtp-Source: ABdhPJxc5tuxlJfhLuEA/q7cRbtFooB6f7V0fVI1F3U58c/zGufOnrt136HavnVz7xCPmzTfYDQhBiwUP6IELsss4QM=
X-Received: by 2002:a1c:21c5:: with SMTP id h188mr4799603wmh.165.1623776125798;
Tue, 15 Jun 2021 09:55:25 -0700 (PDT)
MIME-Version: 1.0
From: Antoine Riard <antoine.riard@gmail.com>
Date: Tue, 15 Jun 2021 12:55:14 -0400
Message-ID: <CALZpt+F2b3tdu1+kLZiBPCH2O-pDzZytoRFtX6X0a8UX4OBrDQ@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000002c4beb05c4d0d77d"
X-Mailman-Approved-At: Tue, 15 Jun 2021 17:00:04 +0000
Subject: [bitcoin-dev] Proposal: Full-RBF in Bitcoin Core 24.0
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Jun 2021 16:55:29 -0000
--0000000000002c4beb05c4d0d77d
Content-Type: text/plain; charset="UTF-8"
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
--0000000000002c4beb05c4d0d77d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi,<br><br>I'm writing to propose deprecation of =
opt-in RBF in favor of full-RBF as the Bitcoin Core's default replaceme=
nt policy in version 24.0. As a reminder, the next release is 22.0, aimed f=
or August 1st, assuming agreement is reached, this policy change would ente=
r into deployment phase a year from now. <br><br>Even if this replacement p=
olicy has been deemed as highly controversial a few years ago, ongoing and =
anticipated changes in the Bitcoin ecosystem are motivating this proposal.<=
br><br># RBF opt-out as a DoS Vector against Multi-Party Funded Transaction=
s<br><br>As explained in "On Mempool Funny Games against Multi-Party F=
unded Transactions'', 2nd issue [0], an attacker can easily DoS a m=
ulti-party funded transactions by propagating an RBF opt-out double-spend o=
f 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 =C2=A0reserve.<br><br>This affects a series of Bitcoin protocols su=
ch as Coinjoin, onchain DLCs and dual-funded LN channels. As those protocol=
s are still in the early phase of deployment, it doesn't seem to have b=
een executed in the wild for now.=C2=A0 That said, considering that dual-fu=
nded 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 provide=
rs to launch those DoS attacks against their competitors to hijack user tra=
ffic.<br><br>Beyond that, presence of those DoSes will complicate the desig=
n and deployment of multi-party Bitcoin protocols such as payment pools/mul=
ti-party channels. Note, Lightning Pool isn't affected as there is a pr=
eliminary stage where batch participants are locked-in their funds within a=
n account witnessScript shared with the orchestrer.<br><br>Of course, even =
assuming full-rbf, propagation of the multi-party funded transactions can s=
till be interfered with by an attacker, simply broadcasting a double-spend =
with a feerate equivalent to the honest transaction. However, it tightens t=
he attack scenario to a scorched earth approach, where the attacker has to =
commit equivalent fee-bumping reserve to maintain the pinning and might los=
e the "competing" fees to miners.<br><br># RBF opt-out as a Mempo=
ols Partitions Vector<br><br>A longer-term issue is the risk of mempools ma=
licious partitions, where an attacker exploits network topology or divergen=
ce in mempools policies to partition network mempools in different subsets.=
From then a wide range of attacks can be envisioned such as package pinnin=
g [1], artificial congestion to provoke LN channels closure or manipulation=
of fee-estimator's feerate (the Core's one wouldn't be affecte=
d as it relies on block confirmation, though other fee estimators designs d=
eployed across the ecosystem are likely going to be affected).<br><br>Tradi=
tionally, 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 seco=
nd-layer<br>protocols, heavily relying on sanity of a local mempool for fee=
-estimation and robust propagation of their time-sensitive transactions mig=
ht lead to reconsider this position. Acknowledging this, RBF opt-out is a l=
ow-cost partitioning tool, of which the existence nullifies most of potenti=
al progresses to mitigate malicious partitioning.<br><br><br>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 =C2=A0are still relyi=
ng<br>on 0-confs transactions, even if their security is relying on far wea=
ker 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<br>weighed carefully. On the other hand, it would=
be great to nudge them towards more secure handling of their 0-confs flows=
[3]<br><br>Let's examine what could be deployed ecosystem-wise as enha=
ncements to the 0-confs security model.<br><br># Proactive security models =
: Double-spend Monitoring/Receiver-side Fee-Topping with Package Relay<br><=
br>From an attacker viewpoint, opt-in RBF isn't a big blocker to succes=
sful 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<br>merchant. TxA' propagation will be encumbered by the pr=
ivacy-preserving inventory timers (`OUTBOUND_INVENTORY_BROADCAST_INTERVAL`)=
, of which an attacker has no care to respect.<br><br>To detect a successfu=
l double-spend attempt, a Bitcoin service should run few full-nodes with we=
ll-spread connection graphs and unlinkable between them, to avoid being ide=
ntified then maliciously partitioned from the rest of the network.<br><br>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 (bandw=
idth, connection slots, ...), it does procure a security advantage to the o=
nes doing it.<br><br>One further improvement on top of this protection coul=
d be to react after the double-spend detection by attaching a CPFP to the m=
erchant transaction, with a higher package feerate than the double-spend. E=
xpected deployment of package-relay as a p2p mechanism/mempool policy in Bi=
tcoin Core should enable it to do so.<br><br># Reactive security models : E=
conomicReputation-based Compensations<br><br>Another approach could be to r=
eact 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.=
=C2=A0 If the sender is a low-trusted counterparty to the merchant, "s=
ide-trust" models could be relied on. For e.g a LN pubkey with a stack=
ed reputation from your autopilot, LSATs, stake certificates, a HTLC-as-a-f=
idelity-bond, ... The space is quite wide there but I foresee those trust-m=
inimized, decentralized solutions being adopted by the LN ecosystem to patc=
h the risks when you enter in a channel/HTLC operation with an anonymous co=
unterparty. <br><br></div><div>What other cool new tools could be considere=
d to enhance 0-confs security ?<br></div><div><br>To conclude, let's av=
oid replaying the contentious threads of a few years ago. What this new thr=
ead highlights is the fact that a transaction relay/mempool acceptance poli=
cy might be beneficial to some class of already-deployed <br>Bitcoin applic=
ations while being detrimental to newer ones. How do we preserve the curren=
t interests of 0-confs users while enabling upcoming interests of fancy L2s=
to flourish is a good conversation to have. I think.<br><br>If there is ec=
osystem agreement on switching to full-RBF, but 0.24 sounds too early, let&=
#39;s defer it to 0.25 or 0.26. I don't think Core has a consistent dep=
recation 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.<br><br=
>Cheers,<br>Antoine<br><br>[0] <a href=3D"https://lists.linuxfoundation.org=
/pipermail/lightning-dev/2021-May/003033.html">https://lists.linuxfoundatio=
n.org/pipermail/lightning-dev/2021-May/003033.html</a><br><br>[1] See scena=
rio 3 : <a href=3D"https://lists.linuxfoundation.org/pipermail/lightning-de=
v/2020-June/002758.html">https://lists.linuxfoundation.org/pipermail/lightn=
ing-dev/2020-June/002758.html</a><br><br>[2] <a href=3D"https://github.com/=
bitcoin/bitcoin/pull/10823#issuecomment-466485121">https://github.com/bitco=
in/bitcoin/pull/10823#issuecomment-466485121</a><br><br></div>[3] And the L=
N ecosystem does have an interest to fix zero-confs security, if "turb=
o-channels"-like become normalized for mobile nodes<br></div>
--0000000000002c4beb05c4d0d77d--
|