summaryrefslogtreecommitdiff
path: root/bc/2029e86e1a4848ae8d94334deadefd5e827c51
blob: 5ff102717ec0bd1eaebadb835a8a064672554218 (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
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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
Return-Path: <antoine.riard@gmail.com>
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 0786DC002D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Oct 2022 00:33:28 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp3.osuosl.org (Postfix) with ESMTP id D29876002E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Oct 2022 00:33:27 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D29876002E
Authentication-Results: smtp3.osuosl.org;
 dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
 header.a=rsa-sha256 header.s=20210112 header.b=nH2L3L4K
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.088
X-Spam-Level: 
X-Spam-Status: No, score=-2.088 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, T_KAM_HTML_FONT_INVALID=0.01]
 autolearn=ham autolearn_force=no
Received: from smtp3.osuosl.org ([127.0.0.1])
 by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id AfKWA7PXBvVg
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Oct 2022 00:33:26 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DD50961136
Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com
 [IPv6:2607:f8b0:4864:20::12d])
 by smtp3.osuosl.org (Postfix) with ESMTPS id DD50961136
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Oct 2022 00:33:25 +0000 (UTC)
Received: by mail-il1-x12d.google.com with SMTP id q11so8361236ilj.10
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 18 Oct 2022 17:33:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :from:to:cc:subject:date:message-id:reply-to;
 bh=h+F78upnMZb3SwF/RBUy/f9D4Dz/zBB9rfSfb1CCkdQ=;
 b=nH2L3L4KIPIwVdkPnK8UpJDz5Od4OqiUsN/SuF6GPg2HUJujnfshJWkZRU464zH7cw
 jawr2UpP/X4Dm2Hp2nAae8dJKLNswEEoK1EaHH2X9wYJi7rrjMEWduIi0yzDmYJGFePH
 DpETk8nOZ2+6C70Z0j1M+v3mdk88BHBlhK5bt8kIY+s+k0DylDBj61SHcLoRPe1ac3IN
 0wpL/LUAgM+Rjv71cLq3bSr1sJYAiHripvUm+5clmkQz/YZ/Pw1GyuyzLSTxHxDD/5gT
 O6wK21Y/en+ep867+cvDkzuVkuhFB+Fv0W+sjb98vnUQdS8e8ykQVttwA0Ks5l8e/AHm
 uJ+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=h+F78upnMZb3SwF/RBUy/f9D4Dz/zBB9rfSfb1CCkdQ=;
 b=eIgtP5wxs+NV/Sc18I88t3uFOUxUO4/BQutYjN/mZO65yj4cZzPOGrHOx6lsWSSiqf
 Mrnryw44BVMCJvWDQxLknQ0zUfcC7cMYJ08f8PSWosmWYe5TJj559Wiuq9x6NkdXCSJu
 uZRxDDn9eIh11yeNMyqVNlEcfTiFbePR1ytjeDlJ4ymwwGm6ICKz1qn8h9wb4lIRlrv0
 RZzMz+QhXOQDDOEdkyGWFoIz20Phf7m6PjqhQmvtcdbhEXZ5nXPWgR93ROFce30qQ044
 g2keIbn8Kvis83U8tGwzIPJPFbmMcrFjlw8/OSL4cno9WJPpWfIW6yhW/1D2TSxh/K7g
 jhNQ==
X-Gm-Message-State: ACrzQf1d1NLWEiOphVjShHUo6Kzhm0DTwfAx4W63IYa+XsFXzOZ5DEAX
 DWqcse/QZu4ncswD6Dg6Mo8dKp5zNLEyoMcYOEM+uUAjy6XdCQ==
X-Google-Smtp-Source: AMsMyM7sQfmTyk73rbz3j3HLiYUqSDEeyL8yKFgujbMCb2AcyD7dOv1dg/Ohvmo512VeyazYZVlUnKPA/BSsIC+nnGo=
X-Received: by 2002:a92:c904:0:b0:2f8:ddd9:d49c with SMTP id
 t4-20020a92c904000000b002f8ddd9d49cmr3985682ilp.114.1666139604886; Tue, 18
 Oct 2022 17:33:24 -0700 (PDT)
