Reaching a Consensus on the Edge

Consensus Algorithms, Challenges & Perspectives for Adoption on the Edge

Omid Mogharian
NATIX
5 min readApr 20, 2020

--

As mentioned in the previous article, building an Edge Computing Network (ECN) requires a trust-enabling solution such as a distributed ledger. This enables the network to self-govern and manage the contracts between nodes to exchange computation power, storage, and deploy applications in an open ecosystem.

Building an open system can bring various advantages as it enables the inclusion of individuals in a larger ecosystem. However, this means that the participants will access the system to add arbitrary information and perform certain actions. A bad actor can add false information into the ledger to serve his wrongful purpose. This shows the necessity of a mechanism to assure the correctness of common information.

Photo by Simone Hutsch on Unsplash

In a P2P network, this will be achieved by a consensus algorithm by the loyal, or non-faulty nodes, reaching unanimous agreement on their decision despite the potential presence of Byzantine adversaries. Byzantine Fault Tolerance (BFT) is the characteristic that defines a system tolerating the class of failures that belong to the Byzantine nodes. BFT assumes that the act of repeating the information rules out the issue of faulty/cheating nodes as long as the number of traitors does not exceed the majority.

Consensus methods are commonly adopted by distributed ledger technologies to invalidate and ignore such attempts of false information. Essentially, a consensus method is employed to allow all actors in the network to come to an agreement on what the true information is. This is done by the majority of the network agreeing on the information presented. There are different approaches taken by different consensus protocols in order to achieve a secure and efficient consensus while negating the Byzantine Generals Problem (BGP).

The big breakthrough with Bitcoin and blockchain was the use of Proof-of-Work as a probabilistic solution to the BGP which ends up with a one-dimensional cryptographically linked chain. In fact, similar technologies power Ethereum, Monero, and EOS. These are based on a comprised set of game-theoretic solutions that utilize staking mechanisms, or computational complexity-driven solutions based on cryptographic mechanisms. In this article, we review the most well-known consensus algorithms and try to describe an Edge-supporting Distributed Ledger.

Proof-of-work (PoW)

Proof-of-work (PoW) resilience is built upon the fact that its consensus confidence threshold is determined by the amount of computing power designated within the network. Malicious actors need to dedicate more than 51% of a network’s total computing resources worth of computing power to manipulate the network. Given that is the only way to attack the process in which consensus is reached, proof-of-work is widely adopted into a wide-range of DLT’s projects.

However, the computational complexity which secures the notion of proof-of-work remains a burden due to the amount of processing power, or electricity, that must be wasted for the sake of empowering such a consensus mechanism in a decentralized system. This won’t be practical in Edge Computing as edge devices are typically not equipped with large computational power and have power constraints. Considering such limitations, the computational capacity of these devices should be utilized optimally with purposeful tasks.

Proof-of-Stake (PoS)

Proof-of-Stake (PoS) is another consensus algorithm that works in a different way which is more energy-efficient. There are two types of widely known PoS, namely Delegated Proof Of Stake (dPoS) and Leasing Proof Of Stake (LPoS). dPoS allows participants to vote for a delegate that will maintain the integrity of the system. LPoS is similar but allows for participants to lease out their tokens in order to share the reward for verifying a block. As much as they look promising in the process, they can lead to new problems such as denial-of-service (DoS) attacks, eventual centralization, and a multitude of other issues.

Directed Acyclic Graph (DAG)

Others have been on the work to use different Distributed Ledgers to achieve higher scalability. Many directed acyclic graphs (DAG)-based solutions such as Tangel, Hashgraph, Fantom, and Spectre reach consensus by weighing the confidence levels based on the propagation level of a specific set of information.

​A DAG is simply a non-circular graph of nodes connected to each other in a fixed direction. Because of the free selection of next nodes and rapid convergence property on the DAG structure, the new information can reach every node in the network in a faster asynchronous manner. The outcome is a lightweight, energy-efficient, and microtransaction-enabled consensus mechanism: a dream for edge computing and IoT use-cases.

Looking closely at some of these approaches, due to the extremely high number of branches, the uniqueness in the chain is no longer trivially provable. This means, on the topic of delivery of messages, the integrity of the DAG is not guaranteed within a certain bound. This is what defines these types of solutions to be non-deterministic. Moreover, other scaling dimensions, such as on-chain data sharding is not yet clearly addressed.

Byzantine Fault Tolerance (PBGP & FBGP)

Lastly, there are two major spinoffs of the original BGP solution. The first is the Practical Byzantine Fault Tolerance that is used by Hyperledger Fabric. It uses less than 20 pre-selected validators to determine consensus for the network. The second is the Federated Byzantine Agreement that is employed by Stellar and Ripple. It selects a leader node for each chain and calls for each leader to establish the truth for their respective chains.

Although they offer high throughput and better network scalability, these approaches tend to be seen as more centralized and a better fit to permissioned P2P networks than the execution of world-scale IoT applications.

Considering that there is no silver bullet, to find a fit solution for Edge, a practical balance of the above-mentioned aspects of a consensus algorithm is required. An Edge-supporting Distributed Ledger should benefit from consensus algorithms with the following characteristics:

  • High-throughput rates
  • Smart data pruning and sharding for minimal disk storage
  • A hardened security model in the presence of Byzantine adversaries
  • Decentralized governance at scale enabling truly decentralized applications

To turn these requirements into a working component of ECNs, a series of research has to be conducted to better evaluate the consensus algorithms. As a result, the best match or an optimal combination of the existing DLTs that can serve ECNs should be discovered. For one, LeaderLess Byzantine Fault Tolerance methods such as Avalanche and Aleph are rather new and less used consensus algorithms that worth further explorations.

DISCLAIMER: This post only reflects the author’s personal opinion, not any other organization’s. This is not official advice. The author is not responsible for any decisions that readers choose to make.

--

--

Omid Mogharian
NATIX

CTO & Co-Founder @NATIX - Software enthusiast, Passionate about life.