Blockchain
August 30, 2018

Consensus Algorithms in Blockchain - Part 1

Bitcoin mining consumes as much power as Ireland. Where does that power go? The answer is quite silly: it’s basically solving mathematical riddles.

The energy is used by the consensus algorithm of Bitcoin – and this huge amount of electric power flowing through the nodes authorizes the blocks.

What is consensus algorithm in blockchain?

Consensus algorithm is a mechanism that validates the new blocks in the blockchain. It exists to protect transactions and prevent double spending.

There are various approaches to this problem. Here are some of them:

Proof of work (PoW)

Proof of work consensus algorithm means “classic mining” used in Bitcoin and Ethereum. The validator for blocks is sheer power (well, with a bit of probability) put into solving a cryptographic challenge.

It is basically a fence that protects the blockchain from attacks. If you want to exploit the blockchain, you have to generate equal power.

If you’ve seen cryptocurrency mining stations, you know what it means. A set of expensive graphics cards (getting even more expensive because of mining) combined with enormous power consumption, heated by solving mathematical mysteries. There are actually platforms that you can use as radiators at home – that’s how hot they get.

It’s expensive and ineffective. That’s why Proof of Work algorithm is slowly becoming obsolete, with new solutions rising on its way – for example, Ethereum is migrating to a proof of stake solution.

Proof of stake (PoS)

As the second most popular algorithm of consensus, it’s significantly more efficient. The miners do not have to solve useless crypto puzzles to prove their engagement – the stake (part of their tokens) they bet on the new block is enough to accept it.

The common issue is “nothing at stake” problem, meaning that in a pure PoS solution there’s no motivation to play fair during the voting process on forks. This fact can decrease the credibility of the ledgers.

There are few more weak points in this, but with a proper additional logic and rules, they can be reduced – such as in the case of new Casper algorithm in Ethereum. With a cleverly constructed PoS based blockchain, attacks are more expensive, while the algorithm saves a huge amount of energy.

August 30, 2018