×

iFour Logo

Blockchain Consensus Algorithm: Proof of Stake Vs. Proof of Work

iFour Team - April 04, 2019

Listening is fun too.

Straighten your back and cherish with coffee - PLAY !

  • play
  • pause
  • pause
Blockchain Consensus Algorithm

There are so many innovative technologies that made a vibrating impact in the digital world and Blockchain is being one of them. It is of no surprise that Blockchain has gained a spectacular traction in the market and impelled many blockchain software development companies to adopt in the development process. In this blog, we are going to discuss about Blockchain Consensus Algorithm: Proof of Stake Vs Proof of Work.

Table of Content


A consensus algorithm is a process used to achieve agreement on a single data which are designed for creating reliability in a network involving multiple nodes. In view of many Blockchain Consulting companies, it is a helpful algorithm for solving the issues in distributed computing and Multi-agent systems.

There are multiple kinds of consensus algorithms in Blockchain Technology which currently exists. Let’s know the difference between two of them Proof of Stake and Proof of Work.

Proof of Stake (PoS):


Proof of Stake (PoS) is a mining algorithm that is based on the stake of the miner in the given ecosystem unlike arithmetic difficult puzzle in Proof of Work (PoW). That means, who writes the next block is decided based on how large the stake of a person / miner holds (i.e. how many coins or tokens does it hold).

For example,

Miner 1 – stakes 50 coins (bitcoin or any other)

Miner 2 – stakes 25 coins

Miner 3 – stakes 10 coins

Miner 4 – stakes 75 coins

Miner 4 would be given the opportunity to write and validate the next block. Miner 4 receives transaction fees unlike block reward in Proof of Work (PoW).

Advantages:


This does not require high computing power to reach a consensus and thus energy saving is very high and thus the solutions are energy efficient.

Proof of Work (PoW):


Proof of Work is a consensus algorithm that decides which node writes the new block from the given network. Proof of Work is followed by Bitcoin and Ethereum both with minor variation. With PoW, each minor or node competes with each other and gets rewarded at the end. Each node/miner is given a common mathematical puzzle or function to solve. The mathematical puzzle is normally complex and takes time to solve the same. Whichever miner solves the puzzle, gets an opportunity to write the new block to the chain.

Blockchain Consensus Algorithm

A Mathematical puzzle is normally a puzzle that requires a lot of computational energy to solve the same. The answer to the PoW problem or mathematical equation is called a hash . Let us understand in the above diagram.

We have a set of new transactions to add to chain. In the current system, we have three nodes (miner) – A, B, and C. Network server sends mathematical puzzle to all three. The mathematical puzzle is solved by all three miners and the response is sent to Network server. Network server finds that miner B has solved the puzzle correctly and thus Miner B writes and confirms the transaction entry to the chain.

One Stop Solution for Blockchain Development - Enquire Today

Example of mathematical problem:


Find a number n such that its hash value of n appended to X gives a HASH that starts with 0.

X = “block”;

Hash(X) = Hash(block) = 496aca80e4d8f29fb8e8cd816c3afb48d3f103970b3a2ee1600c08ca67326dee

Hash(X1) = Hash(block1) = 9a59c5f8229aab55e9f855173ef94485aab8497eea0588f365c871d6d0561722

Hash(X2) = Hash(block2) = 6d0b07ee773591f2a1b492d3ca65afdefc90e1cadfcc542a74048bb0ae7daa27

Hash(X4) = Hash(block4) = 215008ba416eb06b8cfd53814660a43255e4ccc8703080af501ea0eaf7b7fdea

Result n is 4. Miner sends 4 to Network server and the Network server validates the result. If correct, miner writers and confirms the block.

Few challenges of Proof of Work:


High energy consumption –

PoW requires hashing millions of values every minute to get the desired result. This consumes a lot of energy and power. Bitcoin miners use specific chips designed specifically for hashing. The current hash rate of bitcoin is around 20 hash per second i.e. Approximately 20 billion hashes per second.

 

Miner centralization –

Due to specific hardware requirements, most of the miners are currently based in China as it offers high-speed chips that are required for good mining.

