Crypto 101: What the hell is a consensus protocol anyway?

Stop me if you’ve heard this one:

A blockchain is a distributed ledger spread across nodes. These nodes verify transactions on the network. This is one of the key ideas about any blockchain technology, and all of the weird, advanced stuff comes primarily from this idea. It’s also the source of decentralization for the blockchain, as none of these nodes possesses enough power to bring down the network. If someone one (or more likely more than one) of these nodes were to gain said power, it would likely be through a 51% attack, which generally happen in Proof-of-Work consensus protocol.  We’ll get to that later.

These nodes can possess any kind of information—your mother’s maiden name written in 359 different languages to nuclear launch codes to doctor’s records—the context in this case doesn’t matter.

Anyone can submit information to be stored on a blockchain and that’s why it’s important that there are processes in place to guarantee everyone agrees on what information should be added and discarded. These rules are called the consensus protocols. They verify transactions and keep the network, and the information stored on it, safe.

How do they work?

There are a handful of different types of consensus protocol, and honestly, it seems like they’re developing new ones for every coin they come out with, but for the sake of both brevity and sanity, we’ll come to principle three. These are the methods for verifying whether a transaction is true or not. It provides a confirmation of what data should be added to a blockchain’s record and a method to review it. By their very nature, blockchain networks lack a central authority dictating what information is correct, it’s done by consensus—essentially, everyone must agree on the state of the network using a pre-set rule structure put in place when the blockchain was launched.

For Bitcoin, consensus is reached through Proof-of-Work (PoW). And the other two protocols we’re going to cover here are Proof-of-Stake (PoS), and Proof-of-Authority (PoA).

Proof of Work (PoW)

You’ll find this commonly used Bitcoin and its derivatives, but for the sake of brevity, we’ll refer only to Bitcoin. Validating transactions on the Bitcoin blockchain involves “miners,” who act in capacity as the nodes, using computers to solve a mathematical problem of escalating complexity. Miners who solve a problem, close the block by validating it, and enable a block reward. They’re rewarded with the blockchain’s cryptocurrency, like high tech rats punching a lever for high tech valuable cheese. B.F. Skinner would be proud.

Proof-of-Stake (PoS)

Consensus Protocol

Instead of miners, PoS uses “forgers.” These forgers stake an amount of cryptocurrency which gives them a chance, based on probability, to close the next block and get the reward. Think of it like betting on an outcome, but with probability measures that are under your control. We’ll get into how in a moment. Staking your own cryptocurrency on a block includes a certain amount of risk as should you ‘lose’ the bet, you’ll risk losing your stake, because you’ll be seen as incorrectly adding transactions to the network.

Now some of the measures a forger can use to manipulate the outcome include how much you’re betting, and how long you’ve been holding the coins. Essentially, this method rewards those holding the most coins for the longest time more often than it rewards anyone else.

Naturally there are a handful of positives and negatives with PoS. The first positive is that it avoids the large operational cost associated with PoW mining, which has gone from a few GPU-aided computers in a room owned by one or two people who share the cost of the kilowatt hours, to big corporations and miles of server farms using specialized chipsets designed specifically for mining Bitcoin.

The detriments, of course, are that it’s difficult for new forgers to get involved without an already pre-existing set of coins, but the folks behind the technology have a few answers for that as well.

For example, Peercoin’s PoS system combines randomization with a concept called “coin age.” This is a number taken from the product of the total number of coins multiplied by the number of days the coins have been held. Except that coins that have been unspent for at least 30 days begin competing for the next block. Older and larger sets of coins enjoy a greater probability of closing the next block, but once the stake of coins has been used (by closing a block), it reverts back to coin age zero, and must wait for 30 more days before competing for a new block.

This ensures that the biggest forgers aren’t continually closing blocks, and centralizing the network.

Ethereum is gradually moving away from PoW to PoS.

Proof-of-Authority (PoA)

Proof-of-Authority consensus protocol involves predetermined block validators. New blocks are created when the validators are in majority. The protocol is somewhat similar to PoS in that individuals stake cryptocurrency for the opportunity to close the block, but instead of probability, who gets to close the block is directly chosen by validators.

The validators are publicly known and held accountable for determining their role and eligibility for PoS validation. Naturally, there are some serious logistical problems with this type of consensus protocol, as individual validators—being publicly known to everyone on the blockchain—hold a fair amount of power, and therefore, we have potential issues regarding nepotism and centralization. Reputation is a big deal with Proof-of-Authority validator positions, and the incentive is there not to cheat. We all know how that works out.

A newer blockchain, Elysian, uses PoA as well as some Ethereum testnets, or test blockchains.

—Joseph Morton

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: