Difference between hard fork and soft fork

There are two types of blockchain forks: hard forks and soft forks. Despite the similar names and the same end use, hard forks and soft forks are very different. Before explaining the concepts of “hard fork” and “soft fork”, explain the concepts of “forward compatibility” and “backward compatibility”
new node and old node
During the blockchain upgrade process, some new nodes will upgrade the blockchain code. However, some nodes are unwilling to upgrade the blockchain code and continue to run the original old version of the blockchain code, which is called the old node.
Hard forks and soft forks

hardfor

Hard fork: The old node cannot recognize the blocks generated by the new node (the old node is not forward compatible with the blocks generated by the new node), resulting in a chain being directly divided into two completely different chains, one is the old chain (running original There is an old version of the blockchain code, run by the old node), and one is a new chain (running the upgraded new version of the blockchain code, run by the new node).

soft

Soft fork: New and old nodes coexist, but will not affect the stability and effectiveness of the entire system. The old node will be compatible with the new node (the old node is forward compatible with the blocks generated by the new node), but the new node is not compatible with the old node (that is, the new node is not backward compatible with the blocks generated by the old node), the two can still share exists on a chain.

To put it simply, the hard fork of a digital cryptocurrency means that the old and new versions are incompatible with each other and must be divided into two different blockchains. For soft forks, the old version is compatible with the new version, but the new version is not compatible with the old version, so there will be a slight fork, but it can still be under the same blockchain.

eth hard-fork

Examples of hard forks:
Ethereum fork: The DAO project is a crowdfunding project initiated by the blockchain IoT company Slock.it. It was officially released in May 2016. As of June of that year, The DAO project has raised more than 160 million US dollars. It didn’t take long for The DAO project to be targeted by hackers. Because of a huge loophole in the smart contract, The DAO project was transferred with a market value of $50 million in ether.
In order to restore the assets of many investors and stop the panic, Vitalik Buterin, the founder of Ethereum, finally proposed the idea of a hard fork, and finally completed the hard fork at block 1920000 of Ethereum through a majority vote of the community. Rolled back all the ether including the hacker’s possession. Even if Ethereum is hard forked into two chains, there are still some people who believe in the immutable nature of the blockchain and stay on the original chain of Ethereum Classic

vs

Hard Fork Vs Soft Fork – Which Is Better?
Fundamentally, the two types of forks mentioned above serve different purposes. Controversial hard forks divide a community, but planned hard forks allow software to be freely modified with everyone’s consent.
Soft forks are the gentler option. In general, what you can do is more limited because your new changes cannot conflict with old rules. That said, if your updates can be made in a way that remains compatible, you don’t need to worry about network fragmentation.


Post time: Oct-22-2022