#31682 ([IBD] specialize CheckBlock’s input & coinbase checks by l0rinc)
#31382 (kernel: Flush in ChainstateManager destructor by TheCharlatan)
#30342 (kernel, logging: Pass Logger instances to kernel objects by ryanofsky)
#30277 ([DO NOT MERGE] Erlay: bandwidth-efficient transaction relay protocol (Full implementation) by sr-gi)
#29641 (scripted-diff: Use LogInfo over LogPrintf [WIP, NOMERGE, DRAFT] by maflcko)
#28690 (build: Introduce internal kernel library by TheCharlatan)
#17783 (common: Disallow calling IsArgSet() on ALLOW_LIST options by ryanofsky)
#17581 (refactor: Remove settings merge reverse precedence code by ryanofsky)
#17580 (refactor: Add ALLOW_LIST flags and enforce usage in CheckArgFlags by ryanofsky)
#17493 (util: Forbid ambiguous multiple assignments in config file by ryanofsky)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
LLM Linter (✨ experimental)
Possible typos and grammar issues:
to to -> to [duplicate word; makes the sentence read “to to have” which is incorrect]
101kvB -> 101 k vB (or “101 kVBytes”) [unit is written without spacing/standard form and is confusing; add spacing or use a standard unit]
rule 5). -> rule 5) [stray/full stop after a parenthesis; “rule 5).” is awkward/confusing — use “rule 5)”]
drahtbot_id_5_m
glozow added the label
Mempool
on Oct 9, 2025
DrahtBot added the label
Needs rebase
on Oct 14, 2025
Allow moving an Epoch::Marker51430680ec
mempool: Store iterators into mapTx in mapNextTx
This takes the same amount of space as CTransaction pointers, and saves a map
lookup in many common uses.
6c73e47448
sdaftuar force-pushed
on Oct 14, 2025
DrahtBot removed the label
Needs rebase
on Oct 14, 2025
Make CTxMemPoolEntry derive from TxGraph::Ref29a94d5b2f
Create a txgraph inside CTxMemPoolc18c68a950
Add sigops adjusted weight calculator1bf3b51396
Add accessor for sigops-adjusted weightd5ed9cb3eb
Add transactions to txgraph, but without cluster dependencies
Effectively this is treating all transactions in txgraph as being in a cluster
of size 1.
9de3c6dd7a
squashme: fix locking so that mempool lock is held through subpackage destructionbbbd090f74
Add new (unused) limits for cluster size/countfee962dbde
test: update feature_rbf.py replacement test
Preparatory commit to the rbf functional test, before changes are made to the
rbf rules as part of cluster mempool.
3cc32ea55d
[test] rework/delete feature_rbf tests requiring large clusters7bc8bdb723
Do not allow mempool clusters to exceed configured limits
Include an adjustment to mempool_tests.cpp due to the additional memory used by
txgraph.
Includes a temporary change to the mempool_ephemeral_dust.py functional test,
due to validation checks being reordered. This change will revert once the RBF
rules are changed in a later commit.
e6591f3ed1
Check cluster limits when using -walletrejectlongchains52e1f6ff04
Rework miner_tests to not require large cluster limit34e50870d8
Limit mempool size based on chunk feerate
Rather than evicting the transactions with the lowest descendant feerate,
instead evict transactions that have the lowest chunk feerate.
Once mining is implemented based on choosing transactions with highest chunk
feerate (see next commit), mining and eviction will be opposites, so that we
will evict the transactions that would be mined last.
eccaf11c14
bench: rewrite ComplexMemPool to not create oversized clusters637425b45b
Select transactions for blocks based on chunk feerate
test: rewrite PopulateMempool to not violate mempool policy (cluster size) limits83ee706ee2
policy: Remove CPFP carveout rule
The addition of a cluster size limit makes the CPFP carveout rule useless,
because carveout cannot be used to bypass the cluster size limit. Remove this
policy rule and update tests to no longer rely on the behavior.
95b1ad3905
Implement new RBF logic for cluster mempool
With a total ordering on mempool transactions, we are now able to calculate a
transaction's mining score at all times. Use this to improve the RBF logic:
- we no longer enforce a "no new unconfirmed parents" rule
- we now require that the mempool's feerate diagram must improve in order
to accept a replacement
- the topology restrictions for conflicts in the package rbf setting have been
eliminated
Revert the temporary change to mempool_ephemeral_dust.py that were previously
made due to RBF validation checks being reordered.
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>, glozow <gloriajzhao@gmail.com>
4c224d1198
Remove the ancestor and descendant indices from the mempooledfd95dfdf
Use cluster linearization for transaction relay sort order
Previously, transaction batches were first sorted by ancestor count and then
feerate, to ensure transactions are announced in a topologically valid order,
while prioritizing higher feerate transactions. Ancestor count is a crude
topological sort criteria, so replace this with linearization order so that the
highest feerate transactions (as would be observed by the mining algorithm) are
relayed before lower feerate ones, in a topologically valid way.
This also fixes a test that only worked due to the ancestor-count-based sort
order.
d0622ae20c
Remove CTxMemPool::GetSortedDepthAndScore
The mempool clusters and linearization permit sorting the mempool topologically
without making use of ancestor counts (as long as the graph is not oversized).
Co-authored-by: Pieter Wuille <pieter@wuille.net>
3dc8abcc41
Reimplement GetTransactionAncestry() to not rely on cached data
In preparation for removing ancestor data from CTxMemPoolEntry, recalculate the
ancestor statistics on demand wherever needed.
3efc77e011
[squashme] Use outputs and structured bindings for CalculateAncestorData()cea1269b71
rpc: Calculate ancestor data from scratch for mempool rpc calls4a275d1864
Remove dependency on cached ancestor data in mini-miner86441349e2
Stop enforcing ancestor size/count limits
The cluster limits should be sufficient.
Co-Authored-By: Gregory Sanders <gsanders87@gmail.com>
984ca038fc
Add test case for cluster size limits to TRUC logica2339e3a67
Use mempool/txgraph to determine if a tx has descendants
Remove a reference to GetCountWithDescendants() in preparation for removing
this function and the associated cached state from the mempool.
dcf6f0331a
Calculate descendant information for mempool RPC output on-the-fly
This is in preparation for removing the cached descendant state from the
mempool.
87153063f7
test: remove rbf carveout test from mempool_limit.pycefe7d3999
Stop enforcing descendant size/count limits
Cluster size limits should be enough.
91a44988a1
Eliminate RBF workaround for CPFP carveout transactions
The new cluster mempool RBF rules take into account clusters sizes exactly, so
with the removal of descendant count enforcement this idea is obsolete.
e0284f3dc2
wallet: Replace max descendantsize with cluster_count
With the descendant size limits removed, replace the concept of "max number of
descendants of any ancestor of a given tx" with the cluster count of the cluster
that the transaction belongs to.
ff98ad9fd7
mempool: Remove unused function CalculateDescendantMaximum101deffb8a
Eliminate use of cached ancestor data in miniminer_tests and truc_policy2cac0b210f
mempool: eliminate accessors to mempool entry ancestor/descendant cached state8254d5be92
Remove unused members from CTxMemPoolEntry4d548627b7
Remove mempool logic designed to maintain ancestor/descendant stateda37ae62b5
mempool: addUnchecked no longer needs ancestors49f5b86e48
Remove unused limits from CalculateMemPoolAncestors6328631980
Make removeConflicts private089be84916
Simplify ancestor calculation functions
Now that ancestor calculation never fails (due to ancestor/descendant limits
being eliminated), we can eliminate the error handling from
CalculateMemPoolAncestors.
473500d51b
Use txgraph to calculate ancestors42f6bd08aa
Use txgraph to calculate descendantsf57fbe6949
Rework truc_policy to use descendants, not children4aeba80743
Rework RBF and TRUC validation
Calculating mempool ancestors for a new transaction should not be done until
after cluster size limits have been enforced, to limit CPU DoS potential.
Achieve this by reworking TRUC and RBF validation logic:
- TRUC policy enforcement is now done using only mempool parents of
new transactions, not all mempool ancestors (note that it's fine to calculate
ancestors of in-mempool transactions, if the number of such calls is
reasonably bounded).
- RBF replacement checks are performed earlier (which allows for checking
cluster size limits earlier, because cluster size checks cannot happen until
after all conflicts are staged for removal).
- Verifying that a new transaction doesn't conflict with an ancestor now
happens later, in AcceptSingleTransaction() rather than in PreChecks(). This
means that the test is not performed at all in AcceptMultipleTransactions(),
but in package acceptance we already disallow RBF in situations where a
package transaction has in-mempool parents.
Also to ensure that all RBF validation logic is applied in both the single
transaction and multiple transaction cases, remove the optimization that skips
the PackageMempoolChecks() in the case of a single transaction being validated
in AcceptMultipleTransactions().
831c3c968f
Make getting parents/children a function of the mempool, not a mempool entryd95ff4d364
Eliminate CheckPackageLimits, which no longer does anything1272865851
Fix miniminer_tests to work with cluster limits4c3bff43a3
Rewrite GatherClusters to use the txgraph implementation2bbbaf40f8
Stop tracking parents/children outside of txgraph7ea16761fa
Avoid violating mempool policy limits in tests
Changes AddToMempool() helper to only apply changes if the mempool limits are
respected.
Fix package_rbf fuzz target to handle mempool policy violations
fuzz: try to add more code coverage for mempool fuzzing
Including test coverage for mempool eviction and expiry
8a34846a6b
Expose cluster information via rpc
Co-authored-by: glozow <gloriajzhao@gmail.com>
ca18549ee7
doc: Update mempool_replacements.md to reflect feerate diagram checks5e8283bd48
test: add functional test for new cluster mempool RPCs
Co-authored-by: glozow <gloriajzhao@gmail.com>
aa4fc82dc6
fuzz: remove comparison between mini_miner block construction and miner
After cluster mempool, the mini_miner will no longer match the miner's block
construction. Eventually mini_miner should be reworked to directly use
linearizations done in the mempool.
d9d2a6acf6
Invoke TxGraph::DoWork() at appropriate times4be8a7aa80
Update comments for CTxMemPool class2b107f7690
Add check that GetSortedScoreWithTopology() agrees with CompareMiningScoreWithTopology()
We use CompareMiningScoreWithTopology() for sorting transaction announcements
during tx relay, and we use GetSortedScoreWithTopology() in
CTxMemPool::check().
f47f964b6f
doc: update policy/packages.md for new package acceptance logic85a0dd2152
test: extend package rbf functional test to larger clusters
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2025-11-12 12:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me