summaryrefslogtreecommitdiff
path: root/26/df20e2520dd7c2aefc66acf7d60cff853fbc04
blob: f427e943a2045fda43115c9766e8c7e7dffbe7be (plain)
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
Return-Path: <gloriajzhao@gmail.com>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id EC4C1C000B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 26 Apr 2021 23:06:48 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp4.osuosl.org (Postfix) with ESMTP id DAA9740534
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 26 Apr 2021 23:06:48 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level: 
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: smtp4.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=gmail.com
Received: from smtp4.osuosl.org ([127.0.0.1])
 by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id zmT7o47Pk_di
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 26 Apr 2021 23:06:47 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com
 [IPv6:2607:f8b0:4864:20::b35])
 by smtp4.osuosl.org (Postfix) with ESMTPS id F154C4053A
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 26 Apr 2021 23:06:46 +0000 (UTC)
Received: by mail-yb1-xb35.google.com with SMTP id c195so66968989ybf.9
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 26 Apr 2021 16:06:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=v9z/OUsMib9lvjxKEmeGS7AG/xSU/am0OZTvx/J1DQc=;
 b=RMf/ySmWA2UaP+bNboWO4kN+B3ZWq9KNQ2hnfxKYiRRvuWgAKDw5sKTmolrgqH09nV
 r8qaFtCPjRGq4cPUoetJjyS0RvJiJpbO+tqvZnb0xmsc+fgDJB4u4doNHKzIdl1afVSv
 P4Wg76T/PqAz2DMI/uz4X8/cfDDjqGnVxgUgGeM+epz5y+qI4l8w+KYv534hVZtjk4EA
 AxCTItKSMUOEnux2Erxhn+F1UMv743/fZmWTV8X2ovlTdzU13mzALgSgwrwLnWjs1DP7
 ClBvq+m1PCllAiV5WL1W1tQPMzE/FiJELhLCbYV1O85TdcPDRdpWKj6kMKivQlgHHyRw
 l09Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=v9z/OUsMib9lvjxKEmeGS7AG/xSU/am0OZTvx/J1DQc=;
 b=Y4b2VlKWLDFgBUb23PcKZFDk2dgC2EI5WH3pNbLvfpLyQPXDWDpx9EFeKlH6JYYy0g
 KoTRh6RNGR9wW13A6lCES5wjy9CAnf14W4tJgp52y+MyK3PKwSaNLA1JvPFwreStg6W8
 36LNciE0+51A7Esrfze2rs2ZJghrFZrw8CZjebIPgnr0JOMInHBl7E7Vt4lha4DuoWz5
 erMl82Poz6q1PhyCBfWJ8sXONyqhJXqMduIEAv+ZmQQlepAVmVQwSPnOqBaPvMvIrHEY
 rlRAoI6YEGPl+YrjWpQUQG1vkWgITRPBTPjGHlHqthS8QuCfD7qWdbWxEU8K/OUNUylR
 r+5g==
X-Gm-Message-State: AOAM5303SXtAZeFFDi4Gn6Jss6uDV4ZoY06DoPePGJvidAwWfmbjnP5X
 /KtJMaW9o5QMb6efFYmUTJQFDQwG4aIUqUd/BWeUJQr14Z4=
X-Google-Smtp-Source: ABdhPJyPYX7a5sEtG7XP7Gj8ahCRiqsWX18Z5mFNEuShJLp7gCXdG4Umsgh7ZlASVDDxwH14Er9Qu1Gs+L75K5mez7Y=
X-Received: by 2002:a25:d40d:: with SMTP id m13mr20021ybf.170.1619478405906;
 Mon, 26 Apr 2021 16:06:45 -0700 (PDT)
