Pros and Cons behind the Fork

MAI Public Chain
MAI Public Chain
Published in
9 min readDec 21, 2018

In the blockchain, the fork can be understood in this way. An original chain divided into two chains. There are two main fork in a blockchain. One is a soft fork and the other is a hard fork. So what is soft fork and what is hard fork. What do these two forks mean, and what kind of result will be in the end. What is the process of fork in the blockchain? These are the questions we are discussing today.

1. The Concept of Fork

First of all, the fork can be understood as an upgrade. Upgrading is a very common process in a centralized application. But in blockchain, when the nodes are divergent that one side wants to improve and the other side wants to remain, as long as one of them updated its codes, the blockchain will fork. So what is the process of fork?

2. The Process of Fork

Iphone system upgrades an application is very simple, it can upgrade directly in the APP Store, this is the upgrade of the centralized application. But in a decentralized system, upgrading is not that easy. Every time the Bitcoin network upgrades, it needs to be recognized by the community. If the community can’t reach an agreement, it may form a fork. In a nutshell, fork means that a conflict occurs during the upgrade. According to whether the fork is compatible with the old block, the fork is divided into a hard fork and a soft fork. This is similar to the upgrade and patch upgrade of window system.

1)Soft Fork

When the transaction data structure of the blockchain changes, the old node ignores the change and can accept and verify the block produced by the new node. This call a soft fork, it will not generate another chain after the soft fork. Compared to hard fork, soft fork is “moderate”. But because soft fork must be forward compatible, new fields cannot be added. The modifications can only be made under existing structures, so the upgrade space is limited. In addition, the soft fork also has some controversy. The technology of soft fork is much more complicated than the hard fork, which makes the code of the blockchain more complicated. It will be more difficult to maintain the code in the future and easier to generate bugs. Usually speaking, hard fork is extending consensus rules, while soft fork is tightening consensus rules. So once a soft fork is made, it is very difficult to roll back, which is likely to cause hard fork and result in financial losses.

2) Hard Fork

When the transaction data structure of the block changes, the old node refuses to verify the block produced by the new node. The old node thinks it is not in accordance with the rule, so the new and old nodes will follow their own chain which cause a permanent fork, and thus forming two different chains.

Hard fork is divided into two types, technical hard fork and community hard fork. The technical hard fork is a version upgrade of the node code. After the upgrade is completed, the old node code is not compatible. The old node code is invalid and it must be upgraded to the new version in order to carry out mining accounting.

The hard fork in the community is that the views of the community participants are inconsistent which lead some community members to develop new versions and upgrade them. After the upgrade, their mining is carried out on the new chain, while another part of the developers still mining in the original chain, so these two public chains are running at the same time.

3. Compatibility Difference

Both soft fork and hard fork are backward compatible. What is backward compatible? Backward compatible means that the new software accepts data generated by the old software. For example, Windows 10 can run the software of Windows XP. Soft fork can also be forward compatible. Forward compatibility means that the old software accepts data generated by the new software. For example, a compatible version of the document saved with word2013 can be opened by word2010. The hard fork does not support forward compatibility. Once upgraded, the block generated by the new node software will no longer be compatible with the old node. Let me give an example of several cases of hard fork.

For example, the hard fork of bitcoin leads to the emergence of bitcoin cash. Because whether expand the size of the block leads to two parties in the community. One side is represented by the mine filed and the other part is represented by community developers. The two sides were arguing because of the different concept and the interests of themselves. So the party represented by the miner generated two chains through the node code upgrade. Some miners are producing blocks in the new chain, and some miners continue to mine in the old chain, which led to the emergence of bitcoin cash.

1) EOS

A while ago, BM sent a message saying that EOS had to do a hard fork, which shocked a large part of the community. Finally, it was found that it is a hard fork of software technology and does not lead to the generation of two chains. Since the launch of the EOS main chain, there have been minor updates and small patches on the code every week, but these are not hard forks. However, it is obvious that the upgrade proposed by BM is a relatively “serious” upgrade. The purpose is to improve the performance of EOS. This hard fork is not because of disputes in the EOS community, it is a technical hard fork. All nodes will be upgraded to the latest version, and there will be no similar situation like “EOS cash”. If the EOS node is not updated, then the node can no longer continue to exist as a node, and all applications including the wallet will be invalid. Because the old chain and the application are no longer compatible, the entire old chain will “die”, let alone the node.