MIME-Version: 1.0
References: <CAB3F3Dukoz3P3Ne7tCxMiwwAGm3Fv8r_fUkNbGAtGhAZDYDgCQ@mail.gmail.com>
In-Reply-To: <CAB3F3Dukoz3P3Ne7tCxMiwwAGm3Fv8r_fUkNbGAtGhAZDYDgCQ@mail.gmail.com>
From: Antoine Riard <antoine.riard@gmail.com>
Date: Tue, 18 Oct 2022 20:33:13 -0400
Message-ID: <CALZpt+Hr1wCT8VFLWN5iqLG04FqSkdGSQuawCRKab2_uj6OoZQ@mail.gmail.com>
To: Greg Sanders <gsanders87@gmail.com>, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000004bab2905eb585bb1"
X-Mailman-Approved-At: Wed, 19 Oct 2022 00:34:29 +0000
Subject: Re: [bitcoin-dev] Ephemeral Anchors: Fixing V3 Package RBF against
 package limit pinning
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: Wed, 19 Oct 2022 00:33:28 -0000

--0000000000004bab2905eb585bb1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Greg,

Thanks for proposing forward the "ephemeral anchors" policy change.

> In Gloria's proposal for ln-penalty, this is worked
> around by reducing the number of anchors per commitment transaction to 1,
> and each version of the commitment transaction has a unique party's key o=
n
> it. The honest participant can spend their version with their anchor and
> package RBF the other commitment transaction safely.

IIRC, here I think we also need _package relay_ in strict addition of
_package RBF_, otherwise if your Lightning transactions are still relayed
and accepted one by one, your version of the commitment transaction won't
succeed to replace the other counterparties's commitments sleeping in
network mempools. The presence of a remote anchor output on the
counterparty commitment still offers an ability to fee-bump, albeit in
practice more a lucky shot as you might have partitioned network mempools
between your local commitment and the remote commitment disputing the spend
of the same funding UTXO.

> 1) Expand a carveout for "sibling eviction", where if the new child is
> paying "enough" to bump spends from the same parent, it knocks its siblin=
g
> out of the mempool and takes the one child slot. This would solve it, but
> is a new eviction paradigm that would need to be carefully worked through=
.

Note, I wonder about the robustness of such a "sibling eviction" mechanism
in the context of multi-party construction. E.g, a batching payout, where
the participants are competing to each other in a blind way, as they do
want their CPFPs paying back to them to confirm first, enforcing their
individual liquidity preferences. I would think it might artificially lead
the participants to overbid far beyond the top mempool block fees.

>  If we allow non-zero value in ephemeral outputs, does this open up a MEV
>  we are worried about? Wallets should toss all the value directly to fees=
,
>  and add their own additional fees on top, otherwise miners have incentiv=
e
>  to make the smallest utxo burn transaction to claim those funds. They
just
>  confirmed your parent transaction anyways, so do we care?

If we allow non-zero value in ephemeral outputs, I think we're slightly
modifying the incentives games of the channels counterparties, in the sense
if you have a link Alice-Bob, Bob could circular loop a bunch of dust
offered HTLC deduced from Alice balance and committed as fees in the
ephemeral output value, then break the channel on-chain to pocket in the
trimmed value sum (in the limit of your Lightning implementation dust
exposure). Note, this is already possible today if your counterparty is a
miner however iiuc the proposal, here we're lowering the bar.

>  SIGHASH_GROUP like constructs would allow uncommitted ephemeral anchors
>  to be added at spend time, depending on spending requirements.
>  SIGHASH_SINGLE already allows this.

Note, with SIGHASH_GROUP, you're still allowed to aggregate in a single
bundle multiple ln-penalty commitments or eltoo settlement transactions,
with only one fee-bumping output. It's a cool space performance trick, but
a) I think this is still more a whiteboard idea than a sound proposal and
b) sounds more a long-term, low-hanging fruit optimization of blockspace
consumption.

Best,
Antoine

Le mar. 18 oct. 2022 =C3=A0 09:53, Greg Sanders via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> a =C3=A9crit :