MIME-Version: 1.0
References: <CALZpt+E_e=0rjq5_XazV_qH2h=uQrpTLbMRe2K7jVterSAr05w@mail.gmail.com>
In-Reply-To: <CALZpt+E_e=0rjq5_XazV_qH2h=uQrpTLbMRe2K7jVterSAr05w@mail.gmail.com>
From: Gloria Zhao <gloriajzhao@gmail.com>
Date: Mon, 26 Apr 2021 16:06:34 -0700
Message-ID: <CAFXO6=J-3kF4nOqrHLRzN2t+=iCrCDTJh9nD3tY45ihZOAZ8ug@mail.gmail.com>
To: Antoine Riard <antoine.riard@gmail.com>, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000001b024b05c0e833ec"
X-Mailman-Approved-At: Mon, 26 Apr 2021 23:17:13 +0000
Subject: Re: [bitcoin-dev] L2s Onchain Support IRC Workshop
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: Mon, 26 Apr 2021 23:06:49 -0000

--0000000000001b024b05c0e833ec
Content-Type: text/plain; charset="UTF-8"

Hi Antoine,

Thanks for initiating this! I'm interested in joining. Since I mostly live
in L1, my primary goal is to understand what simplest version of package
relay would be sufficient to support transaction relay assumptions made by
L2 applications. For example, if a parent + child package covers the vast
majority of cases and a package limit of 2 is considered acceptable, that
could simplify things quite a bit.

A small note - I believe package relay and sponsorship (or other
fee-bumping primitive) should be separate discussions.

Re: L2-zoology... In general, for the purpose of creating a stable API /
set of assumptions between layers, I'd like to be as concrete as possible.
Speaking for myself, if I'm TDDing for a specific L2 attack, I need test
vectors. A simple description of mempool contents + p2p messages sent is
fine, but pubkeys + transaction hex would be appreciated because we don't
(and probably shouldn't, for the purpose of maintainability) have a lot of
tooling to build L2 transactions in Bitcoin Core. In the other direction,
it's hard to make any guarantees given the complexity of mempool policy,
but perhaps it could be helpful to expose a configurable RPC (e.g. #21413
<https://github.com/bitcoin/bitcoin/pull/21413>) to test a range of
scenarios?

Anyway, looking forward to discussions :)

Best,
Gloria

On Fri, Apr 23, 2021 at 8:51 AM Antoine Riard via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Hi,
>
> During the lastest years, tx-relay and mempool acceptances rules of the
> base layer have been sources of major security and operational concerns for
> Lightning and other Bitcoin second-layers [0]. I think those areas require
> significant improvements to ease design and deployment of higher Bitcoin
> layers and I believe this opinion is shared among the L2 dev community. In
> order to make advancements, it has been discussed a few times in the last
> months to organize in-person workshops to discuss those issues with the
> presence of both L1/L2 devs to make exchange fruitful.
>
> Unfortunately, I don't think we'll be able to organize such in-person
> workshops this year (because you know travel is hard those days...) As a
> substitution, I'm proposing a series of one or more irc meetings. That
> said, this substitution has the happy benefit to gather far more folks
> interested by those issues that you can fit in a room.
>
> # Scope
>
> I would like to propose the following 4 items as topics of discussion.
>
> 1) Package relay design or another generic L2 fee-bumping primitive like
> sponsorship [0]. IMHO, this primitive should at least solve mempools spikes
> making obsolete propagation of transactions with pre-signed feerate, solve
> pinning attacks compromising Lightning/multi-party contract protocol
> safety, offer an usable and stable API to L2 software stack, stay
> compatible with miner and full-node operators incentives and obviously
> minimize CPU/memory DoS vectors.
>
> 2) Deprecation of opt-in RBF toward full-rbf. Opt-in RBF makes it trivial
> for an attacker to partition network mempools in divergent subsets and from
> then launch advanced security or privacy attacks against a Lightning node.
> Note, it might also be a concern for bandwidth bleeding attacks against L1
> nodes.
>
> 3) Guidelines about coordinated cross-layers security disclosures.
> Mitigating a security issue around tx-relay or the mempool in Core might
> have harmful implications for downstream projects. Ideally, L2 projects
> maintainers should be ready to upgrade their protocols in emergency in
> coordination with base layers developers.
>
> 4) Guidelines about L2 protocols onchain security design. Currently
> deployed like Lightning are making a bunch of assumptions on tx-relay and
> mempool acceptances rules. Those rules are non-normative, non-reliable and
> lack documentation. Further, they're devoid of tooling to enforce them at
> runtime [2]. IMHO, it could be preferable to identify a subset of them on
> which second-layers protocols can do assumptions without encroaching too
> much on nodes's policy realm or making the base layer development in those
> areas too cumbersome.
>
> I'm aware that some folks are interested in other topics such as extension
> of Core's mempools package limits or better pricing of RBF replacement. So
> l propose a 2-week concertation period to submit other topics related to
> tx-relay or mempools improvements towards L2s before to propose a finalized
> scope and agenda.
>
> # Goals
>
> 1) Reaching technical consensus.
> 2) Reaching technical consensus, before seeking community consensus as it
> likely has ecosystem-wide implications.
> 3) Establishing a security incident response policy which can be applied
> by dev teams in the future.
> 4) Establishing a philosophy design and associated documentations (BIPs,
> best practices, ...)
>
> # Timeline
>
> 2021-04-23: Start of concertation period
> 2021-05-07: End of concertation period
> 2021-05-10: Proposition of workshop agenda and schedule
> late 2021-05/2021-06: IRC meetings
>
> As the problem space is savagely wide, I've started a collection of
> documents to assist this workshop : https://github.com/ariard/L2-zoology
> Still wip, but I'll have them in a good shape at agenda publication, with
> reading suggestions and open questions to structure discussions.
> Also working on transaction pinning and mempool partitions attacks
> simulations.
>
> If L2s security/p2p/mempool is your jam, feel free to get involved :)
>
> Cheers,
> Antoine
>
> [0] For e.g see optech section on transaction pinning attacks :
> https://bitcoinops.org/en/topics/transaction-pinning/
> [1]
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html
> [2] Lack of reference tooling make it easier to have bug slip in like
> https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002858.html
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--0000000000001b024b05c0e833ec
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>Hi Antoine,</div><div><br></div><div=
>Thanks for initiating this! I&#39;m interested in joining. Since I mostly =
live in L1, my primary goal is to understand what simplest version of packa=
ge relay would be sufficient to support transaction relay assumptions made =
by L2 applications. For example, if a parent + child package covers the vas=
t majority of cases and a package limit of 2 is considered acceptable, that=
 could simplify things quite a bit.</div><div><br></div><div>A small note -=
 I believe package relay and sponsorship (or other fee-bumping primitive) s=
