Transactions and Hard Forks – Preventing Replay Attack Between Competing Chains

ethereum-classichardforksreplay-attacktransactions

After the recent hardfork we have a winning chain and a much shorter losing chain left. However, if you are pro or agains the fork, you could still mine and use one chain or the other.

Now, there is an issue. Let's assume I'm on the non-fork chain and create a transaction, sign it and broadcast it to the non-fork network. Vitalik warned users to be aware of replay attacks:

If any users continue to be interested in following the non-fork chain, they should still update, but run with the --oppose-dao-fork flag enabled, though they should beware of transaction replay attacks and take appropriate steps to guard against them; users with no interest in the non-fork chain do not need to worry about transaction replay attack concerns.

Now I understand the transaction would be valid on both chains. How do I prevent the transaction from being broadcasted on the pro-fork network. And how do I prevent the transaction to be valid on the pro-fork chain?

Best Answer

A guide specifically for protecting against replay attacks from the TheDAO hard fork, from https://blog.ethereum.org/2016/07/26/onward_from_the_hard_fork

Users who are interested in taking any actions with their ETC, including creating and participating in applications, converting to another asset, etc are advised to use the splitter contract at address 0xaa1a6e3e6ef20068f7f8d8c835d2d22fd5116444 to move their ETC to a separate newly created account so as to avoid replay attacks; we also encourage the ETC community to consider adopting a secondary hard fork to change transaction formats to make further replay attacks impossible. Until and unless that happens, once ETH and ETC are “split” they should be managed via separate wallets.

To use the splitter contract from inside of the Ethereum Wallet, click on Contracts -> Watch Contract, copy the address and ABI from the above linked etherscan page, and click “OK”; then, click on the contract in the Contracts tab, select “Write to Contract”, and select the “Split” function. It will ask for two addresses; for the first, put the address where you want your ETH to go (feel free to put the same address you are sending from), for the second put the address where you want the ETC to go. Make sure to try this with a very small amount of ether first to verify that it works before increasing the amount. You may use the Ethereum Classic Explorer here to verify that ETC balances have been transferred. A more detailed community-provided guide can be found here.

Related Topic