> Hello Everyone,
>
> Following up on the "V3 Transaction" discussion here
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-September/02=
0937.html
> , I would like to elaborate a bit further on some potential follow-on wor=
k
> that would make pinning severely constrained in many setups].
>
> V3 transactions may solve bip125 rule#3 and rule#5 pinning attacks under
> some constraints[0]. This means that when a replacement is to be made and
> propagated, it costs the expected amount of fees to do so. This is a grea=
t
> start. What's left in this subset of pinning is *package limit* pinning. =
In
> other words, a fee-paying transaction cannot enter the mempool due to the
> existing mempool package it is being added to already being too large in
> count or vsize.
>
> Zooming into the V3 simplified scenario for sake of discussion, though
> this problem exists in general today:
>
> V3 transactions restrict the package limit of a V3 package to one parent
> and one child. If the parent transaction includes two outputs which can b=
e
> immediately spent by separate parties, this allows one party to disallow =
a
> spend from the other. In Gloria's proposal for ln-penalty, this is worked
> around by reducing the number of anchors per commitment transaction to 1,
> and each version of the commitment transaction has a unique party's key o=
n
> it. The honest participant can spend their version with their anchor and
> package RBF the other commitment transaction safely.
>
> What if there's only one version of the commitment transaction, such as i=
n
> other protocols like duplex payment channels, eltoo? What about multi par=
ty
> payments?
>
> In the package RBF proposal, if the parent transaction is identical to an
> existing transaction in the mempool, the parent will be detected and
> removed from the package proposal. You are then left with a single V3 chi=
ld
> transaction, which is then proposed for entry into the mempool. In the ca=
se
> of another parent output already being spent, this is simply rejected,
> regardless of feerate of the new child.
>
> I have two proposed solutions, of which I strongly prefer the latter:
>
> 1) Expand a carveout for "sibling eviction", where if the new child is
> paying "enough" to bump spends from the same parent, it knocks its siblin=
g
> out of the mempool and takes the one child slot. This would solve it, but
> is a new eviction paradigm that would need to be carefully worked through=
.
>
> 2) Ephemeral Anchors (my real policy-only proposal)
>
> Ephemeral Anchors is a term which means an output is watermarked as an
> output that MUST be spent in a V3 package. We mark this anchor by being t=
he
> bare script `OP_TRUE` and of course make these outputs standard to relay
> and spend with empty witness data.
>
> Also as a simplifying assumption, we require the parent transaction with
> such an output to be 0-fee. This makes mempool reasoning simpler in case
> the child-spend is somehow evicted, guaranteeing the parent will be as we=
ll.
>
> Implications:
>
> a) If the ephemeral anchor MUST be spent, we can allow *any* value, even
> dust, even 0, without worrying about bloating the utxo set. We relax this
> policy for maximum smart contract flexibility and specification simplicit=
y..
>
> b) Since this anchor MUST be spent, any spending of other outputs in the
> same parent transaction MUST directly double-spend prior spends of the
> ephemeral anchor. This causes the 1 block CSV timelock on outputs to be
> removed in these situations. This greatly magnifies composability of smar=
t
> contracts, as now we can do things like safely splice directly into new
> channels, into statechains, your custodial wallet account, your cold
> wallet, wherever, without requiring other wallets to support arbitrary
> scripts. Also it hurts that 1 CSV time locked scripts may not be miniscri=
pt
> compatible to begin with...
>
> c) *Anyone* can bump the transaction, without any transaction key
> material. This is essentially achieving Jeremy's Transaction Sponsors (
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/01=
8168.html)
> proposal without consensus changes. As long as someone gets a fully signe=
d
> parent, they can execute a bump with minimal wallet tooling. If a
> transaction author doesn=E2=80=99t want a =E2=80=9Csponsor=E2=80=9D, do n=
ot include the output.
>
> d) Lightning Carve-out(
> https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/00=
2240.html)
> is superseded by this logic, as we are not restricted to two immediately
> spendable output scenarios. In its place, robust multi-party fee bumping =
is
> possible.
>
> e) This also benefits more traditional wallet scenarios, as change output=
s
> can no longer be pinned, and RBF/CPFP becomes robust. Payees in simple
> spends cannot pin you. Batched payouts become a lot less painful. This wa=
s
> one of the motivating use cases that created the term =E2=80=9Cpinning=E2=
=80=9D in the
> first place(
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015=
717.html),
> even if LN/L2 discussion has largely overtaken it due to HTLC theft risks=
.
>
> Open Question(s):
>
>
>    1.
>
>    If we allow non-zero value in ephemeral outputs, does this open up a
>    MEV we are worried about? Wallets should toss all the value directly t=
o
>    fees, and add their own additional fees on top, otherwise miners have
>    incentive to make the smallest utxo burn transaction to claim those fu=
nds.
>    They just confirmed your parent transaction anyways, so do we care?
>    2.
>
>    SIGHASH_GROUP like constructs would allow uncommitted ephemeral
>    anchors to be added at spend time, depending on spending requirements.
>    SIGHASH_SINGLE already allows this.
>
>
>
>
> Hopefully this gives people something to consider as we move forward in
> thinking about mempool design within the constraints we have today.
>
>
> Greg
>
> 0: With V3 transactions where you have "veto power" over all the inputs i=
n
> that transaction. Therefore something like ANYONECANPAY is still broken. =
We
> need a more complex solution, which I=E2=80=99m punting for the sake of p=
rogress.
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

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

