summaryrefslogtreecommitdiff
path: root/9b/1f77da82236d3ae6caec98490e0eb0e9d0bad6
blob: 35c85e051d25f63d07315c3d2edd475509fedc84 (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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
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 63AF2C000D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 16 Sep 2021 07:51:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp4.osuosl.org (Postfix) with ESMTP id 4AE1A406A3
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 16 Sep 2021 07:51:40 +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: 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 hequJ0TZw4H6
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 16 Sep 2021 07:51:37 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com
 [IPv6:2607:f8b0:4864:20::b2a])
 by smtp4.osuosl.org (Postfix) with ESMTPS id B3954404C7
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 16 Sep 2021 07:51:37 +0000 (UTC)
Received: by mail-yb1-xb2a.google.com with SMTP id z18so11188042ybg.8
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 16 Sep 2021 00:51:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=3QOhbrAg79zn1HhGViz41CIwraAa2g+Uxn5FdPrCJx8=;
 b=Drw+n6nqjGOvskTrWYOgyx+Ai4HUJDVEqrl7VqJg0phOx8ScTLRQGBq6I9durzCmWZ
 N06HH+HbMOv3chC8Ik8glLjhzLCFYPa5NJrla4Vr+9Ut1ep9+ckAfNW2yfhn3r6gSGxb
 kvfZTaHzmT1aQKHJYXPOd5VfhaMaUe36OF8R0hnymeV6Twj5ZWWbxqY1Ap260IyTgVXD
 KPQ/1kTaN15AeUcLyn0eEvWLYPw76Kui/MJps5tRFTIbORnx02jfHt71Ppt/unghKcLo
 VsoOIsyFLipEkmf40N81r5CoORWPR/uFxDuEps4CWw9OCOnpwW9GImetyoYuQ9+Yuk+7
 Tf6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=3QOhbrAg79zn1HhGViz41CIwraAa2g+Uxn5FdPrCJx8=;
 b=mKQldPrHMrX6Sl/0aX4YqjI9HakkcRrmg8JbFTCVV/soaNWrMaM5Cc4CQFzj3+G+CV
 IrAXLtyXRfWQkyMmbupMffqHabegdyEm2ZfVPqzRtWBiuwxZFETVjz8tP2e3Ee97r18p
 Z/RhjYavFnF5vqXAeaBRsEEGPQEOw+HtXJfkkLX1wkkSpDxMls42BVbLg7ivRRp8VuJS
 tamz4ssrGixzYldCDGJ2sGY6RLTISrV6P3YJCJ2V84DPd2IXP4QYm6OsnCpc0/V3UEd3
 2um+pbsmDdlmd1psTf31Y2/wWOefvR7UzNVuZTcIT0SqJ6vY3tZbyjXztDb03zq6FLbx
 rKIw==
X-Gm-Message-State: AOAM532aYqf7inC5jbGjXwbYPekZc3RnksWPPLhlK5v0O+JTU56YEsS3
 lF4erIUaiO9wAlJz8NM5Lyzn7UkFrcbkIjkSZwU7YiB2aBU=
X-Google-Smtp-Source: ABdhPJzUWv0EGwCVY6TIARR9aRCPZNVQJT1G7tgjWLHzvoYKeLXY3eCzSAqqWvr4peXNP8+R6ONwM5jxfmnIGX/klbU=
X-Received: by 2002:a25:da15:: with SMTP id n21mr6017735ybf.67.1631778695860; 
 Thu, 16 Sep 2021 00:51:35 -0700 (PDT)
MIME-Version: 1.0
From: Gloria Zhao <gloriajzhao@gmail.com>
Date: Thu, 16 Sep 2021 08:51:25 +0100
Message-ID: <CAFXO6=+cHyQKM2n9yn4EhwLZO+AUB0ZD81qWPxmpN27rjUoU3w@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="00000000000084d5ce05cc1815b4"
X-Mailman-Approved-At: Thu, 16 Sep 2021 07:55:32 +0000
Subject: [bitcoin-dev] Proposal: Package Mempool Accept and Package RBF
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: Thu, 16 Sep 2021 07:51:40 -0000

--00000000000084d5ce05cc1815b4
Content-Type: text/plain; charset="UTF-8"

Hi there,

I'm writing to propose a set of mempool policy changes to enable package
validation (in preparation for package relay) in Bitcoin Core. These would
not
be consensus or P2P protocol changes. However, since mempool policy
significantly affects transaction propagation, I believe this is relevant
for
the mailing list.

My proposal enables packages consisting of multiple parents and 1 child. If
you
develop software that relies on specific transaction relay assumptions
and/or
are interested in using package relay in the future, I'm very interested to
hear
your feedback on the utility or restrictiveness of these package policies
for
your use cases.

