Proposal: Package Mempool Accept and Package RBF



Summary:

The proposed changes to the Bitcoin mempool policy and validation logic aim to allow for fee-bumping by CPFP, provide greater security for applications and users relying on time-sensitive transactions, and simplify the validation logic. The Package Relay and Package Mempool Accept project aims to consider multiple transactions at the same time to better determine which should be accepted into the mempool, particularly when they don't meet fee requirements individually or are better Replace-By-Fee (RBF) candidates as a package.The proposed Package Mempool Accept changes include submission to mempool through RPC only, allowing packages to contain already-in-mempool transactions, requiring packages to have a Multi-Parent-1-Child topology, using the package feerate to meet feerate requirements, and allowing parents in the transaction to RBF mempool transactions. To ensure that packages adhere to the proposed Package Mempool Accept changes, there are certain rules that must be followed. These include that packages cannot exceed 25 counts and total size of 101KvB, must be topologically sorted with parents appearing before children, cannot have conflicting transactions, and the union of all ancestors and descendants is considered.The proposed package RBF (Replace-By-Fee) for Bitcoin involves a set of rules that modify those used in BIP125. The rules aim to ensure that replacement transactions have a higher ancestor score than the original and that the package is required to be a higher feerate mining candidate than each of the replaced transactions. All mempool transactions that can be replaced must signal replaceability, and the package must increase the absolute fee of the mempool. The package feerate must be higher than the replaced transactions by at least the minimum relay feerate. In addition, the package cannot replace more than 100 mempool transactions. A rationale for Package RBF is that even with package feerate, a package will not propagate as intended if RBF still requires each individual transaction to meet the feerate requirements. The rules are slightly modified from BIP125 to achieve this goal.The Bitcoin mempool policy is a set of rules applied to unconfirmed transactions for their acceptance into the mempool. This includes validation rules beyond consensus, primarily to protect against resource exhaustion and to keep the highest fee transactions. Bastien Teinturier raised concerns about an issue concerning LN where a different commit tx is pinned, but it cannot be known which one. Gloria Zhao suggests a set of rules that would allow packages consisting of multiple parents and one child. The proposal also addresses limitations around the CPFP carve-out. Overall, the proposed changes are not consensus or P2P protocol changes but could affect transaction propagation. While the Package Mempool Accept implementation is still a work in progress, feedback is welcome. Expected FAQs include whether it is possible for only some of the package to make it into the mempool, and the answer is yes, but the most common scenario would be all-or-nothing. Another FAQ asks if packages should contain already-confirmed transactions, and the answer is no due to practical reasons. In mempool validation, it is difficult to tell with 100% confidence if a transaction has already confirmed. Links provided include previous best practices and proposals related to RBF, as well as examples illustrating how the rules work.


Updated on: 2023-06-15T02:05:43.589150+00:00