bitcoin-dev

Combined summary - One-Shot Replace-By-Fee-Rate

Combined summary - One-Shot Replace-By-Fee-Rate

Developers have identified a potential flaw in the Bitcoin network's replace-by-fee (RBF) policy that might prioritize less profitable transactions for miners over more profitable ones due to a loophole.

A new commit is proposed to enhance network integrity by rejecting replacements with unconfirmed inputs conflicting with multiple transactions, thereby preventing cycles of unconfirmed transactions.

A scenario was presented showing how four unique conflicts can be constructed with transaction series and confirmed inputs, possibly leading to infinite replacement cycles. The interaction between proposed and existing RBF rules could inadvertently enable these outcomes. An attack attempt revealed a discrepancy in expected versus actual mempool behavior, where replacing transactions must exceed the raw fee-rate of their direct conflicts. A script is available for replication of these findings.

Peter Todd has introduced a feature in his Libre Relay fork on GitHub to refine the RBF mechanism. This includes doubling the required fee rate for replacements and a new service bit for node peering. The code is open for review and testing, with nodes already running it on mainnet and testnet.

Concerns about BIP-125 Rule 2 were raised, which does not prevent combining unconfirmed inputs from different replaced transactions. A draft fix on GitHub addresses this, requiring all unconfirmed inputs in a replacement transaction to come from the same replaced transaction. For educational materials on the topic, further communication should be directed to petertodd.org.

The One Shot Replace By Fee Rate (RBFr) proposal's effectiveness and drawbacks are being scrutinized. The proposal, found on Peter Todd's blog (One Shot Replace By Fee Rate), suggests prioritizing fee-rate over total fee to avoid transaction pinning attacks, but its integration may risk the network’s stability.

The One-Shot Replace-By-Fee-Rate policy is an alternative that focuses on fee-rate rather than absolute fee, aiming to resolve BIP-125 Rule 3 related issues and encouraging fair competition for block space. It requires new transactions to offer a substantially higher fee rate, ensuring top placement in the mempool and avoiding replacement if the existing transaction already has a mineable fee rate.

Research supported by Fulgur Ventures indicates that one-shot and pure replace-by-fee-rate policies are resilient against bandwidth exhaustion attacks, suggesting improvements in efficiency and security for the network and second-layer protocols. The research promotes transitioning to fee-rate-based transaction replacement methods, contributing insights into optimizing transaction management on the Bitcoin network.

Discussion History

0
Peter ToddOriginal Post
January 18, 2024 18:23 UTC
1
January 22, 2024 18:12 UTC
2
January 22, 2024 22:52 UTC
3
January 24, 2024 04:44 UTC
4
January 25, 2024 21:25 UTC
5
January 27, 2024 07:19 UTC
6
January 28, 2024 17:27 UTC
7
January 31, 2024 08:40 UTC