An often misunderstood topic is that of chain splits and how they are potentially resolved. With the recent proposal from Shaolinfry discussing User Activated Soft Forks (UASF) getting much attention, these misunderstandings must be clarified to fully understand the implications of chain splits and their potential resolutions.
Types of Forks
Miners can create chain splits through the deliberate orphaning of blocks that appear to be valid to some clients. Users maintain a set of consensus rules that they require of all blocks. When users disagree about the sets of consensus rules to enforce, they will follow a different chain. To simplify discussion, we’ll skip the case where the consensus rules are agreed upon, but miners decide to orphan blocks for other reasons, and cases where there are more than two sets of consensus rules.
In the following examples, there are two sets of rules, the Red rules and the Yellow rules. In these examples, the Red rules are original rules being enforced, and the Yellow rules are the modified rules. Orange rules are the combination of both Red and Yellow rules (both rule sets agree that these blocks are valid).
Incompatible Hard Fork
An incompatible is the simplest type of chain split to understand. At a certain block height, some users decide to implement a new ruleset. In this case, the new ruleset is completely independent of the original rules.
Incompatible Hard Fork
A hard fork occurs after some miners decide to mine on the new ruleset, and some continue on the old ruleset. No block produced under the new rules is valid under the old rules, and vice versa. The Ethereum/Ethereum Classic split is an example of this kind of split. In this case, the chains are eternally split with no chance of ever converging, no matter how much work is mined into each chain.
Semi-Compatible Hard Forks
A semi-compatible hard fork occurs whenever the rulesets intersect, but there are some blocks that are valid on only one of the chains for each chain.
In these cases, miners can prevent a chain split by mining only Orange rule blocks. However, once a miner mines a Red or Yellow block, the chain splits. It is possible for the chains to converge if miners eventually put together an exclusively Orange chain starting from when the users accepted Yellow rules that surpassed the total work of both of the other chains. If they ever did this, both the Red/Orange and Yellow/Orange chains would be orphaned by Red/Yellow clients, and they would see a single chain. There are no major forks of this type that I am aware of.
The best bet for miners in this case (depending on the specifics) would typically be to just mine Orange blocks, preventing any chain split. By doing so, miners are effectively turning a Semi-compatible fork into a Soft Fork.
Compatible Hard Fork
In a hard fork, the ruleset expands, to include all of the previous rules, but also allowing other conditions.
When the rules expand, as soon as a miner mines a block with the Yellow rules, the chain splits. This type of split will diverge as long as the Yellow chain contains more work than the Orange chain. One danger in this type of split is that if the Orange chain contains more work, the Yellow chain will be orphaned. Users of the Yellow chain must not only be sure that a vast majority of hashpower will be on this chain initially, but will continue to be on this chain for eternity. Examples of this type of fork include Bitcoin XT, Bitcoin Classic and Bitcoin Unlimited.
A soft fork is when the ruleset is tightened and the Yellow rules are completely covered by the Red rules (thus only Orange and Red rulesets).
The chain split can occur whenever a miner creates a Red block. Users who use the Red ruleset will follow that chain, and users who use the Yellow ruleset will follow the Orange chain. In this case, if the majority of hashpower ever starts enforcing the Orange rules, the Red chain will become orphaned. This type of fork occurred in Bitcoin’s history numerous times with changes such as BIP66, CSV, CLTV, and is in the proposed SegWit Soft Fork.
Reorganization Risk and Split Risks
Both massive reorganizations and chain splits present dangers to users and miners. A massive reorganization can cause previously accepted transactions to disappear, which will guarantee that a large number of people will lose money in the process.
In this case, for example, perhaps a year ago you were paid 10BTC for your car, and a year later, that transaction essentially disappears from the ledger and your chain is abandoned. You have no car and no Bitcoins. This type of behavior would cause a great loss of confidence in the currency. Depending on the type of split, a massive reorganization will only affect users of the looser ruleset. Users of the tighter ruleset will never get reorganized.
A chain split also presents risk. The value of Ethereum took a tumble after it split from Ethereum Classic. It added confusion to the marketplace (Which is really Ethereum? The one with the original rules, or the one with the rules the centralized Ethereum Foundation enforces today?). A chain split affects all users adversely. There are cases where a split may be preferred (say, two groups have vastly different interests and are best served following their own wants, rather than compromising).
Risk for most of these forks can be mitigated by both miners and users, in most cases.
For an incompatible hard fork, no mitigation plan can occur. The chain IS splitting, so long as some miners and some users want it to. There is nothing that can happen. This is the equivalent of getting a divorce decree and parting ways, never to interact again.
For a semi-compatible soft fork, miners have the power to prevent both a chain fork and massive reorganization. If the majority of miners choose to mine only Orange blocks, users will remain on one chain and reorganizations will be limited to a small number of blocks.
For a compatible hard fork, risk is exclusively on the Yellow rule users. Their best mitigation is to ensure the majority of the economy is on their side. It’s also important to make sure the majority of the miners are also on their side initially, otherwise the chain will not split. Without the majority of the economy, the value of the Orange blocks will be greater, thus pulling miners interested in profit to their side, leading to a massive reorganization.
Extreme care must be taken in this scenario (something that was not present with Bitcoin XT, Bitcoin Classic, nor the proposed Bitcoin Unlimited). The former would activate with a mere 75% of hashpower, and Bitcoin Unlimited has no threshold for activation.
For a soft fork, the risk is exclusively on the Red rule users. Their best mitigation strategy is to ensure that they have the economy on their side, and the vast majority of miners following the Red rules OR the vast majority of miners on the Orange rules.
This may seem a bit counterintuitive, but if the vast majority of miners are mining the Orange rules, then they will remain in consensus with the Orange users and will not get Orphaned. Miners can mitigate this by only mining blocks in the Orange set and orphaning the Red set.
Miners have a significant role in mitigating this risk. In every case except the Incompatible Hard Fork, the miners can prevent a chain fork. For the semi-compatible hard fork, they can do this by converting it into a soft fork. For the compatible hard fork, they can only do this by rejecting the hard fork. For the soft fork case, they do this by enforcing the soft fork. However, even without the miners doing this, users have an incentive to protect themselves by enforcing the Orange rules and rejecting anything does not meet them. This means rejecting hard forks and enforcing soft forks.
Epilogue: Escaping a Miner-Imposed Ruleset Change
Many, including Jeff Garzik, have cast suspicion upon soft forks because they do not give users a choice. The nature of Bitcoin and other Proof-of-Work based blockchains cannot prevent miners from enforcing stricter rules than users agree to. However, users do have power — by invoking an incompatible hard fork.
In this case, users will force the chain to split by introducing a new ruleset (which may include a proof-of-work change, but does not require one). This ensures users always have an escape from a miner-imposed ruleset that they reject. This way, if the economy and users truly reject a soft fork rule change, they always have the power to break away and reclaim the rules they wish. It may be inconvenient, but the same is true of any attack by the miners on users.