Blockchains are powerful tools because they create honest systems that self-correct without the need for a third party to enforce the rules. Such an algorithm is based on the consensus mechanism. But, what is a consensus algorithm exactly, and how its work?
In this article, we will discuss the role of consensus protocols in blockchain technology and dive deeper into the concepts that govern it.
What is Consensus Algorithm ?
First, to understand the consensus algorithm, you need to know how a block adds to the blockchain.
Here’s what happens when someone creates a new block in the network:
- The new block sents to everyone (every node or user) in the network.
- Each node verifies the block and makes sure it hasn’t been tampered with.
- If everything checks out, each node adds this new block to his or her own blockchain.
All the nodes in this process create a consensus. This means that they agree about which block is valid and which one isn’t.
As mentioned in the introduction, a consensus algorithm is very important to create an honest atmosphere. Because the other nodes in the network can reject blocks that are tampered with.
Each blockchain has its own algorithms for creating agreement within its network on the entries being added.
There are many different models for creating consensus because each blockchain is creating different kinds of entries. Some blockchains are trading value, others are storing data, and others are securing systems and contracts.
Blockchain consensus types
In Blockchain networks, there are three main kinds of consensus algorithms for arriving at a consensus in a distributed manner. The following list gives you different types of blockchain consensus.
- Proof of Work (POW)
- Proof of Stake (POS)
- Practical Byzantine Fault Tolerance (PBFT).
Proof of Work (POW)
Proof of work is a form of consensus in which one party proves to others that a certain amount of a specific computational effort has been expended. Verifiers can subsequently confirm this expenditure with minimal effort on their part. To make a clear picture, Bitcoin operates under the assumption that a malicious attacker may want to corrupt the history of trades in order to steal tokens. Bitcoin prevents this from happening by using POW.
How POW as a consensus algorithm worked
At first, you must know that the purpose of POW is to discover the number that solves the problem. Finding this number by any user on the network (computer) should be difficult. At the same time the answer to the problem should be easy to confirm. In Bitcoin, the proof of work consensus algorithm is called “Hashcash”. It is an algorithm that miners can use to solve the problem, in order to build a new block.
The difficulty of the number is determined by the number of characters that are searched for a string. Thus, miners receive coins for their solutions in one transaction. Also, networks can easily approve their solution.
Proof of Stake (POS) As a Consensus Algorithm
Proof of stake protocol is a class of consensus mechanisms for blockchains that work by selecting validators in proportion to their quantity of holdings in the associated cryptocurrency. any node who wants to participate in transaction authentication and build a block can purchase the network’s original digital currency and allocate it to the network. The network also rewards creditors with the same digital currency based on their assets and how long the assets are locked.
Byzantine Fault Tolerance (PBFT)
PBFT is a way for a distributed network to reach the consensus set for the Blockchain even if some nodes are malicious. Blockchain is a distributed ledger technology and is managed by nodes participating in the network. These nodes perform network transactions based on consensus algorithms.
When part of the nodes have a technical problem or decide to subversion, Byzantine Fault Tolerance indicated the optimal performance of a network and its consensus.
In the Cryptostone ecosystem, you can use its crypto payment gateway on your website to provide an alternative payment method for your customers. With centralized exchange, you can trade easily and anonymously in a safe way and with the decentralized exchange, you can launch your exchange and trade in a fully decentralized and peer-to-peer way.
Also, decentralized Worldwide Stock Market is another platform in the Cryptostone project that is provided to facilitate fundraising events to customers, which makes the fundraising and investment process inclusive and accessible based on decentralized listing and delisting by blockchain consensus.
Reference: Blockchain for Dummies