<div dir=3D"ltr">Hi Greg,<br><br>Thanks for proposing forward the &quot;eph=
emeral anchors&quot; policy change.<br><br>&gt; In Gloria&#39;s proposal fo=
r ln-penalty, this is worked<br>&gt; around by reducing the number of ancho=
rs per commitment transaction to 1,<br>&gt; and each version of the commitm=
ent transaction has a unique party&#39;s key on<br>&gt; it. The honest part=
icipant can spend their version with their anchor and<br>&gt; package RBF t=
he other commitment transaction safely.<br><br>IIRC, here I think we also n=
eed _package relay_ in strict addition of _package RBF_, otherwise if your =
Lightning transactions are still relayed and accepted one by one, your vers=
ion of the commitment transaction won&#39;t succeed to replace the other co=
unterparties&#39;s commitments sleeping in network mempools. The presence o=
f a remote anchor output on the counterparty commitment still offers an abi=
lity to fee-bump, albeit in practice more a lucky shot as you might have pa=
rtitioned network mempools between your local commitment and the remote com=
mitment disputing the spend of the same funding UTXO.<br><br>&gt; 1) Expand=
 a carveout for &quot;sibling eviction&quot;, where if the new child is<br>=
&gt; paying &quot;enough&quot; to bump spends from the same parent, it knoc=
ks its sibling<br>&gt; out of the mempool and takes the one child slot. Thi=
s would solve it, but<br>&gt; is a new eviction paradigm that would need to=
 be carefully worked through.<br><br>Note, I wonder about the robustness of=
 such a &quot;sibling eviction&quot; mechanism in the context of multi-part=
y construction. E.g, a batching payout, where the participants are competin=
g to each other in a blind way, as they do want their CPFPs paying back to =
them to confirm first, enforcing their individual liquidity preferences. I =
would think it might artificially lead the participants to overbid far beyo=
nd the top mempool block fees.<br><br>&gt; =C2=A0If we allow non-zero value=
 in ephemeral outputs, does this open up a MEV<br>&gt; =C2=A0we are worried=
 about? Wallets should toss all the value directly to fees,<br>&gt; =C2=A0a=
nd add their own additional fees on top, otherwise miners have incentive<br=
>&gt; =C2=A0to make the smallest utxo burn transaction to claim those funds=
. They just<br>&gt; =C2=A0confirmed your parent transaction anyways, so do =
we care?<br><br>If we allow non-zero value in ephemeral outputs, I think we=
&#39;re slightly modifying the incentives games of the channels counterpart=
ies, in the sense if you have a link Alice-Bob, Bob could circular loop a b=
unch of dust offered HTLC deduced from Alice balance and committed as fees =
in the ephemeral output value, then break the channel on-chain to pocket in=
 the trimmed value sum (in the limit of your Lightning implementation dust =
exposure). Note, this is already possible today if your counterparty is a m=
iner however iiuc the proposal, here we&#39;re lowering the bar.<br><br>&gt=
; =C2=A0SIGHASH_GROUP like constructs would allow uncommitted ephemeral anc=
hors<br>&gt; =C2=A0to be added at spend time, depending on spending require=
ments.<br>&gt; =C2=A0SIGHASH_SINGLE already allows this.<br><br>Note, with =
SIGHASH_GROUP, you&#39;re still allowed to aggregate in a single bundle mul=
tiple ln-penalty commitments or eltoo settlement transactions, with only on=
e fee-bumping output. It&#39;s a cool space performance trick, but a) I thi=
nk this is still more a whiteboard idea than a sound proposal and b) sounds=
 more a long-term, low-hanging fruit optimization of blockspace consumption=
