-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Cluster mempool implementation #28676
base: master
Are you sure you want to change the base?
Commits on May 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fc331fb - Browse repository at this point
Copy the full SHA fc331fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e53828 - Browse repository at this point
Copy the full SHA 8e53828View commit details -
Configuration menu - View commit details
-
Copy full SHA for 923ae0a - Browse repository at this point
Copy the full SHA 923ae0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc8f3a8 - Browse repository at this point
Copy the full SHA dc8f3a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66a72b4 - Browse repository at this point
Copy the full SHA 66a72b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4778971 - Browse repository at this point
Copy the full SHA 4778971View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 01b148f - Browse repository at this point
Copy the full SHA 01b148fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72731e0 - Browse repository at this point
Copy the full SHA 72731e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f78393 - Browse repository at this point
Copy the full SHA 0f78393View commit details -
Configuration menu - View commit details
-
Copy full SHA for 917952d - Browse repository at this point
Copy the full SHA 917952dView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 04e8acd - Browse repository at this point
Copy the full SHA 04e8acdView commit details -
Configuration menu - View commit details
-
Copy full SHA for be6bf4d - Browse repository at this point
Copy the full SHA be6bf4dView commit details -
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 TODO: update functional test feature_rbf.py to cover all our new scenarios.
Configuration menu - View commit details
-
Copy full SHA for 9b75c1f - Browse repository at this point
Copy the full SHA 9b75c1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for acd2e12 - Browse repository at this point
Copy the full SHA acd2e12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4407d70 - Browse repository at this point
Copy the full SHA 4407d70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81a1873 - Browse repository at this point
Copy the full SHA 81a1873View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 7cc6e80 - Browse repository at this point
Copy the full SHA 7cc6e80View commit details -
Remove CTxMemPool::GetSortedDepthAndScore
The mempool clusters and linearization permit sorting the mempool topologically without making use of ancestor counts.
Configuration menu - View commit details
-
Copy full SHA for 9730c4c - Browse repository at this point
Copy the full SHA 9730c4cView commit details -
Reimplement GetTransactionAncestry() to not rely on cached data
In preparation for removing ancestor data from CTxMemPoolEntry, recalculate the ancestor statistics on demand wherever needed.
Configuration menu - View commit details
-
Copy full SHA for d36db77 - Browse repository at this point
Copy the full SHA d36db77View commit details -
Configuration menu - View commit details
-
Copy full SHA for acdad95 - Browse repository at this point
Copy the full SHA acdad95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59caf38 - Browse repository at this point
Copy the full SHA 59caf38View commit details -
Stop enforcing ancestor size/count limits
The cluster limits should be sufficient.
Configuration menu - View commit details
-
Copy full SHA for 4610706 - Browse repository at this point
Copy the full SHA 4610706View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba1030a - Browse repository at this point
Copy the full SHA ba1030aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 02e8648 - Browse repository at this point
Copy the full SHA 02e8648View commit details -
Calculate descendant information for mempool RPC output on-the-fly
This is in preparation for removing the cached descendant state from the mempool.
Configuration menu - View commit details
-
Copy full SHA for 644949d - Browse repository at this point
Copy the full SHA 644949dView commit details -
test: fix rbf carveout test in mempool_limit.py
Minimal fix to the test that the RBF carveout doesn't apply in certain package validation cases. Now that RBF carveout doesn't exist, we can just test that the cluster count limit is respected (in preparation for removing the descendant limit altogether).
Configuration menu - View commit details
-
Copy full SHA for 392f5e0 - Browse repository at this point
Copy the full SHA 392f5e0View commit details -
Stop enforcing descendant size/count limits
Cluster size limits should be enough.
Configuration menu - View commit details
-
Copy full SHA for 113ef57 - Browse repository at this point
Copy the full SHA 113ef57View commit details -
wallet: Replace max descendantsize with clustersize
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.
Configuration menu - View commit details
-
Copy full SHA for d5dfc7a - Browse repository at this point
Copy the full SHA d5dfc7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d2d662 - Browse repository at this point
Copy the full SHA 6d2d662View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 492d3b3 - Browse repository at this point
Copy the full SHA 492d3b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for c57b96d - Browse repository at this point
Copy the full SHA c57b96dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e60ada - Browse repository at this point
Copy the full SHA 4e60adaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b7474c - Browse repository at this point
Copy the full SHA 6b7474cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac467d5 - Browse repository at this point
Copy the full SHA ac467d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e3ee4d - Browse repository at this point
Copy the full SHA 9e3ee4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 944b402 - Browse repository at this point
Copy the full SHA 944b402View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f47ef2 - Browse repository at this point
Copy the full SHA 6f47ef2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6775bd - Browse repository at this point
Copy the full SHA e6775bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c0c429 - Browse repository at this point
Copy the full SHA 4c0c429View commit details -
Rework removeForBlock so that clusters are only touched once
Also remove extra linearization that was happening and some logging
Configuration menu - View commit details
-
Copy full SHA for ec7e0a4 - Browse repository at this point
Copy the full SHA ec7e0a4View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for f6482a6 - Browse repository at this point
Copy the full SHA f6482a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa7a146 - Browse repository at this point
Copy the full SHA fa7a146View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23e8167 - Browse repository at this point
Copy the full SHA 23e8167View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70f21d4 - Browse repository at this point
Copy the full SHA 70f21d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05bef2b - Browse repository at this point
Copy the full SHA 05bef2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 958e7e9 - Browse repository at this point
Copy the full SHA 958e7e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02f2661 - Browse repository at this point
Copy the full SHA 02f2661View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4da6979 - Browse repository at this point
Copy the full SHA 4da6979View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1792fc3 - Browse repository at this point
Copy the full SHA 1792fc3View commit details -
Switch to using the faster CalculateDescendants
The only place we still use the older interface is in policy/rbf.cpp, where it's helpful to incrementally calculate descendants to avoid calculating too many at once (or cluttering the CalculateDescendants interface with a calculation limit).
Configuration menu - View commit details
-
Copy full SHA for 91f7d10 - Browse repository at this point
Copy the full SHA 91f7d10View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf37a8b - Browse repository at this point
Copy the full SHA bf37a8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0515a60 - Browse repository at this point
Copy the full SHA 0515a60View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6defcf - Browse repository at this point
Copy the full SHA d6defcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c4f01f - Browse repository at this point
Copy the full SHA 5c4f01fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 240f5b4 - Browse repository at this point
Copy the full SHA 240f5b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for aaf45b5 - Browse repository at this point
Copy the full SHA aaf45b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for af45c12 - Browse repository at this point
Copy the full SHA af45c12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fa99a8 - Browse repository at this point
Copy the full SHA 0fa99a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 668399b - Browse repository at this point
Copy the full SHA 668399bView commit details -
Eliminate need for ancestors in PackageV3Checks
TO DO: Rewrite unit tests for PV3C to not lie about mempool parents, so that we can push down the parent calculation into v3_policy from validation.
Configuration menu - View commit details
-
Copy full SHA for 11258a8 - Browse repository at this point
Copy the full SHA 11258a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 998ef3a - Browse repository at this point
Copy the full SHA 998ef3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for afbcce4 - Browse repository at this point
Copy the full SHA afbcce4View commit details -
Configuration menu - View commit details
-
Copy full SHA for facaa08 - Browse repository at this point
Copy the full SHA facaa08View commit details -
bench: add more mempool benchmarks
Add benchmarks for: - mempool update time when blocks are found - adding a transaction - performing the mempool's RBF calculation - calculating mempool ancestors/descendants
Configuration menu - View commit details
-
Copy full SHA for 3a5650c - Browse repository at this point
Copy the full SHA 3a5650cView commit details -
fuzz: try to add more code coverage for mempool fuzzing
Including test coverage for mempool eviction and expiry
Configuration menu - View commit details
-
Copy full SHA for f96104b - Browse repository at this point
Copy the full SHA f96104bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8b3db0 - Browse repository at this point
Copy the full SHA e8b3db0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f558e3 - Browse repository at this point
Copy the full SHA 0f558e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b10940f - Browse repository at this point
Copy the full SHA b10940fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0303d8f - Browse repository at this point
Copy the full SHA 0303d8fView commit details -
fuzz: remove comparison between mini_miner block construction and miner
This is in preparation for eliminating the block template building happening in mini_miner, in favor of directly using the linearizations done in the mempool.
Configuration menu - View commit details
-
Copy full SHA for 8c4ec6c - Browse repository at this point
Copy the full SHA 8c4ec6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3482ed - Browse repository at this point
Copy the full SHA f3482edView commit details