hould be separate discussions.</div><div><br></div><div>Re: L2-zoology... I=
n general, for the purpose of creating a stable API / set of assumptions be=
tween layers, I&#39;d like to be as concrete as possible. Speaking for myse=
lf, if I&#39;m TDDing for a specific L2 attack, I need test vectors. A simp=
le description of mempool contents + p2p messages sent is fine, but pubkeys=
 + transaction hex would be appreciated because we don&#39;t (and probably =
shouldn&#39;t, for the purpose of maintainability) have a lot of tooling to=
 build L2 transactions in Bitcoin Core.  In the other direction, it&#39;s h=
ard to make any guarantees given the complexity of mempool policy, but perh=
aps it could be helpful to expose a configurable RPC (e.g. #<a href=3D"http=
s://github.com/bitcoin/bitcoin/pull/21413">21413</a>) to test a range of sc=
enarios?</div><div><br></div><div>Anyway, looking forward to discussions :)=
<br></div><div><br></div><div>Best,</div><div>Gloria<br></div></div><br><di=
v class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Apr 2=
3, 2021 at 8:51 AM Antoine Riard via bitcoin-dev &lt;<a href=3D"mailto:bitc=
oin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a=
>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><di=
v dir=3D"ltr">Hi,<br><br>During the lastest years, tx-relay and mempool acc=
eptances rules of the base layer have been sources of major security and op=
erational concerns for Lightning and other Bitcoin second-layers [0]. I thi=
nk those areas require significant improvements to ease design and deployme=
nt of higher Bitcoin layers and I believe this opinion is shared among the =
L2 dev community. In order to make advancements, it has been discussed a fe=
w times in the last months to organize in-person workshops to discuss those=
 issues with the presence of both L1/L2 devs to make exchange fruitful.<br>=
