Mini
Let’s take a deeper look into the block creation process and the parent-child relationship between each block in a blockchain.
For the unacquainted, blockchain technology can seem extremely complicated. However, the basic principles are pretty simple: new transactions are verified, grouped into blocks, and added to the blockchain. All blocks in a blockchain follow a parent-child relationship and are linked to one another.
This entire chain of transaction data is distributed and visible to all network participants. Hence the term distributed ledger technology (DLT). Let’s take a deeper look into the block creation process and the parent-child relationship between each block in a blockchain.
How new blocks are added to a blockchain
So, the big question is – how are blocks created? Let’s learn it with the example of Bitcoin. Bitcoin follows the proof-of-work consensus mechanism where hundreds of thousands of miners compete to solve a mathematical problem that requires tons of computational power. The first miner to find the answer to the mathematical problem is allowed to create a new block and rewarded with 6.25 BTC for their efforts.
Parent-child association
When a new block is created, its data is encoded and passed on to the next block. Therefore, every block contains a link to its predecessor, forming a genealogy similar to a family tree. Every new block is like a child that carries forward a link to its parent block.
In the case of Bitcoin, this link can be traced back to the Genesis Block, the first block ever created on the Bitcoin network. The Genesis Block is the only block without a parent, like Adam and Eve from the Bible, which could explain the reason behind the name Genesis. Each block is a single child born to a single parent without exception.
What are orphan blocks?
As mentioned earlier, the first miner to solve the mathematical problem is given the right to add a new block. Sometimes, two miners solve the problem at the same time and create two blocks simultaneously. However, per blockchain guidelines, a parent block can have only one child. This creates a problem: which block is carried forward and which one is disowned and deleted?
The network nodes decide this. They create a small fork in the network and begin adding subsequent blocks under the two duplicate blocks. Therefore, each of the two blocks ends up having a separate family tree of its own.
The fork also initiates a race to see which family tree can verify and create the most blocks. The fork with more verified blocks gets accepted into the blockchain. On the other hand, the block with the shorter chain is known as an orphan block and is discarded. All the verified blocks that are generated from the orphan block are sent back to the mempool, where they will be validated once again and added to the new chain.
However, the term orphan block is a bit misconstrued. An orphan is a child with no parents. Only the Genesis Block fits this description as it has no parent blocks. That’s why some blockchain faithful refers to these discarded blocks as stale blocks rather than orphan blocks. However, for the sake of simplicity, unaccepted blocks are generally referred to as orphan blocks. Also, the miner who creates an orphan block usually does not receive any reward.
Conclusion
This parent-child relationship holds true for most blockchains. However, when it comes to dealing with orphan blocks, some blockchains have adopted different techniques. For instance, Polkadot has a coding agreement called GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) that decides which child block to keep and which to discard.
On the other hand, Ethereum uses the GHOST (Greedy Heaviest Observed SubTree) protocol to decide what happens with orphan blocks. But in any case, two blocks created simultaneously are an issue that must be dealt with before the blockchain can be carried forward.
Read More: www.cnbctv18.com