Blockchain Consensus Algorithm: Proof of Stake Vs. Proof of Work There are so many innovative technologies that made a vibrating impact in the digital world and Blockchain is being one of them. It is of no surprise that Blockchain has gained a spectacular traction in the market and impelled many blockchain software development companies to adopt in the development process. In this blog, we are going to discuss about Blockchain Consensus Algorithm: Proof of Stake Vs Proof of Work. Table of Content 1. Proof of Stake (PoS) 2. Advantages 3. References 4. Proof of Work (PoW) 5. Example of mathematical problem 6. Few challenges of Proof of Work 6.1. High energy consumption 6.2. Miner centralization A consensus algorithm is a process used to achieve agreement on a single data which are designed for creating reliability in a network involving multiple nodes. In view of many Blockchain Consulting companies, it is a helpful algorithm for solving the issues in distributed computing and Multi-agent systems. There are multiple kinds of consensus algorithms in Blockchain Technology which currently exists. Let’s know the difference between two of them Proof of Stake and Proof of Work. Proof of Stake (PoS): Proof of Stake (PoS) is a mining algorithm that is based on the stake of the miner in the given ecosystem unlike arithmetic difficult puzzle in Proof of Work (PoW). That means, who writes the next block is decided based on how large the stake of a person / miner holds (i.e. how many coins or tokens does it hold). For example, Read More: What Is Consensus Mechanism In Blockchain System? Miner 1 – stakes 50 coins (bitcoin or any other) Miner 2 – stakes 25 coins Miner 3 – stakes 10 coins Miner 4 – stakes 75 coins Miner 4 would be given the opportunity to write and validate the next block. Miner 4 receives transaction fees unlike block reward in Proof of Work (PoW). Advantages: This does not require high computing power to reach a consensus and thus energy saving is very high and thus the solutions are energy efficient. References: https://www.coindesk.com/short-guide-blockchain-consensus-protocols/ Proof of Work (PoW): Proof of Work is a consensus algorithm that decides which node writes the new block from the given network. Proof of Work is followed by Bitcoin and Ethereum both with minor variation. With PoW, each minor or node competes with each other and gets rewarded at the end. Each node/miner is given a common mathematical puzzle or function to solve. The mathematical puzzle is normally complex and takes time to solve the same. Whichever miner solves the puzzle, gets an opportunity to write the new block to the chain. A Mathematical puzzle is normally a puzzle that requires a lot of computational energy to solve the same. The answer to the PoW problem or mathematical equation is called a hash . Let us understand in the above diagram. We have a set of new transactions to add to chain. In the current system, we have three nodes (miner) – A, B, and C. Network server sends mathematical puzzle to all three. The mathematical puzzle is solved by all three miners and the response is sent to Network server. Network server finds that miner B has solved the puzzle correctly and thus Miner B writes and confirms the transaction entry to the chain. One Stop Solution for Blockchain Development - Enquire Today See here Example of mathematical problem: Find a number n such that its hash value of n appended to X gives a HASH that starts with 0. X = “block”; Hash(X) = Hash(block) = 496aca80e4d8f29fb8e8cd816c3afb48d3f103970b3a2ee1600c08ca67326dee Hash(X1) = Hash(block1) = 9a59c5f8229aab55e9f855173ef94485aab8497eea0588f365c871d6d0561722 Hash(X2) = Hash(block2) = 6d0b07ee773591f2a1b492d3ca65afdefc90e1cadfcc542a74048bb0ae7daa27 Hash(X4) = Hash(block4) = 215008ba416eb06b8cfd53814660a43255e4ccc8703080af501ea0eaf7b7fdea Result n is 4. Miner sends 4 to Network server and the Network server validates the result. If correct, miner writers and confirms the block. Few challenges of Proof of Work: High energy consumption – PoW requires hashing millions of values every minute to get the desired result. This consumes a lot of energy and power. Bitcoin miners use specific chips designed specifically for hashing. The current hash rate of bitcoin is around 20 hash per second i.e. Approximately 20 billion hashes per second.   Miner centralization – Due to specific hardware requirements, most of the miners are currently based in China as it offers high-speed chips that are required for good mining.

Build Your Agile Team

Enter your e-mail address Please enter valid e-mail

Categories

Ensure your sustainable growth with our team

Talk to our experts
Sustainable
Sustainable
 

Blog Our insights

Power Apps vs Power Automate: When to Use What?
Power Apps vs Power Automate: When to Use What?

I often see people asking questions like “Is Power App the same as Power Automate?”. “Are they interchangeable or have their own purpose?”. We first need to clear up this confusion...

Azure DevOps Pipeline Deployment for Competitive Business: The Winning Formula
Azure DevOps Pipeline Deployment for Competitive Business: The Winning Formula

We always hear about how important it is to be competitive and stand out in the market. But as an entrepreneur, how would you truly set your business apart? Is there any way to do...

React 18 Vs React 19: Key Differences To Know For 2024
React 18 Vs React 19: Key Differences To Know For 2024

Ever wondered how a simple technology can spark a revolution in the IT business? Just look at React.js - a leading Front-end JS library released in 2013, has made it possible. Praised for its seamless features, React.js has altered the way of bespoke app development with its latest versions released periodically. React.js is known for building interactive user interfaces and has been evolving rapidly to meet the demands of modern web development. Thus, businesses lean to hire dedicated React.js developers for their projects. React.js 19 is the latest version released and people are loving its amazing features impelling them for its adoption.