What is a Blockchain Consensus Algorithm and How Does It Work? 

Company

GETBLOCK

June 7, 2022

12 分鐘閱讀

article cover

Did you know that the first-ever consensus algorithm called Paxos was created in 1989? Its initial goal was to enable a distributed network of computers to work continuously even under unpredictable unstable conditions. With the introduction of blockchain technology, consensus algorithms have been recognized on a larger scale. Simply put, a consensus algorithm is an agreement protocol implemented by a blockchain to verify all sorts of data.

An algorithm verifies newly added blocks of data, guarantees the legitimacy of the block, and is agreed upon by all members (nodes) of the decentralized network. In this article, we will focus on a few of the most popular algorithms, discuss their working principles, and give some examples of where and how they are used.

What is a blockchain?

A distributed decentralized network is called a blockchain. The main features of a blockchain include privacy, full transparency, and the absence of a central authority. Thanks to a consensus algorithm, it is possible to validate each transaction that runs on a blockchain and make it secure.

Blockchains work with immense volumes of transactional data, therefore they have to protect users from possible malfunctions and attacks. This is exactly when an algorithm comes into play.

Consensus Algorithms, Basics: Proof-of-Work and Proof-of-Stake
Essentially, a consensus algorithm is a common agreement made by peers. Let’s take a look at some real-life examples.

Proof-of-Work

The idea of Proof-of-Work was initiated in an article written by Cynthia Dwork and Moni Naor in 1993. The term was reintroduced by Satoshi Nakamoto in the whitepaper for Bitcoin - the first-ever known cryptocurrency.

Proof-of-Work relies on validators (nodes) solving cryptographic mathematical problems to find the right hash number beginning with zero bits in order to generate a new block of verified transactional data and add it to the chain. In a PoW system, it is known as the Hash function. In other words, the PoW in Bitcoin enables the ability to “mine” BTC. Sometimes users work together in the so-called mining pools.

The Hash function originated from Adam Back’s concept of Hashcash, proposed in 1997. Originally, Back’s PoW system was used to limit spam emails and DDos attacks. Some analysts believe that Adam Back could be Satoshi Nakomoto, due to how similar the Hashcash system and Bitcoin code are. Another example of PoW, which is probably the most common one, is Captcha - a type of proof-of-human-work security measure that uses cryptographic methods to differentiate between real humans and computers.

Proof-of-Work requires a lot of computational power, therefore to make the process more efficient it is performed by fast and strong machines. Along with that, however, come massive environmental concerns, such as large energy emissions. The outdatedness of the PoW algorithm has been heavily criticized by experts.

Proof-of-Stake

article image

Source: SEBA Research

Created as an alternative to PoW in 2011, in Proof-of-Stake users validate nodes by staking tokens. Stakeholders place a bet on a block that they think could be added to the chain. The stakeholder with the largest amount of tokens has more chances of being selected as the generator of the new block. In the case of an attempted malicious act, tokens get destroyed.

PoS is a highly scalable, low-cost and low-energy consuming protocol. This made some blockchains’ developers rethink their initial choice of a consensus algorithm. For example, the second-biggest cryptocurrency, Ethereum, announced that it is working on transitioning from PoW to PoS.

Compared to PoW, PoS blockchains have a much higher throughput. New technological solutions are being developed using the PoS algorithm, e.g. layer 2 solution. Polkadot, Avalanche, and Cardano are some of the PoS-based blockchains.

Delegated Proof-of-Stake

article image

Source: Level Up Coding by gitconnected.com

First introduced by Daniel Larimer in 2014, DPoS is different from the traditional PoS in the sense that it elects delegates as representatives in the voting system, instead of independent nodes. Some experts call it a “democratic alternative to Proof-of-Stake”. DPoS has enhanced features, such as faster transaction time, quicker verification, etc. Recently, blockchains like EOS, Tron, and Cosmos have adopted the Delegated version of the algorithm.

Consensus Algorithms You May Have Never Heard Of

Proof-of-Authority

Proof-of-Authority, conceptualized by Gavin Wood in 2017, relies on the trusted parties’ reputation in a blockchain. Blockchain example: VeChain.

Proof-of-Burn

First proposed by Ian Stewart in 2012, Proof-of-Burn is based on “burning”, or destroying, tokens. The more tokens a user burns, the more power he or she is granted when writing new blocks. Blockchain example: Slimcoin.

Proof-of-History

The protocol developed by the Solana blockchain allows users to verify the passage of time by using a cryptographically secure function.

Conclusion

As there are more types of consensus algorithms being developed, some are more effective than others. However, all algorithms essentially have the same goal: to verify and validate information on a blockchain - a feature of key importance to any decentralized system.

GetBlock, a top-tier nodes provider for over 40 networks, can help clients run a node on any of the blockchains. With GetBlock’s SaaS solution, users get access to end-to-end services tailored to their needs.

Company

GETBLOCK

June 7, 2022

12 分鐘閱讀

twittertwittertelegramtelegramLinkedinLinkedin