delvingbitcoin

Post-clustermempool package RBF: per-chunk processing

Post-clustermempool package RBF: per-chunk processing

Posted on: November 27, 2023 16:51 UTC

The discussion revolves around an evolved approach to managing transactions in the Bitcoin mempool, particularly focusing on the handling of transaction packages for relay and inclusion.

The proposed strategy starts from a minimalist perspective, suggesting that packages, when not considering already present transactions in the mempool (in-mempool ancestors), should be treated as single chunks during the relay process. This simplification aims to mitigate the challenges associated with selecting optimal subsets of transactions under denial-of-service constraints, providing a practical solution for straightforward one-parent-one-child transaction scenarios. It involves a direct comparison of fee rate diagrams for the entire package, streamlining the computational process.

Building upon this foundational idea, a method for dealing with packages that linearize into multiple chunks is introduced. The recommendation is to process each chunk separately, akin to individual transaction submissions. This approach ensures that packages are not unfairly rejected due to unexpected splitting during linearization caused by pre-existing subpackages in the receiver's mempool. Moreover, it maintains computational efficiency since processing can be paused between chunks to manage peer-to-peer message latency without raising additional security concerns related to denial-of-service attacks.

The proposal outlines a detailed sequence for processing transaction packages, including deduplication of transactions already in the mempool, pre-linearization excluding in-mempool dependencies, and the splitting of the package into chunks based on decreasing fee rates. It emphasizes the necessity of halting the processing of chunks that do not meet the minimum fee rate criteria, preventing low-value transactions from congesting the mempool. Additionally, the procedure entails identifying conflicts within the mempool, conducting replacement checks to ensure the economic viability of new transactions over existing ones, and verifying the transactional integrity against standard policy rules.

The process facilitates the efficient addition of new transactions to the mempool by dropping conflicting transactions and adding valid ones after consensus validation. This method not only minimizes the potential for disruption due to differences in mempool states across nodes but also allows for a more dynamic and economically rational organization of the mempool. It acknowledges the limitations of fee appropriation across different transaction chunks, advising against practices that rely on such mechanisms due to their inherent unreliability and the potential for manipulation.

In conclusion, this refined approach offers a balanced solution that respects the current operational paradigm of processing transactions individually while introducing the flexibility to group related transactions for more efficient mempool management. This strategy represents a thoughtful evolution in handling transaction packages, aiming to enhance network reliability and performance without compromising security.