.<br><br>Best,<br>Antoine<br></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">Le=C2=A0mar. 18 oct. 2022 =C3=A0=C2=A009:53, =
Greg Sanders via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxf=
oundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; a =C3=A9crit=
=C2=A0:<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"><div dir=
=3D"ltr"><span id=3D"m_-1362969136194686776gmail-docs-internal-guid-2d3e64a=
a-7fff-66f1-ed3d-c94d5a1f62c6"><p dir=3D"ltr" style=3D"line-height:1.38;mar=
gin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;font-family:Ar=
ial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:norm=
al;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-w=
rap">Hello Everyone,</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38=
;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;font-famil=
y:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:=
normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:p=
re-wrap">Following up on the &quot;V3 Transaction&quot; discussion here <a =
href=3D"https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-Septem=
ber/020937.html" target=3D"_blank">https://lists.linuxfoundation.org/piperm=
ail/bitcoin-dev/2022-September/020937.html</a> , I would like to elaborate =
a bit further on some potential follow-on work that would make pinning seve=
rely constrained in many setups].</span></p><br><p dir=3D"ltr" style=3D"lin=
e-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11=
pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-var=
iant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;=
white-space:pre-wrap">V3 transactions may solve bip125 rule#3 and rule#5 pi=
nning attacks under some constraints[0]. This means that when a replacement=
 is to be made and propagated, it costs the expected amount of fees to do s=
o. This is a great start. What&#39;s left in this subset of pinning is *pac=
kage limit* pinning. In other words, a fee-paying transaction cannot enter =
the mempool due to the existing mempool package it is being added to alread=
y being too large in count or vsize.</span></p><br><p dir=3D"ltr" style=3D"=
line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size=
:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-=
variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseli=
ne;white-space:pre-wrap">Zooming into the V3 simplified scenario for sake o=
f discussion, though this problem exists in general today:</span></p><br><p=
 dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><s=
pan style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-c=
olor:transparent;font-variant-numeric:normal;font-variant-east-asian:normal=
;vertical-align:baseline;white-space:pre-wrap">V3 transactions restrict the=
 package limit of a V3 package to one parent and one child. If the parent t=
ransaction includes two outputs which can be immediately spent by separate =
parties, this allows one party to disallow a spend from the other. In Glori=
a&#39;s proposal for ln-penalty, this is worked around by reducing the numb=
er of anchors per commitment transaction to 1, and each version of the comm=
itment transaction has a unique party&#39;s key on it. The honest participa=
nt can spend their version with their anchor and package RBF the other comm=
itment transaction safely.</span></p><br><p dir=3D"ltr" style=3D"line-heigh=
t:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;font=
-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-nu=
meric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-s=
pace:pre-wrap">What if there&#39;s only one version of the commitment trans=
action, such as in other protocols like duplex payment channels, eltoo? Wha=
t about multi party payments?</span></p><br><p dir=3D"ltr" style=3D"line-he=
ight:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;f=
ont-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant=
-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;whit=
e-space:pre-wrap">In the package RBF proposal, if the parent transaction is=
 identical to an existing transaction in the mempool, the parent will be de=
tected and removed from the package proposal. You are then left with a sing=
le V3 child transaction, which is then proposed for entry into the mempool.=
 In the case of another parent output already being spent, this is simply r=
ejected, regardless of feerate of the new child.</span></p><br><p dir=3D"lt=
r" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:tran=
sparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical=
-align:baseline;white-space:pre-wrap">I have two proposed solutions, of whi=
ch I strongly prefer the latter:</span></p><br><p dir=3D"ltr" style=3D"line=
-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11p=
t;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-vari=
ant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;w=
hite-space:pre-wrap">1) Expand a carveout for &quot;sibling eviction&quot;,=
 where if the new child is paying &quot;enough&quot; to bump spends from th=
