The Role and Types of Consensus Mechanism in Blockchain

decorative line

How blockchain works!


If you are new to the field of information technology, taking our Introduction to Information Technology and its Career Roadmaps and Introduction to Cloud Technology with DevOps, Docker and Kubernetes (free self-paced) courses is highly recommended. Also, for a comprehensive coverage of blockchain concepts and its use cases, taking our Introduction to Blockchain Technology course is highly recommended.


In our previous article (How Digital Signature Works In Blockchain), we learned about the mechanism behind Digital Signatures and what role they play in a blockchain system.
In this article, we learn about the role and types of consensus algorithms that are widely used in the blockchain applications.


Anatomizing a blockchain consensus mechanism

A fundamental problem in large-scale distributed systems is how to achieve overall system reliability in the presence of failures. Systems need to be fault-tolerant. This requires a process for distributed, often heterogeneous systems to reach a consensus and agree on the network state, whether it is a database commit or an action to take. In this article, we will make an introduction to consensus algorithm in blockchain, followed by two separate articles covering two types of consensus algorithms, Proof-of-Work (PoW) and proof-of-stake(PoS) in depth.

What is consensus?

Consensus in a blockchain is the process by which a network of mutually distrusted nodes reaches an agreement on the global state of the chain of blocks. In blockchain, transactions or data are shared and distributed across the network. Every node has the same copy of the blockchain data. Consensus allows all of the network nodes to follow the same rules to validate transactions and add new blocks to the chain, and therefore allows it to maintain uniformity in all of the copies of a blockchain.
Sometimes, it is also called a consensus mechanism or consensus algorithm. A consensus mechanism focuses on the process and approach of how to reach an agreement. A consensus algorithm is a formal procedure or computer program for solving a consensus problem, based on conducting a sequence of specified actions. It is designed to achieve reliability in a network involving multiple nodes. Consensus algorithms ensure that the next block in a blockchain is fully validated and secured. Multiple kinds of consensus algorithms currently exist, each with different fundamental processes. Different blockchain platforms may implement different consensus mechanism. In this article, we will focus on the following two popular algorithms, show how they work, and discuss the pros and cons of each mechanism:

  • PoW: This consensus algorithm was introduced by Satoshi and commonly adopted by many other blockchains, including Ethereum. The PoW is the mining process with the purpose of finding an answer to a cryptographic hashing problem. To do so, the miner has to follow the block selection rules to locate the previous block and use the hash from the previous block header, together with the Merkle root of current transactions in the new block, to solve the hashing problem. It requires considerable computations and hashing power. In Bitcoin, block selection rules that specify the longest chain wins.
  • PoS: This consensus algorithm aims to select miners based on the various combinations of random selection based on the miners' wealth or age (the stake). Instead of miners competing to solve energy consuming cryptographic hash functions, the network will instead use a pool of validators. Validators are nodes that are willing to stake their cryptocurrency on the blocks of transactions that they claim should be added to the public blockchain.


Next Article

Congratulation! We now successfully finished our first article series. In our second article series, we gradually move on to Ethereum blockchain development by covering the following 9 articles:

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.


Free Webinars on Blockchain

Here is the list of our free webinars that are highly recommended:

Free Courses

Here is the list of our 10 free self-paced courses that are highly recommended:

Self-Paced Blockchain Courses

If you like to learn more about Hyperledger Fabric, Hyperledger Sawtooth, Ethereum or Corda, taking the following self-paced classes is highly recommended:

  1. Intro to Blockchain Technology
  2. Blockchain Management in Hyperledger for System Admins
  3. Hyperledger Fabric for Developers
  4. Intro to Blockchain Cybersecurity
  5. Learn Solidity Programming by Examples
  6. Introduction to Ethereum Blockchain Development
  7. Learn Blockchain Dev with Corda R3
  8. Intro to Hyperledger Sawtooth for System Admins

Live Blockchain Courses

If you want to master Hyperledger Fabric, Ethereum or Corda, taking the following live classes is highly recommended:


Articles and Tutorials on Blockchain Technology

If you like to learn more about blockchain technology and how it works, reading the following articles is highly recommended:

Articles and Tutorials on Ethereum and Solidity

If you like to learn more about blockchain development in Ethereum with Solidity, reading the following articles and tutorials is highly recommended:

Articles and Tutorials on Hyperledger Family

If you like to learn more about blockchain development with Hyperledger, reading the following articles and tutorials is highly recommended:

Articles and Tutorials on R3 Corda

If you like to learn more about blockchain development on Corda , reading the following articles and tutorials is highly recommended:

Articles and Tutorials on Other Blockchain Platforms

If you like to learn more about blockchain development in other platforms, reading the following articles and tutorials is highly recommended:

Private Custom Tutoring

decorative line

We offer private custom tutoring classes both online and in DC, MD and VA for almost all of our courses or bootcamps. Give us a call or email us to discuss your needs.

$90 Regular

$50 Limited Offer