doc: Update mempool_replacements.md to reflect feerate diagram checks

This commit is contained in:
Suhas Daftuar 2024-04-24 19:52:18 -04:00
parent 21693f031a
commit 72f60c877e

View File

@ -12,12 +12,7 @@ other consensus and policy rules, each of the following conditions are met:
1. (Removed)
2. The replacement transaction only include an unconfirmed input if that input was included in
one of the directly conflicting transactions. An unconfirmed input spends an output from a
currently-unconfirmed transaction.
*Rationale*: When RBF was originally implemented, the mempool did not keep track of
ancestor feerates yet. This rule was suggested as a temporary restriction.
2. (Removed)
3. The replacement transaction pays an absolute fee of at least the sum paid by the original
transactions.
@ -38,23 +33,16 @@ other consensus and policy rules, each of the following conditions are met:
*Rationale*: Try to prevent DoS attacks where an attacker causes the network to repeatedly relay
transactions each paying a tiny additional amount in fees, e.g. just 1 satoshi.
5. The number of original transactions does not exceed 100. More precisely, the sum of all
directly conflicting transactions' descendant counts (number of transactions inclusive of itself
and its descendants) must not exceed 100; it is possible that this overestimates the true number
of original transactions.
5. The number of distinct clusters corresponding to conflicting transactions does not exceed 100.
*Rationale*: Try to prevent DoS attacks where an attacker is able to easily occupy and flush out
significant portions of the node's mempool using replacements with multiple directly conflicting
transactions, each with large descendant sets.
*Rationale*: Limit CPU usage required to update the mempool for so many transactions being
removed at once.
6. The replacement transaction's feerate is greater than the feerates of all directly conflicting
transactions.
6. The feerate diagram of the mempool must be strictly improved by the replacement transaction.
*Rationale*: This rule was originally intended to ensure that the replacement transaction is
preferable for block-inclusion, compared to what would be removed from the mempool. This rule
predates ancestor feerate-based transaction selection.
*Rationale*: This ensures that block fees in all future blocks will go up
after the replacement (ignoring tail effects at the end of a block).
This set of rules is similar but distinct from BIP125.
## History
@ -79,3 +67,5 @@ This set of rules is similar but distinct from BIP125.
* Signaling for replace-by-fee is no longer required as of [PR 30592](https://github.com/bitcoin/bitcoin/pull/30592).
* The incremental relay feerate default is 0.1sat/vB ([PR #33106](https://github.com/bitcoin/bitcoin/pull/33106)).
* Feerate diagram policy enabled in conjunction with switch to cluster mempool as of **v31.0**.