e same parent, it knocks its sibling out of the mempool and takes the one c=
hild slot. This would solve it, but is a new eviction paradigm that would n=
eed to be carefully worked through.</span></p><br><p dir=3D"ltr" style=3D"l=
ine-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:=
11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-v=
ariant-numeric:normal;font-variant-east-asian:normal;vertical-align:baselin=
e;white-space:pre-wrap">2) Ephemeral Anchors (my real policy-only proposal)=
</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;marg=
in-bottom:0pt"><span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,=
0,0);background-color:transparent;font-variant-numeric:normal;font-variant-=
east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Ephemeral A=
nchors is a term which means an output is watermarked as an output that MUS=
T be spent in a V3 package. We mark this anchor by being the bare script `O=
P_TRUE` and of course make these outputs standard to relay and spend with e=
mpty witness data.</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;m=
argin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;font-family:=
Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:no=
rmal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre=
-wrap">Also as a simplifying assumption, we require the parent transaction =
with such an output to be 0-fee. This makes mempool reasoning simpler in ca=
se the child-spend is somehow evicted, guaranteeing the parent will be as w=
ell.</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;=
margin-bottom:0pt"><span style=3D"font-size:11pt;font-family:Arial;color:rg=
b(0,0,0);background-color:transparent;font-variant-numeric:normal;font-vari=
ant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Implica=
tions:</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:11pt;font-family:Arial;color:=
rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-va=
riant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">a) If=
 the ephemeral anchor MUST be spent, we can allow *any* value, even dust, e=
ven 0, without worrying about bloating the utxo set. We relax this policy f=
or maximum smart contract flexibility and specification simplicity..</span>=
</p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);ba=
ckground-color:transparent;font-variant-numeric:normal;font-variant-east-as=
ian:normal;vertical-align:baseline;white-space:pre-wrap">b) Since this anch=
or MUST be spent, any spending of other outputs in the same parent transact=
ion MUST directly double-spend prior spends of the ephemeral anchor. This c=
auses the 1 block CSV timelock on outputs to be removed in these situations=
. This greatly magnifies composability of smart contracts, as now we can do=
 things like safely splice directly into new channels, into statechains, yo=
ur custodial wallet account, your cold wallet, wherever, without requiring =
other wallets to support arbitrary scripts. Also it hurts that 1 CSV time l=
ocked scripts may not be miniscript compatible to begin with...</span></p><=
br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0p=
t"><span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);backgro=
und-color:transparent;font-variant-numeric:normal;font-variant-east-asian:n=
ormal;vertical-align:baseline;white-space:pre-wrap">c) *Anyone* can bump th=
e transaction, without any transaction key material. This is essentially ac=
hieving Jeremy&#39;s Transaction Sponsors (</span><a href=3D"https://lists.=
linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html" style=
=3D"text-decoration-line:none" target=3D"_blank"><span style=3D"font-size:1=
1pt;font-family:Arial;background-color:transparent;font-variant-numeric:nor=
mal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-=
align:baseline;white-space:pre-wrap">https://lists.linuxfoundation.org/pipe=
rmail/bitcoin-dev/2020-September/018168.html</span></a><span style=3D"font-=
size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;f=
ont-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:ba=
seline;white-space:pre-wrap">) proposal without consensus changes. As long =
as someone gets a fully signed parent, they can execute a bump with minimal=
 wallet tooling. If a transaction author doesn=E2=80=99t want a =E2=80=9Csp=
