The Differences Between Hard and Soft Forks
Many people do not fully understand the difference between hard and soft forks and the implications for the network and ecosystem.
Hard forks is a permanent divergence in the the block chain, commonly occurs when non-upgraded nodes can’t validate blocks created by upgraded nodes that follow newer consensus rules.
Soft forks is a temporary divergence in the block chain caused by non-upgraded nodes not following new consensus rules
In the light of recent events, it is high time we discuss the issue of forking including both its benefits and potential catastrophic outcomes, including multiple versions of a coin co-existing in parallel and the various network attacks associated with that.
In the simplest terms, hard and soft forking describe two separate ways of updating the cold wallet software when the latest version looks a bit compatibility with the previous versions. This however is not to be confused with a software fork, where someone takes the original project code and modifies in order to create a new product of their own such as Litecoin being a product spin off of Bitcoin.
In order to better understand forking, we first need to know what a node is defined as anyone who possesses a copy of the blockchain, as they'll be playing a very important and integral role in these processes.
A soft fork is a backward compatible method of upgrading the cold wallet software and defined as a temporary split in the blockchain that occurs when these new rules are implemented. The original chain contains blocks from non-upgraded nodes, however it will also accept blocks generated by the upgraded nodes. Meanwhile, the forked chain contains blocks only from upgraded nodes which have chosen to actively support the new rules and the soft fork.
As soon as the soft fork is implemented it is then up to the upgraded nodes to try and reach a clear majority and remind us to reach a certain percent of the network hash rate usually by a certain block number. Otherwise, the soft fork will fail and the original chain will simply carry on unchanged.
However, if a consensus is reached, the new rules are implemented across the network and any non-upgraded nodes still mining will simply be waiting their time, rehashing old invalid information both generating and gaining nothing. This in turn leaves the upgraded nodes blocks being recognized as the strongest and the truest chain of events.
In comparison, a hard fork enables a quick and high priority change to a rule which is not backward compatible and defined as a permanent diversion in the blockchain that occurs when new rules are implemented.
Both the new and old chains run in parallel to each other, but each follows a different set of rules. Because of this it means users who have chosen to utilize different chains will not be able to send funds to each other as they will each be using a different version of the same coin that are incompatible with one another.
This then also brings up the issue of duel funds, where as soon as the fork happens every coin in existence gets duplicated. So if you happen to have 100 coins from before the fork, you will now have 100 on the original chain and 100 on the forked chain, giving you a total of 200 to spend. Of course, they won’t be worth the same as each other and they are not transferable across chains.
So the hope is that in the long run, one chain gains a clear majority of users and support. If not, the economy and politics around it can become a real mess. So our hope is that a hard fork will only ever be instigated if absolutely necessary, and it has a clear overwhelming support from its users.
Most of these new features will be implemented via a soft fork due to its safe and less urgent nature. These include things such as check sequence verify or CSV, which allow for the coins to be locked and un-spendable until a certain given time period or segregated witness, which seeks to fix for the malleability of transactions on the network.
However, new rules that actually breed compatibility must be implemented with a hard fork. These would include things such as methods to prevent serious network abuse and increase of the block size on the blockchain, or seeking to redistribute funds due to broken code or theft to a centralized method.
Furthermore, this then start to lead on to the question of when a hard fork should actually be taken. The moral and ethical dilemma is behind that decision who should take it and under what circumstances. Unfortunately, however we are not philosophers and that is another topic for another time. So be sure to subscribe so you don't miss it or any other of other content and I will see you next time.