Blockchain Basics: The Consensus Algorithm
The Consensus Algorithm
The next topic we want to focus on is very important to have an organization in a decentralized network (like a blockchain) in order for it to work properly. This is called the consensus algorithm.
However, before we focus on the details of the consensus algorithm, let us first examine examples that are more familiar to us from our daily lives. Let's learn how decisions and agreements are made in a centralized world.
Private Company
Let’s say you are a chef in a restaurant owned by your family.
You do your job well and well every day. But there was a problem with a meal and it was returned to you by an unhappy customer asking for a replacement. As a chef, you can do one of the following to resolve the issue:
Prepare a replacement dish (if the problem is clearly the fault of the kitchen staff).
Consult a sous-chef (if there is any ambiguity).
Consult the executive chef (if there is any ambiguity).
Consult with the owner (if the dispute is large).
Now you get the idea.
In any situation as described above, there is usually an established hierarchy in a private company. And ultimately, the restaurant owner has the final say on how to deal with a situation.
This does not mean that making a decision unilaterally or as a team would be right or wrong, but the example above illustrates how people can get consensus at a private diner.
Public Company
Now, let's say you are an IC designer for a multinational semiconductor corporation.
To illustrate, let’s say you’ve been working with this company for the past six months for an important design project that will soon be released on the market.
However, your manager (regional director) informs you that there are inaccuracies from your previous project (i.e., the customer rejected some parts of your project) that you worked on last year.
Now, your manager wants to correct these mistakes. He wants you to focus again — your whole energy and time to root out the failures of your previous project. For your manager, this is your most important client. A customer who can not be lost in your company.
It is only natural that you should obey this command. So you postpone your current project first to focus on fixing the failures of your previous project.
You are in the middle of work when the vice president of your overseas company suddenly calls you. He is in charge of the overall design of your product line. For him, your current project is more important so you need to go back and postpone your manager's orders as soon as possible!
You have never seen your vice president in person. But you know who this person is, and you realize that this individual is more powerful than your manager and more importantly obeys his command.
You know what you have to do.
Even if the manager does not agree with the vice president's decision, he can do nothing. In this case, we can say that there is a re-heirarchy that will help to finally reach consensus.
Money as an Incentive (The Money Incentive)
In a centralized office, we realize what our role really is and who the people who are beyond us are. Additionally, we assume that all employees in a company have whatever their manager wants.
Why is that?
For beginners, there is clearly an incentive for employees to work well. This is the money.
Aside from the fact that money motivates us to do our job well, we also have a reputation within the company we care for.
Decentralized Network (Blockchain)
Now, let’s discuss the set-up of things when it comes to distributed and decentralized networks where, policies are slightly different in the centralized world we are all accustomed to.
As a refresher, let us remember that in a decentralized environment, as in the case of the blockchain, we still try to do things as smoothly (and correctly) as possible while accepting a new reality that anyone can already be a active participant.
There are no longer any barriers (or screenings) to those who want to enter (with their own set of pros and cons).
The decentralized network also tries to trust people we do not personally know.
A “trustless system” means that participants in a network do not have to know or trust each other for the system to work. In a "trustless system", no single entity has authority in the system and consensus can be achieved without the participants having to know and trust each other. They just have to depend on the system itself.
Thus, in order to keep a blockchain network like Bitcoin in working seamlessly, participants must agree on events (e.g., transactions from point A to point B).
Consensus needs to be reached.
Without it, the network will not be safe and will always be subject to: manipulation, attacks, fraud, etc.