doc: Update mempool_replacements.md to reflect feerate diagram checks
What changed, and why it matters
This commit only updates a documentation file describing Bitcoin Core's mempool replacement policy. It removes outdated rules and adds notes about newer 'feerate diagram' checks and cluster mempool behavior. There are no code changes, no executable changes, and no security fix or vulnerability introduced.
No action required. Review as a normal documentation update if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies doc/policy/mempool-replacements.md. It removes legacy RBF policy rules (unconfirmed input restriction, descendant-count wording, direct feerate comparison) and replaces them with descriptions of cluster-based and feerate-diagram-based replacement checks introduced alongside cluster mempool in v31.0. No source code, build scripts, tests, or configuration files are changed.
Changed components
doc/policy/mempool-replacements.mdInspect captured patch +9 / −19
diff --git a/doc/policy/mempool-replacements.md b/doc/policy/mempool-replacements.md
index 73682e2f..422af9ae 100644
--- a/doc/policy/mempool-replacements.md
+++ b/doc/policy/mempool-replacements.md
@@ -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**.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.