# What happens if the Ethereum network is separated?

Say China's internet suddenly is separated from the rest of the World (by accident or government action). Miners in China keep mining Ethereum blocks, all other miners, as well.

Then after a couple of days the firewall is loosened and the networks rejoin.

What would be the consequences?

Firstly, in the real world, people would notice. From the perspective of both sides of the separation, the network's hash rate would drop considerably. People would soon work out what had happened, and presumably then attempt to fix it.

While the network is split

For the sake of discussion, let's assume everyone carries on as normal.

On each side of the split there would now be a separate chain, with miners on each side of the divided network continuing to add blocks to their respective chain.

Users on each side of the split would be able to transact and call contracts as before, though these transactions wouldn't be able to propagate across the divide to the other chain - they would only be visible on that user's side of the split. So, for example, if Alice, on one side of the split, tried to send her friend Bob, on the other side of the split, some ETH, then to Alice the transaction would have completed successfully, and ETH would be transferred to Bob's address. Bob, however, wouldn't actually receive the currency, and he'd have no knowledge that Alice had made the transaction.

When the network reconnects

Now imagine that the problem causing the split is resolved, and the two chains are reconnected.

The consensus algorithms kick in, and attempt to resolve the two chains into a single chain. Of the two chains, the longest would be considered the main chain, with the other chain becoming void. Chain "length" is measured in cumulative difficulty, not number of blocks, so the longest chain would be the one belonging to the side of the split with the greatest hashing power - i.e. the bigger, more powerful of the two networks.

The blocks on the losing, "shorter" chain would become orphans, and the transactions contained within them voided until the orphaned transactions could be re-packaged into new blocks.

The double spend problem

Imagine that while the network is split in two, Alice spends some ETH on her side of the network. Specifically, she spends some ETH that she owned prior to the network splitting in two, in a transaction involving someone else on her side of the network. In such a case both parties are able to see that the transaction has completed successfully.

Imagine also that Alice is morally reprehensible. Having successfully transacted with someone on her side of the split, she then sends her private key to Bob on the other side of the split. Bob is then able to spend the same ETH on his side of the network. This is all well and good until the two networks reconnect, at which point one of those transactions is going to become invalid as the chain in which they're incorporated is voided. By this point Alice and Bob are long gone.

In the real world, if the two chains became too long, and too many transactions processed, then the risk of allowing the two sides of the network to reconnect might be too great (e.g. too many double spends). It remains to be seen what would happen in such a case.

References: