Consensus algorithms are one of the core components of any distributed blockchain network, which play a critical role in reconciling the permission-less nature of an open system.
Designed to achieve ‘Byzantine Fault Tolerance,’ consensus algorithms vary between different blockchain protocols depending on the network’s design considerations.
Bitcoin’s PoW consensus (i.e. Nakamoto Consensus) was the first digital currency consensus to overcome the ‘Byzantine Generals Problem,’ ushering in an era of decentralized value transfer, storage, and computation. Coinciding with the progress of the broader cryptocurrency ecosystem, a suite of new consensus protocols have emerged at the edge of innovation in the field of distributed computing.
While they all strive for Byzantine fault tolerance (BFT), consensus protocols vary in many, sometimes significant, ways, including centralization, security, and liveness. So, it’s worth taking a look at some of the emerging consensus algorithms and their roles in the blossoming fields of cryptocurrencies, blockchains, and distributed computing.
When evaluating consensus algorithms, it’s important to note the principal trade-offs which are made come in the form of safety and liveness. BFT algorithms cannot guarantee both, and a degree of sacrifice in either safety or liveness of the algorithm is expected.
Albatross is the consensus algorithm of Katallassos, a blockchain network for deploying and running open financial products (i.e. DeFi). Consensus algorithms are adjusted to fit the needs of the broader network, so the primary requirement of Albatross is that it has a high-performance structure to support an ecosystem of financial applications, aligned with centralized back-end applications.
Built by Trinkler Software AG, and led by Reto Trinkler, Albatross relies on the ‘never trust’ doctrine of pessimistic BFT algorithms. Pessimistic BFT algorithms are conservative in their security design, often at the expense of performance. However, Albatross draws inspiration from numerous BFT algorithms to create a hybrid algorithm which can surge in performance capacity during ‘optimistic’ cases.
Using a dual macro/micro block system with a validator set similar to proof-of-stake (PoS) blockchains along with the BLS signature scheme, Albatross consensus discerns whether or not to switch gears between the pessimistic and optimistic states. If there are no delays or invalid blocks in the consensus process, the algorithm kicks into high-gear, reaching near theoretical PoS single-chain performance levels.
As a result, Albatross can maintain security conservatively, but when necessary, function with the performance needed to support an open framework of financial applications.
Released anonymously via IPFS under the pseudonym ‘Team Rocket’ in the ‘Snowflake to Avalanche’ white paper. Avalanche is actually a set of four protocols to be used in varying circumstances and has been met with both intrigue and criticism. The four protocols form a larger set of consensus and include:
The protocols are based on ‘leaderless’ Byzantine fault tolerance, which varies from most cryptocurrency consensus mechanisms. For example, the leader in practical BFT (pBFT) is selected per block round in a round-robin style format. In Bitcoin’s PoW, the leader is chosen via Nakamoto Consensus, the mining competition for the next block in a lottery-like format to find the nonce which is below a certain threshold. The leader is the block winner which propagates the block and wins the reward.
Avalanche takes an alternative approach, citing in the paper:
“Inspired by gossip algorithms, this new family gains its safety through a deliberately metastable mechanism. Specifically, the system operates by repeatedly sampling the network at random, and steering the correct nodes towards the same outcome.”
Avalanche is another set of protocols that takes the ‘more green’ approach to consensus, detailing that Nakamoto Consensus is wasteful — which is a polarizing topic.
At a high level, Avalanche’s unique implementation of gossip protocols is what sets it apart from other consensus algorithms. The primary way it works is, random subsets of nodes are selected to make a decision (e.g. the state of the network). Each subset of nodes returns their decision independently from other subsets, and the consensus is achieved by uncovering which direction the BFT-compatible threshold of nodes lean towards in support of a specific state.
Gossip protocols propagate messages to other nodes very rapidly. Using such a design, Avalanche can guarantee liveness for correct clients, but can only provide a strong guarantee of safety; such is the trade-off that all consensus algorithms make in one form or another.
Wavelet enables a more powerful version of Avalanche (brought about by Perlin), making it an optimal selection for liquid markets of computing power.
Rather than a conventional blockchain, Wavelet is a directed acyclic graph (DAG), similar to what is employed in IOTA. However, Wavelet leverages a version of Avalanche that integrates PoS to achieve a high-performance network.
Perlin is focused on providing the infrastructure for the ‘Digital Economy,’ which requires an underlying compute layer which can horizontally scale parallel computations. Wavelet is subsequently the DAG ledger, optimized Avalanche consensus algorithm, and the high-performance compute layer built on top of it.
Perlin was explicitly designed to not implement Turing-complete functionality for smart contracts, and instead is for developers to run smart contracts compiled into WebAssembly. As such, Wavelet’s primary role is to bring finality of consensus into off-chain systems rather than facilitating computationally-heavy on-chain contract processing.
In particular, Perlin targets a decentralized cloud computing marketplace where performance isn’t limited by the underlying technical components of hardware (i.e., CPU of smartphones). Wavelet enables a more powerful version of Avalanche, making it an optimal selection for liquid markets of computing power.
Proof of Distance
With the interoperability of blockchains one of the prevailing topics in the broader industry right now, producing consensus algorithms, which are compatible with interlinked blockchains, is critical. Most interoperability blockchains (e.g. Cosmos) rely on PoS-based consensus algorithms, due to their fast finality and ability to reconcile differences between other fast finality algorithms relatively easily.
However, PoS is not proven over the long-term yet and presents several security vulnerabilities that require complex workarounds.
Block Collider is an interchain framework for blockchains that selected not to sacrifice the hardened history of PoW for PoS. As a result, Block Collider created a proprietary consensus algorithm called ‘Proof-of-Distance’ (PoD), which preserves the unforgeable costliness of PoW mining.
Essentially, PoD changes the computational challenge of Nakamoto Consensus by changing the difficulty to a ‘string edit distance.’ The longest chain has the most work — same as Nakamoto Consensus — but PoD filters the hashes used to solve the PoW nonce value based on a threshold that correlates to a precise distance set.
Block Collider uses ‘Emblems’ to achieve this, which function as a new incentive for miners to rank transactions by ‘distance sets’ rather than fees — also enabling dynamic block sizes. The result is that PoD is agnostic to the mining algorithm of a participating blockchain in the network, and it can even adjust to variable block rates such as shorter block times for Ethereum block arrivals compared to Bitcoin.
An advantage that Block Collider maintains over other interchain protocols is that it retains the immutability and security of PoW compared to fast finality PoS networks. However, PoD requires a more technical process for integrating new blockchains into the ecosystem, something which PoS interchain frameworks have an easier time doing.
SpaceMesh is a blockchain protocol underscored by the ‘Dolev Strong’ consensus algorithm. Spacemesh is primarily designed as a decentralized computer for consumer desktops which circumvents the high energy requirements of PoW.
According to the SpaceMesh GitHub page:
“This protocol guarantees a message to be passed to all nodes at the end of t round – each round is a timeslot where nodes can send messages to each other. At the end of t rounds, given that there are less than t faulty adversary nodes, a correct message is passed along between all nodes in the current layer.”
The Dolev Strong protocol consequently functions as a conservative consensus mechanism — it has a TPS of only 90 — which places a strong emphasis on safety.
The ‘overwhelming confidence probability’ of transaction finality takes roughly 7.5 minutes and follows general pBFT security assumptions that no more than one-third of nodes can be malicious at any given instance for the network to come to a consensus on a canonical history of transactions.
Advances in BFT consensus are reaching a golden age as blockchains, and other distributed ledger technology (e.g. DAGs) continue to progress further. Consensus algorithms are often at the core of the security and performance of a distributed computing network, and they all come with their inherent trade-offs.
Whether they strive to provide the infrastructure for a new generation of financial applications or preserve the highest level of security for a high-value transfer medium, consensus algorithms are a unique yet often convoluted proposition in the world of cryptocurrencies and blockchains.