Table of Contents
You are using a smartphone When installing an electronic banking application, you must have encountered a system prompting you to update. At this time, you usually have to consider and agree to the update before the system can be upgraded. Perhaps your phone will also automatically update without notifying you. After all, software upgrades are a necessary process, and if you do not install the latest version of the software, you may not be able to continue using the related services.
In the open source cryptocurrency system, the situation is very different. You don't need to read every line of code that makes Bitcoin work, but it's helpful if you can. Because you will find that in a decentralized environment there is no management hierarchy, and there is no bank that can push updates and content modifications to you at will. Therefore, it is a challenge to implement a new feature update in the blockchain network.
In this article, we will explore how to upgrade cryptocurrency networks without centralized authorization management. Therefore, two different mechanisms emerged: hard fork and soft fork.
To understand how forks work, you must first understand the participants involved in the decision-making process (or governance) of a blockchain network.
In Bitcoin, you can roughly divide the participants into three different subsets: developers, miners, and full node users. They are actually nodes participating in and contributing to the network. As for widely used light nodes (for example, mobile phones, laptops, etc. wallets), they are not real "participants" to the network.
Developers are responsible for creating and updating code. With traditional tokens as you know them, anyone can contribute code to the process. The code is publicly available so they can submit changes to other developers for review.
Miners are participants in protecting network security. They run the cryptocurrency’s code and devote computing resources to adding new blocks to the blockchain. For example, in the Bitcoin network, they achieve this through proof of work. Miners will obtain corresponding mining profits in the form of collective rewards.
Full nodes are the backbone of cryptocurrency networks. They are responsible for validating, sending and receiving blocks and transactions, and maintaining a copy of the blockchain's data.
You may find overlap among these different categories of identities. For example, you can be a developer and a full node at the same time, or a miner and a full node. You can also have all three identities at the same time. But in reality, we believe many cryptocurrency users do not fill these roles. Instead, they choose to use lightweight nodes or centralized services.
Through the above introduction, you now also have an in-depth understanding of the responsibilities of developers and miners in the network. Developers are responsible for creating the code, without which you won't be able to run the software and there will be no one to fix bugs and upgrade with new features. Miners are responsible for ensuring network security, and without healthy mining competition, the blockchain can be hijacked or grind to a halt.
However, if developers and miners try to brute force the network to run according to their wishes, there will be certain adverse effects. For most users, real control resides with full nodes. They keep the network up and running and allow users to choose the software they want to run.
Developers are not going to break into your house and threaten you at gunpoint with downloading Bitcoin's core binaries. If the miners adopt a tough attitude and force customers to choose unnecessary changes, then most users may not buy it.
In fact, neither miners nor developers are powerful overlords, but service providers. If a user decides to no longer use the network, the tokens will lose value. The loss in token value will directly affect miners (their rewards are worth less when measured in USD). Likewise, for developers, they can only be ignored by users.
You will find that none of this software is proprietary. You can make any changes you want, and if other people are running your modified software, you can interact with each other. In this case, you are actually creating a new network by forking the software.
Soft fork is achieved by copying and modifying software code. The original project continues to exist, but a new project is spawned separately, and the new project develops in a different direction. We assume the team at your favorite cryptocurrency content site has a major disagreement on how to proceed. Part of the team may replicate the site into other areas. However, as we look to the future, they will also publish articles that differ from the original content.
These projects are built on a common foundation and share the same historical data. Just as one road later split into two, their paths diverge from now on.
Please note that this type of thing happens all the time in open source projects and has been around long before Bitcoin or Ethereum existed. However, only in the blockchain world, the difference between hard forks and soft forks exists. We will discuss this in detail below.
➠Go to Binance to buy Bitcoin to turn on your crypto Currency world!
Although the names are similar and have the same purposes, but there is a big difference between hard forks and soft forks. Let us introduce them in detail.
A hard fork is a software upgrade method that does not support backward compatibility. Typically, these situations occur when a node adds new rules in a way that conflicts with the rules of an older node. New nodes can only interact with nodes running the new version of the software. As a result, the blockchain split, producing two separate networks: one running according to the old rules, and one running according to the new rules.
The node turns blue after the upgrade. The previous yellow nodes refused to connect to the blue nodes, but the blue nodes can connect to each other.
Thus, there are now two networks running in parallel. They will continue to produce blocks and transactions but will no longer work on the same blockchain. Before a blockchain network reaches a fork block, all nodes have the same blockchain (and the history still exists), but after that they will have different blocks and transactions.
Since the same history exists, if you held before the fork There are tokens, then you will get tokens on both networks at the same time. Suppose you have 5 BTC in hand when the fork occurs at block height 600,000. You can choose to spend the 5 BTC on the original blockchain when the block height reaches 600,001, but the consumption at the 600,001 block height will not be recorded on the newly generated blockchain. Assuming the encryption method has not changed, these 5 tokens will still exist in your private key on the new forked network.
Another example of a hard fork is the one that occurred in 2017, when Bitcoin split into two independent chains, the original Bitcoin (BTC) and the new Bitcoin Cash (BCH) ). The fork came after much debate in the community over the scaling of block sizes. Bitcoin Cash (BCH) supporters want to increase the block size, while Bitcoin (BTC) supporters oppose the change.
The increase in block size requires modification of the rules. This was done before the SegWit soft fork (more on that later), so nodes would only accept blocks smaller than 1MB. If you create a 2MB block, other nodes will refuse to verify it.
Only nodes that have upgraded their software to support block sizes greater than 1MB will accept these blocks. Of course, this makes them incompatible with previous versions, so only nodes with the same protocol can communicate with each other.
Soft fork is support Backward compatibility's software upgrade method, where upgraded nodes can still interact with non-upgraded nodes. The upgrade method of soft fork is usually to add a new rule to the program, which will not conflict with the previous old rule.
For example, the block size can be reduced through a soft fork. Let’s use Bitcoin as an example again to illustrate this point: There is an upper limit on block size in the Bitcoin network, but there is no limit on the lower block size. If you only want to accept blocks under a certain size, just reject blocks larger than that.
However, doing so does not automatically disconnect you from the network. You can still interact with nodes that don't enforce these rules, but some of the information they pass to you will be filtered out.
The aforementioned Segregated Witness (SegWit) is a very good example, which occurred shortly after the split of Bitcoin and Bitcoin Cash. Segwit is an update that changes the format of blocks and transactions, and it’s designed in a clever way. Old nodes can still verify blocks and transactions (in formats that do not violate the rules), but there are certain fields that they cannot read. Only when the node is upgraded to a newer version will some fields become readable and other data can be parsed correctly.
Even more than two years after SegWit was activated, no Complete the upgrade of all nodes. There are many benefits to doing this, such as the network will not be interrupted and upgrades will not be so urgent.
Essentially, these two types of forking work differently. A controversial hard fork upgrade will split the community in two, but a planned hard fork upgrade allows all participants to freely choose whether to modify the program.
Soft fork is a more stable option. Generally speaking, since new upgrades don't conflict with previous rules, you can only enforce certain restrictions. That said, if you can implement upgrades in a compatible manner, you don't need to worry about the risk of network fragmentation.
Hard and soft forks are critical to the long-term success of blockchain networks. Despite the lack of a central authority, they are able to make changes and upgrades in a decentralized system.
Forks allow blockchains and cryptocurrencies to integrate more new features during development. Without these mechanisms, we need a centralized system with top-down control. Otherwise, we are stuck with hard-and-fast rules for the life of the software agreement.
➠For questions related to forks, please go to Ask Academy!