Ethereum: Is there actual consensus on the blockchain’s tip or only until the next block?
Understanding the consensus on Ethereum: Is it indeed only to the next block?
The world of blockchain and cryptocurrency can be confused, especially when it comes to consensus. In this article, we will deepen the concept of consensus in the context of Ethereum and explore if there is a real agreement between the nodes in the network or if it is only temporary until the next block.
What is the consensus?
In a blockchain network, the consensus refers to the process by which the knots agree on the blockchain status. This means that, once a node checks certain conditions, such as validation of transactions and data consistency, it transmits its results back to the network. The welcoming knots then work together to update their blockchain copies, ensuring that everyone has an identical copy of the current state.
Ethereum’s consensus mechanism
Ethereum uses the proof of work (POW), a consensus algorithm developed by Vitalik Buterin. In the POW, the nodes compete to solve complex mathematical puzzles, which require significant calculation power. The first knot that has solved the puzzle wins the right to validate transactions and create new blocks.
Scenario: Two Competition Blockchain Tips
Let’s imagine two competing blockchain tips, each starting from the block of a parent block. The two tips are:
- Tip 1: “Block B is the correct state of things.”
- Tip 2: “Block C is the correct state of things.”
Both blocks start from block A and are diverting into different branches, both nodes agreeing with the respective versions of reality.
The first few blocks
In the first few blocks, we do not know what advice is correct. The nodes still work to check the transactions and data consistency, but no knot has yet reached a consensus. In fact, it is possible for a knot to be in a state in which he believes that block B or block is valid, while another node considers the opposite.
The following block: A point of agreement
When we reach block D (say), both knots have reached a point where I agree with the Blockchain status. They have checked all the transactions and consistency of the data, and now they can update their blockchain copies to reflect this agreement.
However, at this moment, it is still possible for another block to come and challenge the current consensus. If such a block were broadcast, the knots should check their validity before accepting it as part of the blockchain.
The following a few blocks: an additional division
After Block E (again, say), both knots again reach a point where I agree with the Blockchain status. But now, there is another branch that deviates from their agreement. In this case, the next block is:
- Tip 1: “Block F is the correct state of things.”
- Tip 2: “Block G is the correct state of things.”
Again, both nodes have reached a point where I agree with Blockchain status. However, it is now possible for another block to come and challenge this new consensus.
The following a few blocks: an additional division
After block H (again) we see another divergence:
- Tip 1: “Block I is the correct state of things.”
- Tip 2: “Block J is the correct state of things.”
This process continues, each knot reaching an agreement on blockchain state in subsequent blocks. However, another block may come and challenge this new consensus.
Conclusion
In conclusion, while we have reached a point where both nodes agree on the blockchain status (block J), there is still no real consens of the next block. This is because each node has independently reached an agreement at different times in time and more blocks may be needed to converge.
This phenomenon is known as “blockchain fork”, where two or more competing versions of reality are diverted from a single point.