<br>Unfortunately, I don&#39;t think we&#39;ll be able to organize such in-=
person workshops this year (because you know travel is hard those days...) =
As a substitution, I&#39;m proposing a series of one or more irc meetings. =
That said, this substitution has the happy benefit to gather far more folks=
 interested by those issues that you can fit in a room.<br><br># Scope<br><=
br>I would like to propose the following 4 items as topics of discussion.<b=
r><br>1) Package relay design or another generic L2 fee-bumping primitive l=
ike sponsorship [0]. IMHO, this primitive should at least solve mempools sp=
ikes making obsolete propagation of transactions with pre-signed feerate, s=
olve pinning attacks compromising Lightning/multi-party contract protocol s=
afety, offer an usable and stable API to L2 software stack, stay compatible=
 with miner and full-node operators incentives and obviously minimize CPU/m=
emory DoS vectors.<br><br>2) Deprecation of opt-in RBF toward full-rbf. Opt=
-in RBF makes it trivial for an attacker to partition network mempools in d=
ivergent subsets and from then launch advanced security or privacy attacks =
against a Lightning node. Note, it might also be a concern for bandwidth bl=
eeding attacks against L1 nodes.<br><br>3) Guidelines about coordinated cro=
ss-layers security disclosures. Mitigating a security issue around tx-relay=
 or the mempool in Core might have harmful implications for downstream proj=
ects. Ideally, L2 projects maintainers should be ready to upgrade their pro=
tocols in emergency in coordination with base layers developers.<br><br>4) =
Guidelines about L2 protocols onchain security design. Currently deployed l=
ike Lightning are making a bunch of assumptions on tx-relay and mempool acc=
eptances rules. Those rules are non-normative, non-reliable and lack docume=
ntation. Further, they&#39;re devoid of tooling to enforce them at runtime =
[2]. IMHO, it could be preferable to identify a subset of them on which sec=
ond-layers protocols can do assumptions without encroaching too much on nod=
es&#39;s policy realm or making the base layer development in those areas t=
oo cumbersome.<br><br>I&#39;m aware that some folks are interested in other=
 topics such as extension of Core&#39;s mempools package limits or better p=
ricing of RBF replacement. So l propose a 2-week concertation period to sub=
mit other topics related to tx-relay or mempools improvements towards L2s b=
efore to propose a finalized scope and agenda.<br><br># Goals<br><br>1) Rea=
ching technical consensus.<br>2) Reaching technical consensus, before seeki=
ng community consensus as it likely has ecosystem-wide implications.<br>3) =
Establishing a security incident response policy which can be applied by de=
v teams in the future.<br>4) Establishing a philosophy design and associate=
d documentations (BIPs, best practices, ...)<br><br># Timeline<br><br>2021-=
04-23: Start of concertation period<br>2021-05-07: End of concertation peri=
od<br>2021-05-10: Proposition of workshop agenda and schedule<br>late 2021-=
05/2021-06: IRC meetings<br><br>As the problem space is savagely wide, I&#3=
9;ve started a collection of documents to assist this workshop : <a href=3D=
"https://github.com/ariard/L2-zoology" target=3D"_blank">https://github.com=
/ariard/L2-zoology</a><br>Still wip, but I&#39;ll have them in a good shape=
 at agenda publication, with reading suggestions and open questions to stru=
cture discussions.<br>Also working on transaction pinning and mempool parti=
tions attacks simulations.<br><br>If L2s security/p2p/mempool is your jam, =
feel free to get involved :)<br><br>Cheers,<br>Antoine<br><br>[0] For e.g s=
ee optech section on transaction pinning attacks : <a href=3D"https://bitco=
inops.org/en/topics/transaction-pinning/" target=3D"_blank">https://bitcoin=
ops.org/en/topics/transaction-pinning/</a><br>[1] <a href=3D"https://lists.=
linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html" targe=
t=3D"_blank">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-S=
eptember/018168.html</a><br>[2] Lack of reference tooling make it easier to=
 have bug slip in like <a href=3D"https://lists.linuxfoundation.org/piperma=
il/lightning-dev/2020-October/002858.html" target=3D"_blank">https://lists.=
linuxfoundation.org/pipermail/lightning-dev/2020-October/002858.html</a><br=
></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div></div>

--0000000000001b024b05c0e833ec--