Uncle Block

Last Updated :

-

Blog Author :

Edited by :

Reviewed by :

Table Of Contents

arrow

What Is Uncle (Ommer) Block?

An Uncle Block, also known as Ommer Block, in the Ethereum blockchain refers to a block that was validly mined but is not included in the main chain. This situation typically occurs when multiple miners find a valid block at nearly the same time. When this happens, the network can only include one of these blocks in the main chain, while the others become uncle blocks.

Uncle Block

Miners whose blocks become uncles receive a reward, albeit smaller than the reward for the main block. It serves as a form of compensation for their computational effort. Uncle blocks are not considered failures; instead, they represent valid contributions to the network's security. They contain transactions and are connected to the main chain, though indirectly.

  • Uncle blocks are created when multiple miners mine valid blocks at nearly the same time. While this phenomenon is common in Ethereum, it can also occur in other blockchain networks.
  • The blockchain protocol selects one of the valid blocks to be included in the main chain based on factors like total difficulty, not solely based on hash rate. 
  • Miners who produce uncle blocks receive a smaller reward in Ether compared to the main block reward. 
  • Despite not being included in the main chain, uncle blocks contain valid transactions and contribute to the security of the network. They are stored in the Ethereum blockchain's Merkle tree structure.

Uncle Block Explained

An uncle block in the Ethereum blockchain refers to a valid block that was not included in the main chain due to arriving slightly later than another block at the same height. Uncle blocks are not stale blocks; instead, they are valid blocks that contribute to the security of the network, and it is decided from the chain created after the block. In simple words, if more blocks get added to any block, that sequence becomes a part of the Ethereum chain. Likewise, the ones reaching later become an uncle block.  

The existence of ommer blocks in the blockchain usually depends on the block hash rate. This rate considers the computational power used for block mining. So, a block with a higher hash rate will continue building the chain. In contrast, the other block will act as an ommer to the chain. However, in this case, the miner will still receive a reward for the mining performed. Moreover, it serves as a vital distinction among the orphan and stale blocks.  

With the orphan blocks occurring majorly in Bitcoin, ommer blocks are visible only in Ethereum. Yet, miners in the former do not receive any rewards for their orphan blocks mined. Hence, the Ethereum network solves this issue by including the ommer block data in the Merkle tree and allotting uncle rewards to the miners. 

However, there is an equivalent risk associated with the ommer blocks. If the number of ommer blocks increases, it raises the gas fees on the network. 

Uncle Bandit Attack

Apart from the rewards received on ommer blocks, there are certain risks associated with them. One such threat is the uncle bandit attack. It is a type of re-mining of blocks to gain more rewards. This attack usually occurs when an attacker witnesses something worthy in an ommer block and brings it forward. 

While ommer blocks become a part of the blockchain, only some transactions fail to enter the blocks. As a result, they stay in a mempool (a room for pending transactions) as bundles. At this point, Flashbots (a research organization) later submits these bundles to Proof of Stake (PoS) validators for re-mining. So, when they are mined in an ommer block, transparency gets enabled. As a result, anyone can see these transactions. 

However, they do not provide any particular opportunity for attackers to exploit them for extensive rewards. Ommer blocks contribute to the overall security and decentralization of the Ethereum blockchain. In summary, while uncle blocks may present certain risks and considerations in the Ethereum network, the concept of an uncle bandit attack as described is not a recognized threat within the Ethereum community.

Examples

Let us look at some examples to comprehend the concept better:

Example #1

Suppose Harry is a developer who operates as a miner in the crypto space. In the past three years, he has been an honest miner on the Ethereum blockchain. However, in this period, there were instances of uncle blocks, too. One such instance was when James (another miner) and Harry were competitive enough to add their respective blocks to the chain. It was equivalent to a cat race. However, the network only considered James's block, and the other one acted as an ommer block. 

At this stage, Harry was worried about the computational power and efforts taken to verify transactions. But, in the later stage, he did receive a subsequent block reward (1.2 ETH) in return. 

Example #2

Suppose Sophia and Ethan, both miners in the Ethereum network, find themselves in a race to validate transactions and create blocks. One evening, they both successfully mine blocks within milliseconds of each other.

Sophia's block, Block S, and Ethan's block, Block E, contain different sets of transactions but are both valid according to Ethereum's consensus rules. As these blocks propagate through the network, some nodes receive Block S slightly faster due to network latency, while others receive Block E first.

Despite their efforts, the majority of nodes accept Block S as the next block in the chain due to its slightly earlier arrival time. Meanwhile, Block E, though also propagated, arrives slightly later to most nodes and is not chosen for the main chain.

Block E, being valid but not included in the main chain, becomes an uncle block. Despite its status, it remains an integral part of the Ethereum network, contributing to its security and decentralization.

Importance

Following points indicate the significance of the uncle blocks in the Ethereum network. Let us look at them:

1. Includes block validity

The prime importance of ommer blocks is that they enable block validity. It means that the transactions included in the blocks turn valid and get stored in the database.

2. Reduces centralization of incentives

Through these blocks, miners can also receive block rewards in return. It creates space for uncle block protection for the mining performed by network nodes. This reward is absent in orphan blocks and, hence, distributes even rewards to all miners. 

3. Enhances network efficiency

Lastly, it also helps in advancing the efficiency of the existing Ethereum network. It enhances the network's security and eliminates any space for malicious actors to exist. Also, any development of centralized pools reduces the network. 

Frequently Asked Questions (FAQs)

1. Are uncle blocks included after a fork?

Blockchain forks do include ommer blocks in their presence. During mining of the same blocks, forks do get created simultaneously. They do decide the future blocks, too. In short, if any of the forked chains grow faster, that chain acts as the parent chain. However, the other fork will definitely include Uncle Blocks. 

2. Do uncle blocks get deleted?

Although ommer blocks are not a part of the parent chain, they do get validity on the transactions verified. Here, only ommer block headers are a part of the Ethereum network and not the block. However, the transactions may remain pending in the same pool. In short, it is like a room that exists, but the people may have no identity. 

3. Are uncle blocks still possible after the Ethereum merge?

After the merge in September 2022, the network will select the validators in advance for mining purposes. Through this, only one validator can mine blocks at the same time. Thus, the presence of such blocks has already disappeared.