2) Ethereum

The first influential hard fork in the blockchain should be the fork event of Ethereum. A well-known project in Ethereum, The DAO, due to its own loopholes, the hackers stole the ETH, which was worth about $60 million at the time. In July 2016, the Ethereum development team modified the Ethereum software code to force all funds of The DAO to a specific refund contract address in the 1920000th block which recaptured the DAO contract currency controlled by the hackers. However, some miners did not agree with this modification, so they formed two chains. One is Ethereum (ETH) and the other is Ethereum Classic (ETC), each representing different community consensus and values. However, before the hard fork, the data of these two chains is the same, so the person who originally held the ETH found that they have the same amount of the ETC.

In other words, there are more assets out of thin air. In general, the hard fork of the blockchain does not reduce the assets. Instead, it gives people an extra asset. Hard fork doesn’t seem to be a loss, so blockchain fork become a way to increase assets.

4. IFO

The community hard fork make a large number of currency holders add a new digital currency out of thin air. The way create a new chain and the new currency, which means you can have another chance of 1CO, so the new term, IFO (Initial Fork Offerings), was born in this way.

As more and more hard fork occurs, can Bitcoin’s credibility be the same as before? Will IFO become the killer of Bitcoin? I think it will take time to know it.

IFO could have been a very good experimental method for the transformation of Bitcoin, but these forked currencies did not affect the value and status of Bitcoin, on the contrary, their value seemed to be mostly zero.

Bitcoin can copy unlimited cryptocurrencies infinitely. Why does only Bitcoin have value? The facts have given you the answer. You can copy the bitcoin code and create countless bitcoins, but you can’t copy the ecology behind the bitcoin (developers, miners, exchanges, merchants, users). Just like if give you the source code of Taobao and WeChat, can you recreate a Taobao and WeChat?

There is no final conclusion about the quality of the fork. If the purpose of the fork is to make the public chain more robust, then we think that this fork is beneficial. If the purpose of the fork is purely for IFO and evolved into a behavior of making money, then we believe that such a fork is detrimental to the actual value of the public chain. But the final result of the fork must bring some fluctuations in the intrinsic value of the currency.

5. How does MAI Guard Against Hard Fork?

1)Standardize developers and communities to make long-term plans to lead the community.

2) Actively upgrade and maintain the public chain to ensure the stability and adaptability of the public chain.

3) Prevent the concentration of the mining pool. Balance the size of the mining pool through unique PAI consensus mechanism of MAI and tax collection system.

4) Learn the lessons of Ethereum fork and add two-way replay protection.

6. What is Replay Attacks?

The idea of preventing the replay attack is to find a way to make the transaction you send valid only on one chain and invalid on the other.

1) The Main Problems of Replay Attacks

Replay attack is not essentially an “attack”. The main problem is that users accidentally send their split currency to others.

For example, Bitcoin split into two currencies, bt1 and bt2 in November. But user A does not know that he has both currencies. When user A sends bt1 to user B, B can receive both bt1 and bt2 because of the replay attack. However, B only pays A for bt1. In this way, user A loses a split currency without knowing it.

How can user B receive the bt2 currency issued by user A? As long as user B opens the wallet of bt2 currency, it will automatically receive it. User B does not need to do anything else, it is automatically received. If you can’t receive it, you can broadcast the bt1 TXID to the bt2 wallet and then you can receive it. Because the bt1 transaction is the transaction of bt2.

Replay attack is primarily used to attack the authentication. If the identity authentication adopts a challenge-response method, when user A sends a request for identity authentication to user B, B will send a challenge to A. Then A will reply to the challenge, and B will check and analyze the reply of A. If the answer of every challenge is the same, then the attacker can intercept the challenge and reply through network monitoring, and then send an authentication request to B. In this way, B will regard the attacker as A.

2) Solution

We can use nonce which is an arbitrary number used only once in a cryptographic. In this way, the number of each authentication is different, even if the attacker intercepts each challenge and response, it makes no sense.

MAI Telegram (English): https://t.me/MaiEN8888

MAI Telegram (Chinese): https://t.me/MAI888888

MAI Twitter: https://twitter.com/MaiPublicChain

MAI Reddit: https://new.reddit.com/user/MAI_AI

MAI Facebook: https://www.facebook.com/MaiPublicChain/

--

--

MAI Public Chain
MAI Public Chain

Artificial Intelligence-centric Decentralized Ecological Network