Follow On Google News

What is Chain Reorganization in Blockchain?

13 Sep 2022 By : Harshil Shah
Southeast Asia’s Lar

Key Takeaways


  • A chain reorganization, often known as a "reorg," occurs when a blockchain generates blocks at the same time owing to a defect or a malicious assault. As a result, a temporary clone blockchain is created. 

  • A reorg occurs when a block that was formerly part of the canonical chain, is knocked off due to a rival block beating it out.

  • Chain reorganizations increase node costs, transaction delays, bad user experience, uncertainty, and vulnerability to attacks.

Considering Blockchain’s enormous potential to transform every other industry, and its increased applications, it also faces challenges related to its mechanism. Block conflict is one such flaw in the blockchain that leads to a fork and a further chain reorganization. Let's have a detailed look at it.

To know more about blockchain forks, read - What is a Fork in Blockchain | Hard & Soft Fork

What is chain reorganization?

A chain reorganization, often known as a "reorg," occurs when a blockchain generates blocks at the same time owing to a defect or a malicious assault. As a result, a temporary clone blockchain is created. The longer a reorg lasts, the greater the harm to the networks.

In the context of blockchains, reorgs occur in the removal of a block from the blockchain due to the creation of a longer chain. As a consequence, various miners work on adding blocks of transactions with equal difficulty to the chain at the same time. It is the chain split due to block conflict in which nodes receive blocks from a new chain while the old chain continues to exist. 

A block reorganization attack occurs when two blocks are mined at the same moment. one- and two-block reorgs are common because of network delay, but reorgs that last more than one or two blocks might result in malicious attacks or even network failure.

How does chain reorganization work?

When the first block is generated, a cryptographic hash is generated with it, the next block will contain the hash of the first block. It implies that every valid block is connected to those that came before it by the hash of the preceding block header, which is included in each block. As a result, by connecting each block to its predecessors, a series of blocks (data chains) known as a blockchain is formed.

A block conflict arises when two blocks are mined at the same time. The current conflict resolution approach is based on the Longest Chain Rule (LCR), which states that if several blocks exist, the longest chain is considered legitimate. This means that each node abides by the protocol requirement of seeking to extend just the most extended branch of which it is aware. Because transactions on the incorrect side of the fork are reorganized into new blocks, this rule causes severe problems in security and transaction delay.

If some node operators are quicker than others, there will be a reorg. Faster nodes will be unable to agree on which block should be processed first in this circumstance, and they will continue to add blocks to their blockchain, leaving the shorter chain when the next block is produced.

Furthermore, chain reorg occurs because the miner adding to the next block must decide which side of the fork is the right or canonical chain. The alternative chain will be lost after the miner has picked the fork or canonical chain. A reorganisation attack occurs when nodes get blocks from a new chain while the old chain remains active. The chain would be divided in this situation, resulting in a fork, or duplicate version of the blockchain.

A reorg occurs when a block that was formerly part of the canonical chain, is knocked off due to a rival block beating it out.

For example, miners X and Y may both find a valid block at the same time, but owing to the way blocks propagate in a peer-to-peer network, X's block will be seen first, followed by Y's block. If the two blocks are of equal complexity, a tie will result, and clients will be offered the choice of selecting at random or the previously viewed block. When a third miner, Z, generates a block on top of either X's or Y's block, the tie is broken on the basis of the block selected by Z. The block which is not selected by Z is forgotten, resulting in a blockchain reorganization.

Impact of chain reorganization

Chain reorganizations increases node costs, transaction delays, bad user experience, uncertainty, and vulnerability to assaults.

Node Fees: Reorgs have the potential to increase the number of nodes in a blockchain over time, resulting in a worse user experience. State changes cost extra memory and disc space when moving to a new fork.

Transaction Delays: Reorgs, in addition to increasing node charges, also increase the possibility of delayed transactions. This is a serious issue for exchanges since they must rely on transactions being completed on time or face the implications of having to wait longer for a deposit.

Insecurity: When reorgs are prevalent, consumers have fewer assurances that transactions will be completed on time. Without sufficient context, DeFi transactions would produce considerably poorer results and result in detrimental MEV extraction.

Attack vulnerability: When reorganization becomes more widespread, attackers just need to defeat a subset of honest miners rather than all of them (owing to the "longest chain rule"). A greater number of reorgs simplifies the attacker's task.

PoS facing chain reorganization issues

Proof-of-Stake (PoS) has numerous advantages over the Proof-of-Work (PoW) consensus, whether it's environmental effects, no centralization issues, or Strong stakeholder incentives. But, in terms of vulnerability to chain reorganization PoW is riskier. 

Consider the "nothing is at risk" strategy. Miners have nothing to lose by voting for several blockchain records. This is due to the fact that, unlike PoW, the cost of mining on several chains is cheap, and miners can try to double-spend at no cost in the event of blockchain rearrangement.

For instance, on May 26, Ethereum suffered the longest chain reorganization of seven blocks. It first seemed to be a  high-level security risk for the Beacon chain. But, it was found that upgraded nodes were around twelve seconds faster than invalidators who had not updated their clients. As a result, the Beacon Chain reorganization looks to be a harmless rather than a destructive occurrence. Concerning the upcoming Ethereum Merge, the Eth transition to a PoS network. Chain reorganization will be a pressing question for security... 

WHAT'S YOUR OPINION?