The consensus mechanism in blockchain


A consensus mechanism is used in blockchain systems to achieve the necessary agreement among distributed systems or participants on a single data value or a single state of the network. Let’s understand how in general agreements are made in the real-world.

Rule of the majority

Consider a group of people working on finalizing the strategy for the company. They have several options and to decide on the best choice, everyone would vote on the best strategy by say raising their hands. It’s hard to manipulate the vote or maybe you as facilitator miscounted.

In such a process decision are made by selected-few people or a leader in the group. This represents a centralized system. Moreover, since votes are not anonymous – everyone knows who voted for what, there are high chances that votes of individuals are influenced by others.

So, how do we achieve fair voting? A system which has the following features:
– Participation by a vast majority and not the opinion of a common group
– Votes are kept anonymous

Consensus mechanism by using online voting app

Let’s say Mayor ask for public opinion to change the city ordinance which currently allows firework use until 11:00 PM. Instead, the Mayor wants to limit the fireworks use until 9:00 PM due to environmental concerns.

The Mayor opens-up an online voting system. Suppose the eligible count of residents who can cast the vote is 100,000. If the option to limit firework wins by the majority, it could negatively impact firework sales and the company’s revenue.

In such a process, companies or individuals fearing the result will try to manipulate the outcome. It will be too easy for someone to create thousands of fake accounts or use virtual IPs to cast the vote or hack the system to further their motives.

So how do we achieve fairness in the system?

By making the voting process difficult or time-consuming and costly. That’s where Proof-Of-Work used in Bitcoin steps in as a consensus mechanism.

Before Bitcoin, there were lots of iterations on distributed systems that failed because they were unable to answer the biggest problem when it came to reaching a consensus. This problem is called the “Byzantine Generals Problem”. More about Byzantine Generals Problem, here.

Proof-Of-Work uses computing power to determine the majority decision. In order to show their support, participants have to solve a Cryptographic puzzle which results in expending energy. The only way someone could manipulate the “votes” is by having a lot of computation power. Achieving this will cost them a lot on initial hardware costs and ongoing electricity costs.

  • August 24, 2018