11

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?

0

3 Answers 3

2

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.

7

A general solution is EIP 155 Simple replay attack protection.

Starting with Geth 1.5.3 and Parity 1.4.4, they implement EIP 155 so that your ETH transactions should be safe from a replay attack on ETC. Create another account and move all your ETH to the new address. Don't forget to backup this new account (and don't delete the old account since it has your ETC).

If you are using another wallet, you should check whether they have implemented EIP 155.

6

The easy, low-tech way to do this for ETH held in a regular Externally Owned Account is to create two new addresses, one for each chain, and send a transaction on each chain moving your ether to a different address. Once that's done any subsequent replayed transaction will be coming from an address with no ETH in it, and will therefore be invalid.

It's theoretically possible that you'll be victim of a replay attack while you're trying to do this, and you'll end up with the ETH moved to the same address on both chains. But since you control this address, you can just try again until it works.

5
  • replay stalkers. this could in principle go on until you use up all your funds in fees.
    – Ethan
    Commented Jul 22, 2016 at 4:17
  • 2
    In theory it could. But you only have to be lucky once, whereas the stalker would have to be lucky every time. Commented Jul 22, 2016 at 4:43
  • 5
    Not just theoretical: pretty much every transaction is being replayed across both chains. I suspect this is due to a few clients that connect to peers on both chains and relay transactions. They're not malicious, but the effect is the same. Commented Jul 24, 2016 at 7:58
  • @Nick, is the logic here (and that involved with the various split contracts) that if I can get to a state where one chain has ether in a given account whilst the other chain does not then whilst transactions can be replayed it will not matter? - on the chain where the account has no balance the replayed transaction(s) will fail. If so.. At this point are there any other risks now, or down the line or is one 100% safe to act independently on each chain? Commented Jul 24, 2016 at 21:15
  • 1
    @ThomasClowes More or less. A transaction that tries to use more balance than is available will not execute at all. Commented Jul 26, 2016 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.