mempool transaction witness-replacement [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2022-03-22T19:57:23+00:00


Summary:

A proposal has been made by Larry Ruane to modify the Bitcoin Core mempool by allowing the replacement of existing transactions with ones that have the same transaction ID (txid), but a smaller witness and higher feerate. This change is miner-incentive compatible, meaning that miners would be more motivated to mine transactions with higher feerates. However, there are complications with Replace-By-Fee (RBF) that need to be considered before merging the proposed change. One concern is the code complexity cost, as well as the potential for transaction-relay Denial-of-Service (DoS) attacks. To address these concerns, a per-node setting could be implemented.One advantage of this change is that it may provide a defense against a mempool pinning attack. In scenarios where applications use same-txid-different-witness transactions shared between counterparties, this change would make those applications safer. Additionally, the proposal addresses the issue of DoS tradeoff. If the new transaction only has a slightly smaller witness, an attacker could repeatedly rebroadcast it, consuming significant amounts of relay bandwidth and CPU resources. On the other hand, if the new transaction must have a significantly smaller witness, it may not be possible to replace a transaction with a beneficially-smaller one.The proposed change, known as witness-replacement, is similar to RBF but differs in several ways. One key difference is that witness-replacement does not require evicting mempool descendant transactions because the inputs' txid references to their parent, who is being replaced, remain valid. Another distinction is that signaling is not required for witness-replacement since the outputs cannot be changed.While this proposal could be implemented as a per-node setting, it is desirable for the node network to reach a consensus on relay policies. Ultimately, the proposal aims to improve the efficiency and incentives for miners while addressing potential vulnerabilities and concerns associated with replacing transactions in the Bitcoin Core mempool.


Updated on: 2023-08-02T05:56:15.070778+00:00