A draft implementation of this proposal can be found in [Bitcoin Core
PR#22290][1].

An illustrated version of this post can be found at
https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a.
I have also linked the images below.

## Background

Feel free to skip this section if you are already familiar with mempool
policy
and package relay terminology.

### Terminology Clarifications

* Package = an ordered list of related transactions, representable by a
Directed
  Acyclic Graph.
* Package Feerate = the total modified fees divided by the total virtual
size of
  all transactions in the package.
    - Modified fees = a transaction's base fees + fee delta applied by the
user
      with `prioritisetransaction`. As such, we expect this to vary across
mempools.
    - Virtual Size = the maximum of virtual sizes calculated using [BIP141
      virtual size][2] and sigop weight. [Implemented here in Bitcoin
Core][3].
    - Note that feerate is not necessarily based on the base fees and
serialized
      size.

* Fee-Bumping = user/wallet actions that take advantage of miner incentives
to
  boost a transaction's candidacy for inclusion in a block, including Child
Pays
for Parent (CPFP) and [BIP125][12] Replace-by-Fee (RBF). Our intention in
mempool policy is to recognize when the new transaction is more economical
to
mine than the original one(s) but not open DoS vectors, so there are some
limitations.

### Policy

The purpose of the mempool is to store the best (to be most
incentive-compatible
with miners, highest feerate) candidates for inclusion in a block. Miners
use
the mempool to build block templates. The mempool is also useful as a cache
for
boosting block relay and validation performance, aiding transaction relay,
and
generating feerate estimations.

Ideally, all consensus-valid transactions paying reasonable fees should
make it
to miners through normal transaction relay, without any special
connectivity or
relationships with miners. On the other hand, nodes do not have unlimited
resources, and a P2P network designed to let any honest node broadcast their
transactions also exposes the transaction validation engine to DoS attacks
from
malicious peers.

As such, for unconfirmed transactions we are considering for our mempool, we
apply a set of validation rules in addition to consensus, primarily to
protect
us from resource exhaustion and aid our efforts to keep the highest fee
transactions. We call this mempool _policy_: a set of (configurable,
node-specific) rules that transactions must abide by in order to be accepted
into our mempool. Transaction "Standardness" rules and mempool restrictions
such
as "too-long-mempool-chain" are both examples of policy.

### Package Relay and Package Mempool Accept

In transaction relay, we currently consider transactions one at a time for
submission to the mempool. This creates a limitation in the node's ability
to
determine which transactions have the highest feerates, since we cannot take
into account descendants (i.e. cannot use CPFP) until all the transactions
are
in the mempool. Similarly, we cannot use a transaction's descendants when
considering it for RBF. When an individual transaction does not meet the
mempool
minimum feerate and the user isn't able to create a replacement transaction
directly, it will not be accepted by mempools.

This limitation presents a security issue for applications and users
relying on
time-sensitive transactions. For example, Lightning and other protocols
create
UTXOs with multiple spending paths, where one counterparty's spending path
opens
up after a timelock, and users are protected from cheating scenarios as
long as
they redeem on-chain in time. A key security assumption is that all parties'
transactions will propagate and confirm in a timely manner. This assumption
can
be broken if fee-bumping does not work as intended.

The end goal for Package Relay is to consider multiple transactions at the
same
time, e.g. a transaction with its high-fee child. This may help us better
determine whether transactions should be accepted to our mempool,
especially if
they don't meet fee requirements individually or are better RBF candidates
as a
package. A combination of changes to mempool validation logic, policy, and
transaction relay allows us to better propagate the transactions with the
highest package feerates to miners, and makes fee-bumping tools more
powerful
for users.

The "relay" part of Package Relay suggests P2P messaging changes, but a
large
part of the changes are in the mempool's package validation logic. We call
this
*Package Mempool Accept*.

### Previous Work

* Given that mempool validation is DoS-sensitive and complex, it would be
  dangerous to haphazardly tack on package validation logic. Many efforts
have
been made to make mempool validation less opaque (see [#16400][4],
[#21062][5],
[#22675][6], [#22796][7]).
* [#20833][8] Added basic capabilities for package validation, test accepts
only
  (no submission to mempool).
* [#21800][9] Implemented package ancestor/descendant limit checks for
arbitrary
  packages. Still test accepts only.
* Previous package relay proposals (see [#16401][10], [#19621][11]).

### Existing Package Rules

These are in master as introduced in [#20833][8] and [#21800][9]. I'll
consider
them as "given" in the rest of this document, though they can be changed,
since
package validation is test-accept only right now.

1. A package cannot exceed `MAX_PACKAGE_COUNT=25` count and
`MAX_PACKAGE_SIZE=101KvB` total size [8]

   *Rationale*: This is already enforced as mempool ancestor/descendant
limits.
Presumably, transactions in a package are all related, so exceeding this
limit
would mean that the package can either be split up or it wouldn't pass this
mempool policy.

2. Packages must be topologically sorted: if any dependencies exist between
transactions, parents must appear somewhere before children. [8]

3. A package cannot have conflicting transactions, i.e. none of them can
spend
the same inputs. This also means there cannot be duplicate transactions. [8]

4. When packages are evaluated against ancestor/descendant limits in a test
accept, the union of all of their descendants and ancestors is considered.
This
is essentially a "worst case" heuristic where every transaction in the
package
is treated as each other's ancestor and descendant. [8]
Packages for which ancestor/descendant limits are accurately captured by
this
heuristic: [19]

There are also limitations such as the fact that CPFP carve out is not
applied
to package transactions. #20833 also disables RBF in package validation;
this
proposal overrides that to allow packages to use RBF.

## Proposed Changes

The next step in the Package Mempool Accept project is to implement
submission
to mempool, initially through RPC only. This allows us to test the
submission
logic before exposing it on P2P.

### Summary

- Packages may contain already-in-mempool transactions.
- Packages are 2 generations, Multi-Parent-1-Child.
- Fee-related checks use the package feerate. This means that wallets can
create a package that utilizes CPFP.
- Parents are allowed to RBF mempool transactions with a set of rules
similar
  to BIP125. This enables a combination of CPFP and RBF, where a
transaction's descendant fees pay for replacing mempool conflicts.

There is a draft implementation in [#22290][1]. It is WIP, but feedback is
always welcome.

### Details

#### Packages May Contain Already-in-Mempool Transactions

A package may contain transactions that are already in the mempool. We
remove
("deduplicate") those transactions from the package for the purposes of
package
mempool acceptance. If a package is empty after deduplication, we do
nothing.

*Rationale*: Mempools vary across the network. It's possible for a parent
to be
accepted to the mempool of a peer on its own due to differences in policy
and
fee market fluctuations. We should not reject or penalize the entire
package for
an individual transaction as that could be a censorship vector.

#### Packages Are Multi-Parent-1-Child

Only packages of a specific topology are permitted. Namely, a package is
exactly
1 child with all of its unconfirmed parents. After deduplication, the
package
may be exactly the same, empty, 1 child, 1 child with just some of its
unconfirmed parents, etc. Note that it's possible for the parents to be
indirect
descendants/ancestors of one another, or for parent and child to share a
parent,
so we cannot make any other topology assumptions.

*Rationale*: This allows for fee-bumping by CPFP. Allowing multiple parents
makes it possible to fee-bump a batch of transactions. Restricting packages
to a
defined topology is also easier to reason about and simplifies the
validation
logic greatly. Multi-parent-1-child allows us to think of the package as
one big
transaction, where:

- Inputs = all the inputs of parents + inputs of the child that come from
  confirmed UTXOs
- Outputs = all the outputs of the child + all outputs of the parents that
  aren't spent by other transactions in the package

Examples of packages that follow this rule (variations of example A show
some
possibilities after deduplication): ![image][15]

#### Fee-Related Checks Use Package Feerate

Package Feerate = the total modified fees divided by the total virtual size
of
all transactions in the package.

To meet the two feerate requirements of a mempool, i.e., the pre-configured
minimum relay feerate (`minRelayTxFee`) and dynamic mempool minimum
feerate, the
total package feerate is used instead of the individual feerate. The
individual
transactions are allowed to be below feerate requirements if the package
meets
the feerate requirements. For example, the parent(s) in the package can
have 0
fees but be paid for by the child.

*Rationale*: This can be thought of as "CPFP within a package," solving the
issue of a parent not meeting minimum fees on its own. This allows L2
applications to adjust their fees at broadcast time instead of overshooting
or
risking getting stuck/pinned.

We use the package feerate of the package *after deduplication*.

*Rationale*:  It would be incorrect to use the fees of transactions that are
already in the mempool, as we do not want a transaction's fees to be
double-counted for both its individual RBF and package RBF.

Examples F and G [14] show the same package, but P1 is submitted
individually before
the package in example G. In example F, we can see that the 300vB package
pays
an additional 200sat in fees, which is not enough to pay for its own
bandwidth
(BIP125#4). In example G, we can see that P1 pays enough to replace M1, but
using P1's fees again during package submission would make it look like a
300sat
increase for a 200vB package. Even including its fees and size would not be
sufficient in this example, since the 300sat looks like enough for the 300vB
package. The calculcation after deduplication is 100sat increase for a
package
of size 200vB, which correctly fails BIP125#4. Assume all transactions have
a
size of 100vB.

#### Package RBF

If a package meets feerate requirements as a package, the parents in the
transaction are allowed to replace-by-fee mempool transactions. The child
cannot
replace mempool transactions. Multiple transactions can replace the same
transaction, but in order to be valid, none of the transactions can try to
replace an ancestor of another transaction in the same package (which would
thus
make its inputs unavailable).

*Rationale*: Even if we are using package feerate, a package will not
propagate
as intended if RBF still requires each individual transaction to meet the
feerate requirements.

We use a set of rules slightly modified from BIP125 as follows:

##### Signaling (Rule #1)

All mempool transactions to be replaced must signal replaceability.

*Rationale*: Package RBF signaling logic should be the same for package RBF
and
single transaction acceptance. This would be updated if single transaction
validation moves to full RBF.

##### New Unconfirmed Inputs (Rule #2)

A package may include new unconfirmed inputs, but the ancestor feerate of
the
child must be at least as high as the ancestor feerates of every transaction
being replaced. This is contrary to BIP125#2, which states "The replacement
transaction may only include an unconfirmed input if that input was
included in
one of the original transactions. (An unconfirmed input spends an output
from a
currently-unconfirmed transaction.)"

*Rationale*: The purpose of BIP125#2 is to ensure that the replacement
transaction has a higher ancestor score than the original transaction(s)
(see
[comment][13]). Example H [16] shows how adding a new unconfirmed input can
lower the
ancestor score of the replacement transaction. P1 is trying to replace M1,
and
spends an unconfirmed output of M2. P1 pays 800sat, M1 pays 600sat, and M2
pays
100sat. Assume all transactions have a size of 100vB. While, in isolation,
P1
looks like a better mining candidate than M1, it must be mined with M2, so
its
ancestor feerate is actually 4.5sat/vB.  This is lower than M1's ancestor
feerate, which is 6sat/vB.

In package RBF, the rule analogous to BIP125#2 would be "none of the
transactions in the package can spend new unconfirmed inputs." Example J
[17] shows
why, if any of the package transactions have ancestors, package feerate is
no
longer accurate. Even though M2 and M3 are not ancestors of P1 (which is the
replacement transaction in an RBF), we're actually interested in the entire
package. A miner should mine M1 which is 5sat/vB instead of M2, M3, P1, P2,
and
P3, which is only 4sat/vB. The Package RBF rule cannot be loosened to only
allow
the child to have new unconfirmed inputs, either, because it can still
cause us
to overestimate the package's ancestor score.

However, enforcing a rule analogous to BIP125#2 would not only make Package
RBF
less useful, but would also break Package RBF for packages with parents
already
in the mempool: if a package parent has already been submitted, it would
look
like the child is spending a "new" unconfirmed input. In example K [18],
we're
looking to replace M1 with the entire package including P1, P2, and P3. We
must
consider the case where one of the parents is already in the mempool (in
this
case, P2), which means we must allow P3 to have new unconfirmed inputs.
However,
M2 lowers the ancestor score of P3 to 4.3sat/vB, so we should not replace M1
with this package.

Thus, the package RBF rule regarding new unconfirmed inputs is less strict
than
BIP125#2. However, we still achieve the same goal of requiring the
replacement
transactions to have a ancestor score at least as high as the original
ones. As
a result, the entire package is required to be a higher feerate mining
candidate
than each of the replaced transactions.

Another note: the [comment][13] above the BIP125#2 code in the original RBF
implementation suggests that the rule was intended to be temporary.

##### Absolute Fee (Rule #3)

The package must increase the absolute fee of the mempool, i.e. the total
fees
of the package must be higher than the absolute fees of the mempool
transactions
it replaces. Combined with the CPFP rule above, this differs from BIP125
Rule #3
- an individual transaction in the package may have lower fees than the
  transaction(s) it is replacing. In fact, it may have 0 fees, and the child
pays for RBF.

##### Feerate (Rule #4)

The package must pay for its own bandwidth; the package feerate must be
higher
than the replaced transactions by at least minimum relay feerate
(`incrementalRelayFee`). Combined with the CPFP rule above, this differs
from
BIP125 Rule #4 - an individual transaction in the package can have a lower
feerate than the transaction(s) it is replacing. In fact, it may have 0
fees,
and the child pays for RBF.

##### Total Number of Replaced Transactions (Rule #5)

The package cannot replace more than 100 mempool transactions. This is
identical
to BIP125 Rule #5.

### Expected FAQs

1. Is it possible for only some of the package to make it into the mempool?

   Yes, it is. However, since we evict transactions from the mempool by
descendant score and the package child is supposed to be sponsoring the
fees of
its parents, the most common scenario would be all-or-nothing. This is
incentive-compatible. In fact, to be conservative, package validation should
begin by trying to submit all of the transactions individually, and only
use the
package mempool acceptance logic if the parents fail due to low feerate.

2. Should we allow packages to contain already-confirmed transactions?

    No, for practical reasons. In mempool validation, we actually aren't
able to
tell with 100% confidence if we are looking at a transaction that has
already
confirmed, because we look up inputs using a UTXO set. If we have historical
block data, it's possible to look for it, but this is inefficient, not
always
possible for pruning nodes, and unnecessary because we're not going to do
anything with the transaction anyway. As such, we already have the
expectation
that transaction relay is somewhat "stateful" i.e. nobody should be relaying
transactions that have already been confirmed. Similarly, we shouldn't be
relaying packages that contain already-confirmed transactions.

[1]: https://github.com/bitcoin/bitcoin/pull/22290
[2]:
https://github.com/bitcoin/bips/blob/1f0b563738199ca60d32b4ba779797fc97d040fe/bip-0141.mediawiki#transaction-size-calculations
[3]:
https://github.com/bitcoin/bitcoin/blob/94f83534e4b771944af7d9ed0f40746f392eb75e/src/policy/policy.cpp#L282
[4]: https://github.com/bitcoin/bitcoin/pull/16400
[5]: https://github.com/bitcoin/bitcoin/pull/21062
[6]: https://github.com/bitcoin/bitcoin/pull/22675
[7]: https://github.com/bitcoin/bitcoin/pull/22796
[8]: https://github.com/bitcoin/bitcoin/pull/20833
[9]: https://github.com/bitcoin/bitcoin/pull/21800
[10]: https://github.com/bitcoin/bitcoin/pull/16401
[11]: https://github.com/bitcoin/bitcoin/pull/19621
[12]: https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
[13]:
https://github.com/bitcoin/bitcoin/pull/6871/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R1101-R1104
[14]:
https://user-images.githubusercontent.com/25183001/133567078-075a971c-0619-4339-9168-b41fd2b90c28.png
[15]:
https://user-images.githubusercontent.com/25183001/132856734-fc17da75-f875-44bb-b954-cb7a1725cc0d.png
[16]:
https://user-images.githubusercontent.com/25183001/133567347-a3e2e4a8-ae9c-49f8-abb9-81e8e0aba224.png
[17]:
https://user-images.githubusercontent.com/25183001/133567370-21566d0e-36c8-4831-b1a8-706634540af3.png
[18]:
https://user-images.githubusercontent.com/25183001/133567444-bfff1142-439f-4547-800a-2ba2b0242bcb.png
[19]:
https://user-images.githubusercontent.com/25183001/133456219-0bb447cb-dcb4-4a31-b9c1-7d86205b68bc.png
[20]:
https://user-images.githubusercontent.com/25183001/132857787-7b7c6f56-af96-44c8-8d78-983719888c19.png

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

<div dir=3D"ltr">Hi there,<br><br>I&#39;m writing to propose a set of mempo=
ol policy changes to enable package<br>validation (in preparation for packa=
ge relay) in Bitcoin Core. These would not<br>be consensus or P2P protocol =
changes. However, since mempool policy<br>significantly affects transaction=
 propagation, I believe this is relevant for<br>the mailing list.<br><br>My=
 proposal enables packages consisting of multiple parents and 1 child. If y=
ou<br>develop software that relies on specific transaction relay assumption=
s and/or<br>are interested in using package relay in the future, I&#39;m ve=
ry interested to hear<br>your feedback on the utility or restrictiveness of=
 these package policies for<br>your use cases.<br><br>A draft implementatio=
n of this proposal can be found in [Bitcoin Core<br>PR#22290][1].<br><br>An=
 illustrated version of this post can be found at<br><div><a href=3D"https:=
//gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a">https://gist.git=
hub.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a</a>.</div><div>I have also =
linked the images below.</div><br>## Background<br><br>Feel free to skip th=
is section if you are already familiar with mempool policy<br>and package r=
elay terminology.<br><br>### Terminology Clarifications<br><br>* Package =
=3D an ordered list of related transactions, representable by a Directed<br=
>=C2=A0 Acyclic Graph.<br>* Package Feerate =3D the total modified fees div=
ided by the total virtual size of<br>=C2=A0 all transactions in the package=
.<br>=C2=A0 =C2=A0 - Modified fees =3D a transaction&#39;s base fees + fee =
delta applied by the user<br>=C2=A0 =C2=A0 =C2=A0 with `prioritisetransacti=
on`. As such, we expect this to vary across<br>mempools.<br>=C2=A0 =C2=A0 -=
 Virtual Size =3D the maximum of virtual sizes calculated using [BIP141<br>=
=C2=A0 =C2=A0 =C2=A0 virtual size][2] and sigop weight. [Implemented here i=
n Bitcoin Core][3].<br>=C2=A0 =C2=A0 - Note that feerate is not necessarily=
 based on the base fees and serialized<br>=C2=A0 =C2=A0 =C2=A0 size.<br><br=
>* Fee-Bumping =3D user/wallet actions that take advantage of miner incenti=
ves to<br>=C2=A0 boost a transaction&#39;s candidacy for inclusion in a blo=
ck, including Child Pays<br>for Parent (CPFP) and [BIP125][12] Replace-by-F=
ee (RBF). Our intention in<br>mempool policy is to recognize when the new t=
ransaction is more economical to<br>mine than the original one(s) but not o=
pen DoS vectors, so there are some<br>limitations.<br><br>### Policy<br><br=
>The purpose of the mempool is to store the best (to be most incentive-comp=
atible<br>with miners, highest feerate) candidates for inclusion in a block=
. Miners use<br>the mempool to build block templates. The mempool is also u=
seful as a cache for<br>boosting block relay and validation performance, ai=
ding transaction relay, and<br>generating feerate estimations.<br><br>Ideal=
ly, all consensus-valid transactions paying reasonable fees should make it<=
br>to miners through normal transaction relay, without any special connecti=
vity or<br>relationships with miners. On the other hand, nodes do not have =
unlimited<br>resources, and a P2P network designed to let any honest node b=
roadcast their<br>transactions also exposes the transaction validation engi=
ne to DoS attacks from<br>malicious peers.<br><br>As such, for unconfirmed =
transactions we are considering for our mempool, we<br>apply a set of valid=
ation rules in addition to consensus, primarily to protect<br>us from resou=
rce exhaustion and aid our efforts to keep the highest fee<br>transactions.=
 We call this mempool _policy_: a set of (configurable,<br>node-specific) r=
ules that transactions must abide by in order to be accepted<br>into our me=
mpool. Transaction &quot;Standardness&quot; rules and mempool restrictions =
such<br>as &quot;too-long-mempool-chain&quot; are both examples of policy.<=
br><br>### Package Relay and Package Mempool Accept<br><br>In transaction r=
elay, we currently consider transactions one at a time for<br>submission to=
 the mempool. This creates a limitation in the node&#39;s ability to<br>det=
ermine which transactions have the highest feerates, since we cannot take<b=
r>into account descendants (i.e. cannot use CPFP) until all the transaction=
s are<br>in the mempool. Similarly, we cannot use a transaction&#39;s desce=
ndants when<br>considering it for RBF. When an individual transaction does =
not meet the mempool<br>minimum feerate and the user isn&#39;t able to crea=
te a replacement transaction<br>directly, it will not be accepted by mempoo=
ls.<br><br>This limitation presents a security issue for applications and u=
sers relying on<br>time-sensitive transactions. For example, Lightning and =
other protocols create<br>UTXOs with multiple spending paths, where one cou=
nterparty&#39;s spending path opens<br>up after a timelock, and users are p=
rotected from cheating scenarios as long as<br>they redeem on-chain in time=
. A key security assumption is that all parties&#39;<br>transactions will p=
ropagate and confirm in a timely manner. This assumption can<br>be broken i=
f fee-bumping does not work as intended.<br><br>The end goal for Package Re=
lay is to consider multiple transactions at the same<br>time, e.g. a transa=
ction with its high-fee child. This may help us better<br>determine whether=
 transactions should be accepted to our mempool, especially if<br>they don&=
#39;t meet fee requirements individually or are better RBF candidates as a<=
br>package. A combination of changes to mempool validation logic, policy, a=
nd<br>transaction relay allows us to better propagate the transactions with=
 the<br>highest package feerates to miners, and makes fee-bumping tools mor=
e powerful<br>for users.<br><br>The &quot;relay&quot; part of Package Relay=
 suggests P2P messaging changes, but a large<br>part of the changes are in =
the mempool&#39;s package validation logic. We call this<br>*Package Mempoo=
l Accept*.<br><br>### Previous Work<br><br>* Given that mempool validation =
is DoS-sensitive and complex, it would be<br>=C2=A0 dangerous to haphazardl=
y tack on package validation logic. Many efforts have<br>been made to make =
mempool validation less opaque (see [#16400][4], [#21062][5],<br>[#22675][6=
], [#22796][7]).<br>* [#20833][8] Added basic capabilities for package vali=
dation, test accepts only<br>=C2=A0 (no submission to mempool).<br>* [#2180=
0][9] Implemented package ancestor/descendant limit checks for arbitrary<br=
>=C2=A0 packages. Still test accepts only.<br>* Previous package relay prop=
osals (see [#16401][10], [#19621][11]).<br><br>### Existing Package Rules<b=
r><br>These are in master as introduced in [#20833][8] and [#21800][9]. I&#=
39;ll consider<br>them as &quot;given&quot; in the rest of this document, t=
hough they can be changed, since<br>package validation is test-accept only =
right now.<br><br>1. A package cannot exceed `MAX_PACKAGE_COUNT=3D25` count=
 and<br>`MAX_PACKAGE_SIZE=3D101KvB` total size [8]<br><br>=C2=A0 =C2=A0*Rat=
ionale*: This is already enforced as mempool ancestor/descendant limits.<br=
>Presumably, transactions in a package are all related, so exceeding this l=
imit<br>would mean that the package can either be split up or it wouldn&#39=
;t pass this<br>mempool policy.<br><br>2. Packages must be topologically so=
rted: if any dependencies exist between<br>transactions, parents must appea=
r somewhere before children. [8]<br><br>3. A package cannot have conflictin=
g transactions, i.e. none of them can spend<br><div>the same inputs. This a=
lso means there cannot be duplicate transactions. [8]</div><div><br></div>4=
. When packages are evaluated against ancestor/descendant limits in a test<=
br>accept, the union of all of their descendants and ancestors is considere=
d. This<br>is essentially a &quot;worst case&quot; heuristic where every tr=
ansaction in the package<br>is treated as each other&#39;s ancestor and des=
cendant.  [8]<br>Packages for which ancestor/descendant limits are accurate=
ly captured by this<br><div>heuristic: [19]</div><br>There are also limitat=
ions such as the fact that CPFP carve out is not applied<br>to package tran=
sactions. #20833 also disables RBF in package validation; this<br>proposal =
overrides that to allow packages to use RBF.<br><br>## Proposed Changes<br>=
<br>The next step in the Package Mempool Accept project is to implement sub=
mission<br>to mempool, initially through RPC only. This allows us to test t=
he submission<br>logic before exposing it on P2P.<br><br>### Summary<br><br=
>- Packages may contain already-in-mempool transactions.<br>- Packages are =
2 generations, Multi-Parent-1-Child.<br>- Fee-related checks use the packag=
e feerate. This means that wallets can<br>create a package that utilizes CP=
FP.<br>- Parents are allowed to RBF mempool transactions with a set of rule=
s similar<br>=C2=A0 to BIP125. This enables a combination of CPFP and RBF, =
where a<br>transaction&#39;s descendant fees pay for replacing mempool conf=
licts.<br><br>There is a draft implementation in [#22290][1]. It is WIP, bu=
t feedback is<br>always welcome.<br><br>### Details<br><br>#### Packages Ma=
y Contain Already-in-Mempool Transactions<br><br>A package may contain tran=
sactions that are already in the mempool. We remove<br>(&quot;deduplicate&q=
uot;) those transactions from the package for the purposes of package<br>me=
mpool acceptance. If a package is empty after deduplication, we do nothing.=
<br><br>*Rationale*: Mempools vary across the network. It&#39;s possible fo=
r a parent to be<br>accepted to the mempool of a peer on its own due to dif=
ferences in policy and<br>fee market fluctuations. We should not reject or =
penalize the entire package for<br>an individual transaction as that could =
be a censorship vector.<br><br>#### Packages Are Multi-Parent-1-Child<br><b=
r>Only packages of a specific topology are permitted. Namely, a package is =
exactly<br>1 child with all of its unconfirmed parents. After deduplication=
, the package<br>may be exactly the same, empty, 1 child, 1 child with just=
 some of its<br>unconfirmed parents, etc. Note that it&#39;s possible for t=
he parents to be indirect<br>descendants/ancestors of one another, or for p=
arent and child to share a parent,<br>so we cannot make any other topology =
assumptions.<br><br>*Rationale*: This allows for fee-bumping by CPFP. Allow=
ing multiple parents<br>makes it possible to fee-bump a batch of transactio=
ns. Restricting packages to a<br>defined topology is also easier to reason =
about and simplifies the validation<br>logic greatly. Multi-parent-1-child =
allows us to think of the package as one big<br>transaction, where:<br><br>=
- Inputs =3D all the inputs of parents + inputs of the child that come from=
<br>=C2=A0 confirmed UTXOs<br>- Outputs =3D all the outputs of the child + =
all outputs of the parents that<br>=C2=A0 aren&#39;t spent by other transac=
tions in the package<br><br>Examples of packages that follow this rule (var=
iations of example A show some<br>possibilities after deduplication): ![ima=
ge][15]<br><br>#### Fee-Related Checks Use Package Feerate<br><br>Package F=
eerate =3D the total modified fees divided by the total virtual size of<br>=
all transactions in the package.<br><br>To meet the two feerate requirement=
s of a mempool, i.e., the pre-configured<br>minimum relay feerate (`minRela=
yTxFee`) and dynamic mempool minimum feerate, the<br>total package feerate =
is used instead of the individual feerate. The individual<br>transactions a=
re allowed to be below feerate requirements if the package meets<br>the fee=
rate requirements. For example, the parent(s) in the package can have 0<br>=
fees but be paid for by the child.<br><br>*Rationale*: This can be thought =
of as &quot;CPFP within a package,&quot; solving the<br>issue of a parent n=
ot meeting minimum fees on its own. This allows L2<br>applications to adjus=
t their fees at broadcast time instead of overshooting or<br>risking gettin=
g stuck/pinned.<br><br>We use the package feerate of the package *after ded=
uplication*.<br><br>*Rationale*: =C2=A0It would be incorrect to use the fee=
s of transactions that are<br>already in the mempool, as we do not want a t=
ransaction&#39;s fees to be<br>double-counted for both its individual RBF a=
nd package RBF.<br><br>Examples F and G [14] show the same package, but P1 =
is submitted individually before<br>the package in example G. In example F,=
 we can see that the 300vB package pays<br>an additional 200sat in fees, wh=
ich is not enough to pay for its own bandwidth<br>(BIP125#4). In example G,=
 we can see that P1 pays enough to replace M1, but<br>using P1&#39;s fees a=
gain during package submission would make it look like a 300sat<br>increase=
 for a 200vB package. Even including its fees and size would not be<br>suff=
icient in this example, since the 300sat looks like enough for the 300vB<br=
>package. The calculcation after deduplication is 100sat increase for a pac=
kage<br>of size 200vB, which correctly fails BIP125#4. Assume all transacti=
ons have a<br>size of 100vB.<br><br>#### Package RBF<br><br>If a package me=
ets feerate requirements as a package, the parents in the<br>transaction ar=
e allowed to replace-by-fee mempool transactions. The child cannot<br>repla=
ce mempool transactions. Multiple transactions can replace the same<br>tran=
saction, but in order to be valid, none of the transactions can try to<br>r=
eplace an ancestor of another transaction in the same package (which would =
thus<br>make its inputs unavailable).<br><br>*Rationale*: Even if we are us=
ing package feerate, a package will not propagate<br>as intended if RBF sti=
ll requires each individual transaction to meet the<br>feerate requirements=
.<br><br>We use a set of rules slightly modified from BIP125 as follows:<br=
><br>##### Signaling (Rule #1)<br><br>All mempool transactions to be replac=
ed must signal replaceability.<br><br>*Rationale*: Package RBF signaling lo=
gic should be the same for package RBF and<br>single transaction acceptance=
. This would be updated if single transaction<br>validation moves to full R=
BF.<br><br>##### New Unconfirmed Inputs (Rule #2)<br><br>A package may incl=
ude new unconfirmed inputs, but the ancestor feerate of the<br>child must b=
e at least as high as the ancestor feerates of every transaction<br>being r=
eplaced. This is contrary to BIP125#2, which states &quot;The replacement<b=
r>transaction may only include an unconfirmed input if that input was inclu=
ded in<br>one of the original transactions. (An unconfirmed input spends an=
 output from a<br>currently-unconfirmed transaction.)&quot;<br><br>*Rationa=
le*: The purpose of BIP125#2 is to ensure that the replacement<br>transacti=
on has a higher ancestor score than the original transaction(s) (see<br>[co=
mment][13]). Example H [16] shows how adding a new unconfirmed input can lo=
wer the<br>ancestor score of the replacement transaction. P1 is trying to r=
eplace M1, and<br>spends an unconfirmed output of M2. P1 pays 800sat, M1 pa=
ys 600sat, and M2 pays<br>100sat. Assume all transactions have a size of 10=
0vB. While, in isolation, P1<br>looks like a better mining candidate than M=
1, it must be mined with M2, so its<br>ancestor feerate is actually 4.5sat/=
vB.=C2=A0 This is lower than M1&#39;s ancestor<br>feerate, which is 6sat/vB=
.<br><br>In package RBF, the rule analogous to BIP125#2 would be &quot;none=
 of the<br>transactions in the package can spend new unconfirmed inputs.&qu=
ot; Example J [17] shows<br>why, if any of the package transactions have an=
cestors, package feerate is no<br>longer accurate. Even though M2 and M3 ar=
e not ancestors of P1 (which is the<br>replacement transaction in an RBF), =
we&#39;re actually interested in the entire<br>package. A miner should mine=
 M1 which is 5sat/vB instead of M2, M3, P1, P2, and<br>P3, which is only 4s=
at/vB. The Package RBF rule cannot be loosened to only allow<br>the child t=
o have new unconfirmed inputs, either, because it can still cause us<br>to =
overestimate the package&#39;s ancestor score.<br><br>However, enforcing a =
rule analogous to BIP125#2 would not only make Package RBF<br>less useful, =
but would also break Package RBF for packages with parents already<br>in th=
e mempool: if a package parent has already been submitted, it would look<br=
>like the child is spending a &quot;new&quot; unconfirmed input. In example=
 K [18], we&#39;re<br>looking to replace M1 with the entire package includi=
ng P1, P2, and P3. We must<br>consider the case where one of the parents is=
 already in the mempool (in this<br>case, P2), which means we must allow P3=
 to have new unconfirmed inputs. However,<br>M2 lowers the ancestor score o=
f P3 to 4.3sat/vB, so we should not replace M1<br>with this package.<br><br=
>Thus, the package RBF rule regarding new unconfirmed inputs is less strict=
 than<br>BIP125#2. However, we still achieve the same goal of requiring the=
 replacement<br>transactions to have a ancestor score at least as high as t=
he original ones. As<br>a result, the entire package is required to be a hi=
gher feerate mining candidate<br>than each of the replaced transactions.<br=
><br>Another note: the [comment][13] above the BIP125#2 code in the origina=
l RBF<br>implementation suggests that the rule was intended to be temporary=
.<br><br>##### Absolute Fee (Rule #3)<br><br>The package must increase the =
absolute fee of the mempool, i.e. the total fees<br>of the package must be =
higher than the absolute fees of the mempool transactions<br>it replaces. C=
ombined with the CPFP rule above, this differs from BIP125 Rule #3<br>- an =
individual transaction in the package may have lower fees than the<br>=C2=
=A0 transaction(s) it is replacing. In fact, it may have 0 fees, and the ch=
ild<br>pays for RBF.<br><br>##### Feerate (Rule #4)<br><br>The package must=
 pay for its own bandwidth; the package feerate must be higher<br>than the =
replaced transactions by at least minimum relay feerate<br>(`incrementalRel=
ayFee`). Combined with the CPFP rule above, this differs from<br>BIP125 Rul=
e #4 - an individual transaction in the package can have a lower<br>feerate=
 than the transaction(s) it is replacing. In fact, it may have 0 fees,<br>a=
nd the child pays for RBF.<br><br>##### Total Number of Replaced Transactio=
ns (Rule #5)<br><br>The package cannot replace more than 100 mempool transa=
ctions. This is identical<br>to BIP125 Rule #5.<br><br>### Expected FAQs<br=
><br>1. Is it possible for only some of the package to make it into the mem=
pool?<br><br>=C2=A0 =C2=A0Yes, it is. However, since we evict transactions =
from the mempool by<br>descendant score and the package child is supposed t=
o be sponsoring the fees of<br>its parents, the most common scenario would =
be all-or-nothing. This is<br>incentive-compatible. In fact, to be conserva=
tive, package validation should<br>begin by trying to submit all of the tra=
nsactions individually, and only use the<br>package mempool acceptance logi=
c if the parents fail due to low feerate.<br><br>2. Should we allow package=
s to contain already-confirmed transactions?<br><br>=C2=A0 =C2=A0 No, for p=
ractical reasons. In mempool validation, we actually aren&#39;t able to<br>=
tell with 100% confidence if we are looking at a transaction that has alrea=
dy<br>confirmed, because we look up inputs using a UTXO set. If we have his=
torical<br>block data, it&#39;s possible to look for it, but this is ineffi=
cient, not always<br>possible for pruning nodes, and unnecessary because we=
&#39;re not going to do<br>anything with the transaction anyway. As such, w=
e already have the expectation<br>that transaction relay is somewhat &quot;=
stateful&quot; i.e. nobody should be relaying<br>transactions that have alr=
eady been confirmed. Similarly, we shouldn&#39;t be<br>relaying packages th=
at contain already-confirmed transactions.<br><br>[1]: <a href=3D"https://g=
ithub.com/bitcoin/bitcoin/pull/22290">https://github.com/bitcoin/bitcoin/pu=
ll/22290</a><br>[2]: <a href=3D"https://github.com/bitcoin/bips/blob/1f0b56=
3738199ca60d32b4ba779797fc97d040fe/bip-0141.mediawiki#transaction-size-calc=
ulations">https://github.com/bitcoin/bips/blob/1f0b563738199ca60d32b4ba7797=
97fc97d040fe/bip-0141.mediawiki#transaction-size-calculations</a><br>[3]: <=
a href=3D"https://github.com/bitcoin/bitcoin/blob/94f83534e4b771944af7d9ed0=
f40746f392eb75e/src/policy/policy.cpp#L282">https://github.com/bitcoin/bitc=
oin/blob/94f83534e4b771944af7d9ed0f40746f392eb75e/src/policy/policy.cpp#L28=
2</a><br>[4]: <a href=3D"https://github.com/bitcoin/bitcoin/pull/16400">htt=
ps://github.com/bitcoin/bitcoin/pull/16400</a><br>[5]: <a href=3D"https://g=
ithub.com/bitcoin/bitcoin/pull/21062">https://github.com/bitcoin/bitcoin/pu=
ll/21062</a><br>[6]: <a href=3D"https://github.com/bitcoin/bitcoin/pull/226=
75">https://github.com/bitcoin/bitcoin/pull/22675</a><br>[7]: <a href=3D"ht=
tps://github.com/bitcoin/bitcoin/pull/22796">https://github.com/bitcoin/bit=
coin/pull/22796</a><br>[8]: <a href=3D"https://github.com/bitcoin/bitcoin/p=
ull/20833">https://github.com/bitcoin/bitcoin/pull/20833</a><br>[9]: <a hre=
f=3D"https://github.com/bitcoin/bitcoin/pull/21800">https://github.com/bitc=
oin/bitcoin/pull/21800</a><br>[10]: <a href=3D"https://github.com/bitcoin/b=
itcoin/pull/16401">https://github.com/bitcoin/bitcoin/pull/16401</a><br>[11=
]: <a href=3D"https://github.com/bitcoin/bitcoin/pull/19621">https://github=
.com/bitcoin/bitcoin/pull/19621</a><br>[12]: <a href=3D"https://github.com/=
bitcoin/bips/blob/master/bip-0125.mediawiki">https://github.com/bitcoin/bip=
s/blob/master/bip-0125.mediawiki</a><br>[13]: <a href=3D"https://github.com=
/bitcoin/bitcoin/pull/6871/files#diff-34d21af3c614ea3cee120df276c9c4ae95053=
830d7f1d3deaf009a4625409ad2R1101-R1104">https://github.com/bitcoin/bitcoin/=
pull/6871/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a=
4625409ad2R1101-R1104</a><br>[14]: <a href=3D"https://user-images.githubuse=
rcontent.com/25183001/133567078-075a971c-0619-4339-9168-b41fd2b90c28.png">h=
ttps://user-images.githubusercontent.com/25183001/133567078-075a971c-0619-4=
339-9168-b41fd2b90c28.png</a><br>[15]: <a href=3D"https://user-images.githu=
busercontent.com/25183001/132856734-fc17da75-f875-44bb-b954-cb7a1725cc0d.pn=
g">https://user-images.githubusercontent.com/25183001/132856734-fc17da75-f8=
75-44bb-b954-cb7a1725cc0d.png</a><br>[16]: <a href=3D"https://user-images.g=
ithubusercontent.com/25183001/133567347-a3e2e4a8-ae9c-49f8-abb9-81e8e0aba22=
4.png">https://user-images.githubusercontent.com/25183001/133567347-a3e2e4a=
8-ae9c-49f8-abb9-81e8e0aba224.png</a><br>[17]: <a href=3D"https://user-imag=
es.githubusercontent.com/25183001/133567370-21566d0e-36c8-4831-b1a8-7066345=
40af3.png">https://user-images.githubusercontent.com/25183001/133567370-215=
66d0e-36c8-4831-b1a8-706634540af3.png</a><br>[18]: <a href=3D"https://user-=
images.githubusercontent.com/25183001/133567444-bfff1142-439f-4547-800a-2ba=
2b0242bcb.png">https://user-images.githubusercontent.com/25183001/133567444=
-bfff1142-439f-4547-800a-2ba2b0242bcb.png</a><br>[19]: <a href=3D"https://u=
ser-images.githubusercontent.com/25183001/133456219-0bb447cb-dcb4-4a31-b9c1=
-7d86205b68bc.png">https://user-images.githubusercontent.com/25183001/13345=
6219-0bb447cb-dcb4-4a31-b9c1-7d86205b68bc.png</a><br>[20]: <a href=3D"https=
://user-images.githubusercontent.com/25183001/132857787-7b7c6f56-af96-44c8-=
8d78-983719888c19.png">https://user-images.githubusercontent.com/25183001/1=
32857787-7b7c6f56-af96-44c8-8d78-983719888c19.png</a><br></div>

--00000000000084d5ce05cc1815b4--