Author: Gloria Zhao 2021-09-21 16:42:33
Published on: 2021-09-21T16:42:33+00:00
The author of the memo is proposing changes to the mempool policy in Bitcoin Core. The proposed changes would enable package validation in preparation for package relay and allow packages consisting of multiple parents and one child. The mempool's purpose is to store the best candidates for inclusion in a block, and for unconfirmed transactions considered for the mempool, a set of validation rules are applied to prevent DoS attacks from malicious peers.The proposed package RBF (replace-by-fee) allows one to pay for another's conflicts since their package feerate is used in the fee comparisons. However, the proposed policy changes present a security issue for applications and users relying on time-sensitive transactions such as Lightning and other protocols that create UTXOs with multiple spending paths. The author has provided diagrams to illustrate the proposed changes and included links to relevant resources and an implementation of the proposal.The Package Relay project aims to consider multiple transactions at the same time to determine whether they meet fee requirements and if they are better Replace-By-Fee (RBF) candidates as a package. The combination of changes to mempool validation logic, policy, and transaction relay helps propagate transactions with the highest package feerates to miners, making fee-bumping tools more powerful for users.The proposal also suggests P2P messaging changes, but most of the changes are in the mempool's package validation logic, named "Package Mempool Accept". Detailed explanations and rationale were provided for each proposed change, including the modification of BIP125 rules for package RBF. A draft implementation is available in the given link, and feedback is welcome.The Bitcoin Improvement Proposal (BIP) 125 introduced Replace-By-Fee (RBF) as a way to allow users to increase the fee of an unconfirmed transaction to ensure that it is mined in a timely manner. However, Package RBF, which allows for the replacement of multiple transactions with a single package transaction, presented new challenges. The package must satisfy several rules, including the Child Pays for Parent (CPFP) rule and the Absolute Fee rule.Enforcing a rule analogous to BIP125#2 would make Package RBF less useful and break it for packages with parents already in the mempool. Thus, the package RBF rule regarding new unconfirmed inputs is less strict than BIP125#2, but still achieves the same goal of requiring the replacement transactions to have an ancestor score at least as high as the original ones.Other rules include the Feerate rule and the Total Number of Replaced Transactions rule. It is possible for only some of the package to make it into the mempool, but since transactions are evicted from the mempool by descendant score and the package child is supposed to be sponsoring the fees of its parents, the most common scenario would be all-or-nothing. Additionally, packages should not contain already-confirmed transactions due to practical reasons related to mempool validation.
Updated on: 2023-06-15T01:57:54.981718+00:00