bitcoin-dev

Altruistic Rebroadcasting - A Partial Replacement Cycling Mitigation

Altruistic Rebroadcasting - A Partial Replacement Cycling Mitigation

Original Postby Peter Todd

Posted on: December 9, 2023 10:08 UTC

In the realm of Bitcoin transactions, an innovative method has been suggested to counteract replacement cycling attacks.

These attacks involve a complex process where attackers broadcast a series of double-spend transactions to manipulate the spending of outputs. The primary stage begins with a target transaction, followed by the attacker's attempts to double-spend by broadcasting additional transactions. This type of attack is particularly threatening to mechanisms such as lightning HTLCs and signatureless anchor outputs, where the outcome hinges on whether certain outputs are spent or left unspent.

A proposed solution to mitigate such attacks is for altruistic third parties to monitor and rebroadcast the original transactions that were replaced during the attack cycle. Since these transactions remain valid after being temporarily replaced and purged from a node’s mempool, they can be re-entered into the network. Implementation of this concept would necessitate code development to track replaced transactions and identify the right moments to rebroadcast them. However, as the burden of storage can be distributed among interested parties, the operation of normal nodes is not adversely affected.

A deeper analysis into the resources required for this approach reveals its feasibility, even under extreme conditions where a DoS attacker dedicates substantial resources to overwhelm the rebroadcasting system. An example calculation demonstrates that the storage demands are manageable with current hardware capabilities, suggesting that providing this service to the network could be cost-effective. Moreover, miners themselves might have an incentive to engage in rebroadcasting, as it could ensure they do not miss out on profitable transactions.

Despite the potential benefits, there are limitations to the current implementation of transaction propagation in Bitcoin Core, which relies solely on INV announcements without a mechanism to reconcile mempools between peers. A missed INV announcement can lead to transactions being overlooked, posing a risk that rebroadcasting may not reach all nodes if the number unaware of the transaction falls below a critical threshold. This problem could be exacerbated by a well-timed sybil attack by an adversary. Nonetheless, proposed improvements such as the Transaction Announcements Reconciliation BIP aim to address these issues by enhancing the synchronization of mempools across the network, ensuring that transactions, irrespective of replacements, would eventually propagate to all nodes.

For further details on replacement cycling attacks and the Transaction Announcements Reconciliation BIP, references [1] and [2] respectively can be consulted. Additionally, direct communication regarding this discussion can be made through the provided contact information at Peter Todd's domain.