i

Blockchain Complete Guide  

Consensus Algorithms

A consensus algorithm is an algorithm in computer science which is used to achieve agreement among distributed processes or systems.
Like Google implemented a distributed lock service library called Chubby.

There are many methods used for reaching a consensus among nodes in a Blockchain Network.

e.g. Bitcoin and Ethereum use Proof of Work consensus mechanism.

1. Proof of Work

2. Proof of Stake

3. Byzantine Fault Tolerance System

4. Delegated Byzantine Fault Tolerance

5. Proof of Burn

Proof of Work

As nodes spend computing power to solve a mathematical puzzle (finding a hash that works) and gets to add a block to the blockchain. The miner who adds the block to the blockchain is awarded Bitcoins.
Proof of Work consumes Electricity as a resource.

It does two things:

1. It ensures that the next block in the blockchain is one and only version of the truth.

2. It keeps a powerful node from derailing the system and successfully forking the chain.

Advantages:

1. Very difficult to attack as an attacker need 51% computation power to make changes to the network.

However, it comes with some disadvantages:

2. A lot of Electricity consumption as that's the resource that is utilized to prove that the work has been done and the miner is not fraudulent.

3. Slow Algorithm

4. POW algorithm takes around 10 mins. for block creation. So, Transactions throughput is less.

5. Low Scalability.

Used by: Bitcoin, Litecoin, Dogecoin etc.

Proof of Stake

POS doesn't have Miners, rather validators who stake their coins on blocks they think are valid. No mining takes place. All coins exist from day one.

Advantages over POW:

1. Energy efficient

2. More decentralized case of a fork, Validators bet on which fork to support, if they support the wrong fork would lose their money.

3. Need majority of entire coin supply to attack.

Disadvantages:

1. Nothing at stake

2. Forking might become frequent.

Used by: Nextcoin, Ethereum Casper, Cardano etc.