An overview of the cluster mempool proposal

An overview of the cluster mempool proposal

Original Postby sdaftuar

Posted on: January 9, 2024 22:52 UTC

A new design for the Bitcoin Core mempool has been proposed, introducing significant policy changes with an emphasis on cluster size limitations.

The draft implementation proposes to enforce limits on the number of transactions and the total virtual bytes in mempool 'clusters', which are connected components in the transaction graph. These changes would replace the current ancestor and descendant limits while updating the Replace-By-Fee (RBF) rules. Transactions seeking to replace existing ones must now offer a 'strictly better feerate diagram' for acceptance into the mempool. With these modifications, the 'Child Pays For Parent' (CPFP) carveout becomes redundant.

The proposed design attempts to address the shortcomings of the current mempool system, which does not guarantee a coherent order for eviction or RBF calculations, leading to potential misalignments with miner incentives. The new proposal advocates for maintaining a total ordering of all transactions in the mempool, ensuring that eviction and mining selection algorithms are aligned. Bounding the size of transaction clusters is essential to update mining scores without excessive computational effort as clusters grow.

This cluster-based approach allows for a fully sorted mempool, simplifying the transaction organization and enabling efficient mining selections and evictions. A fully sorted mempool facilitates optimal transaction orderings, accelerating the mining process and creating an uncomplicated eviction mechanism.

The anticipated benefits of this new mempool design include more effective mining transaction selection and eviction processes by using descending feerate order iterations until a block is filled. This design also eliminates the need for enforcing limits on ancestor and descendant counts, reducing CPU overhead and streamlining transaction processing.

For additional details on the theoretical and technical aspects of this cluster-based mempool design, the original write-up by @sipa can be consulted. An initial draft implementation has been shared for community review, with ongoing enhancements and parameter adjustments expected after further analysis and benchmarking.