onsor=E2=80=9D, do not include the output.</span></p><br><p dir=3D"ltr" sty=
le=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent=
;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:=
baseline;white-space:pre-wrap">d) Lightning Carve-out(</span><a href=3D"htt=
ps://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002240.=
html" style=3D"text-decoration-line:none" target=3D"_blank"><span style=3D"=
font-size:11pt;font-family:Arial;background-color:transparent;font-variant-=
numeric:normal;font-variant-east-asian:normal;text-decoration-line:underlin=
e;vertical-align:baseline;white-space:pre-wrap">https://lists.linuxfoundati=
on.org/pipermail/lightning-dev/2019-October/002240.html</span></a><span sty=
le=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:tr=
ansparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertic=
al-align:baseline;white-space:pre-wrap">)=C2=A0 is superseded by this logic=
, as we are not restricted to two immediately spendable output scenarios. I=
n its place, robust multi-party fee bumping is possible.</span></p><br><p d=
ir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><spa=
n style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-col=
or:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;v=
ertical-align:baseline;white-space:pre-wrap">e) This also benefits more tra=
ditional wallet scenarios, as change outputs can no longer be pinned, and R=
BF/CPFP becomes robust. Payees in simple spends cannot pin you. Batched pay=
outs become a lot less painful. This was one of the motivating use cases th=
at created the term =E2=80=9Cpinning=E2=80=9D in the first place(</span><a =
href=3D"https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-Februa=
ry/015717.html" style=3D"text-decoration-line:none" target=3D"_blank"><span=
 style=3D"font-size:11pt;font-family:Arial;background-color:transparent;fon=
t-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-lin=
e:underline;vertical-align:baseline;white-space:pre-wrap">https://lists.lin=
uxfoundation.org/pipermail/bitcoin-dev/2018-February/015717.html</span></a>=
<span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background=
-color:transparent;font-variant-numeric:normal;font-variant-east-asian:norm=
al;vertical-align:baseline;white-space:pre-wrap">), even if LN/L2 discussio=
n has largely overtaken it due to HTLC theft risks.</span></p><br><p dir=3D=
"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span sty=
le=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:tr=
ansparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertic=
al-align:baseline;white-space:pre-wrap">Open Question(s):</span></p><br><ol=
 style=3D"margin-top:0px;margin-bottom:0px"><li dir=3D"ltr" style=3D"list-s=
tyle-type:decimal;font-size:11pt;font-family:Arial;color:rgb(0,0,0);backgro=
und-color:transparent;font-variant-numeric:normal;font-variant-east-asian:n=
ormal;vertical-align:baseline;white-space:pre-wrap"><p dir=3D"ltr" style=3D=
"line-height:1.38;margin-top:0pt;margin-bottom:0pt" role=3D"presentation"><=
span style=3D"font-size:11pt;background-color:transparent;font-variant-nume=
ric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-spa=
ce:pre-wrap">If we allow non-zero value in ephemeral outputs, does this ope=
n up a MEV we are worried about? Wallets should toss all the value directly=
 to fees, and add their own additional fees on top, otherwise miners have i=
ncentive to make the smallest utxo burn transaction to claim those funds. T=
hey just confirmed your parent transaction anyways, so do we care?</span></=
p></li><li dir=3D"ltr" style=3D"list-style-type:decimal;font-size:11pt;font=
-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-nu=
meric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-s=
pace:pre-wrap"><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;marg=
in-bottom:0pt" role=3D"presentation"><span style=3D"font-size:11pt;backgrou=
nd-color:transparent;font-variant-numeric:normal;font-variant-east-asian:no=
rmal;vertical-align:baseline;white-space:pre-wrap">SIGHASH_GROUP like const=
ructs would allow uncommitted ephemeral anchors to be added at spend time, =
depending on spending requirements. SIGHASH_SINGLE already allows this.</sp=
an></p></li></ol><br><br><br><p dir=3D"ltr" style=3D"line-height:1.38;margi=
n-top:0pt;margin-bottom:0pt"><span style=3D"font-size:11pt;font-family:Aria=
l;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal=
;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wra=
p">Hopefully this gives people something to consider as we move forward in =
thinking about mempool design within the constraints we have today.</span><=
/p><br><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-b=
ottom:0pt"><span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0)=
;background-color:transparent;font-variant-numeric:normal;font-variant-east=
-asian:normal;vertical-align:baseline;white-space:pre-wrap">Greg</span></p>=
<br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:11pt;font-family:Arial;color:rgb(0,0,0);backgr=
ound-color:transparent;font-variant-numeric:normal;font-variant-east-asian:=
normal;vertical-align:baseline;white-space:pre-wrap">0: With V3 transaction=
s where you have &quot;veto power&quot; over all the inputs in that transac=
tion. Therefore something like ANYONECANPAY is still broken. We need a more=
 complex solution, which I=E2=80=99m punting for the sake of progress.</spa=
n></p></span><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>

--0000000000004bab2905eb585bb1--