Having consensus means being in agreement. Consensus protocols are the rules that allow the devices on a huge network of computers, spread around the world, to agree about what should be added to the database that is a blockchain. They are one of the most important parts of blockchain technology.
What is a protocol?
A protocol is a set of rules describing how the communication between electronic devices, such as nodes, should work. These rules need to be worked out before any data is sent, saying how the information will be structured and how each device will send or receive it.
Getting everyone to agree on anything is difficult, even if it is just how many cookies Jacob had after dinner, and that is between people who all live in the same home. Imagine how hard it is to make different computer systems around the world agree on what information is true and honest. Especially when there are some who are trying to trick the system on purpose. Making this happen is what consensus protocols do and why they are such an important part of blockchain.
Consensus protocols are the methods used to confirm information, like who sent money to whom, and add them to a blockchain. The special thing about consensus protocols is that they cannot be cheated.
Anyone can try to add information to a blockchain but making sure that the information is actually meant to be recorded and accepted is the challenge that consensus protocols solve. This is important as it actually allows blockchain technology to work, without the need for a centralized authority to make it happen.
The information recorded on a blockchain can take on any shape, it can be a transfer of money, ownership, a transaction, someone's identity, an agreement between two parties, or even how much electricity a lightbulb has used.
There are different consensus protocols and they have different ways of making sure nobody can they cheat them, but they are all created specially to be difficult to carry out or fake, in terms of time, computer power or how much of a cryptocurrency is needed to do so. Different consensus protocols use different ways of stopping people from trying to cheat them.
Below we will explain the three main consensus protocols and how they are designed to keep a blockchain functioning and honest.
Proof of Stake (PoS)
In a proof of stake system, the person who creates the next block is decided by how much of a certain cryptocurrency they are holding. The more a user holds the more likely they are to do so. There is also randomization involved to make sure that the richest holder is not always getting richer by validating blocks and collecting rewards.
The proof of stake here is everyone owning a token and wanting what is best for it because it affects them.
Delegated Proof of Stake (DPoS)
Delegated Proof of Stake uses a system of voting to decide who should be securing the network, so which nodes are validating blocks of transactions. The people holding that particular cryptocurrency will be able to make votes, each token usually being worth one vote. This system works well because it means that everyone holding the currency can choose who runs the network and those holding that cryptocurrency will want what is best for the network, as the value of the tokens that they hold depends on it.
Delegated Proof of Stake prevents the system from being cheated by giving the people who care most about the network, those who are holding the cryptocurrency tokens, the opportunity to vote for who should be securing the network and adding information to the database.
Proof of Work (PoW)
The “proof of work” comes in the form of an answer to a mathematical problem, one that needs a lot work to figure out, but can easily be seen to be right once the answer has been found. The only way to solve these mathematical riddles is through nodes on the network, presenting long and random answers. This means that the problem could be solved on first try, although this is impossible because of how complicated the questions are.
Consensus protocols are special because they allow unrelated devices to all come to an agreement with the need for centralised leadership to guide them. They also do this without there being a chance of the protocol being cheated, which is an incredible achievement and one of the most revolutionary aspects about blockchain technology.