What is the Byzantine Fault Tolerance?

Blockchain is special because it is a technology that enables computers (nodes) on a peer-to-peer (P2P) network, also known as distributed system, to collaborate, agree on, and update states through a consensus process.

Before blockchain was implemented in 2009 through Bitcoin, the concept of nodes working together seamlessly on distributed systems was a computer science topic that had been widely explored.

Of particular interest to computer scientists, was the risk of a few nodes on a distributed system becoming rogue and impeding the distributed network from achieving its goals.

The most likely ways a rogue node might act in a distributed system include:

  • Not responding to queries from other nodes
  • Deliberately misleading other nodes
  • Providing inaccurate data to other nodes
  • Giving different results to different nodes

What is the Byzantine Fault Tolerance (BFT)?

The Byzantine Fault Tolerance (BFT) is a feature of a distributed system or P2P network that enables it to withstand the actions of rogue nodes or components. This feature is especially important in systems where the nodes are either not well known or fully trusted.

The BFT is any solution to the Byzantine Generals’ Problem.

The 'Byzantine Generals' problem

The Byzantine Generals’ Problem is a logical game theory first described in an academic paper published in 1982 by computer scientists Leslie Lamport, Robert Shostak, and Marshall Pease.

The problem is illustrated using an ancient world scenario of several generals attempting to conquer an enemy city. The generals must coordinate their actions if they are to be successful.  If a single army or a minority coalition of the armies attacks, it will likely be defeated. Therefore, all the generals, or at least the majority, must attack simultaneously.

However, a few challenges stand in the way of the generals forming a winning strategy, particularly deciding whether and when to attack after observing the enemy.

First, the communication among them is done through messengers who must pass through the enemy territory. That means messages sent could be intercepted and compromised.

Secondly, some of the generals might turn out to be traitors. That means they may pass messages to the other generals to mislead. For example, they might claim they agree to attack at a particular time of day while they plan to retreat instead.

The theoretical solution to this challenge is an algorithm that helps the loyal generals to arrive at the ideal final decision despite the risk of losing some messages and the activities of traitors.

Whatever working algorithm they develop is considered to have made the coalition Byzantine Fault Tolerance. In their paper, Leslie Lamport, Robert Shostak, and Marshall Pease acknowledge that it is difficult to develop such an algorithm.

Nevertheless, they conclude that an algorithm that solves the Byzantine Generals Problem has to include a mechanism that enables each general to send and receive messages from all the others. In addition, the mechanism needs to make it possible for each general to tally the replies they get from the others.

If less than a third of the generals are unreliable, the decision reached by most generals will often turn out to be the most appropriate to implement.

How Does It Come into Play with Blockchain Technology?

Fundamentally, blockchains are distributed systems in which independent nodes have to collaborate with others. Some of the nodes might often choose to act rogue, especially in architectures that allow anyone to join the network.

With the first Blockchain, the Bitcoin blockchain, Satoshi Nakamoto chose to use the Proof-of-Work (PoW) to overcome the Byzantine Generals’ Problem. This protocol forces nodes to spend energy, which makes them root for the system to work properly so that they can recoup their investment in rewards.

Other blockchains use other consensus protocols with other incentives. For example, Proof of Stake (PoS) requires nodes to show good faith by risking their own coins.

Some projects have chosen to use the version of the Byzantine Fault Tolerance suggested by Leslie Lamport, Robert Shostak, and Marshall Pease in their 1982 paper to overcome the Byzantine Generals Problem in the blockchain peer-to-peer networks.

Importance of BFT

Blockchain developers are always looking for the architectures that will make the technology most effective and efficient, especially in regard to transaction throughput and energy consumption.

Indeed, BFT offers an opportunity to build even better distributed computer systems.

Possible Solution to the Byzantine Fault Tolerance

The most discussed consensus algorithm based on BFT is the Practical Byzantine Fault Tolerance (pBFT) consensus mechanism.

Practical Byzantine Fault Tolerance (pBFT)?

This is a consensus mechanism where nodes on a peer-to-peer network basically vote for a transaction or state before it is added to the shared ledger.

The list of blockchains that use a variant of pBFT includes Solana, Stellar, Klaytn, Fantom, and Okexchain.

Use of Primary and Secondary Nodes

The process has four basic steps:

  1. A secondary node sends a proposal to change a state to a primary node
  2. The primary node sends the proposal to all the secondary nodes on the network.
  3. Each secondary node executes the change and sends a reply to the proposer.
  4. The proposer tallies the replies, and the majority decision is determined

The primary node is the leading node on the network and can be replaced through an election by the secondary nodes.

Benefits to Practical BFT as a Solution

The pBFT consensus protocol offers several benefits, especially compared to the other protocols used to overcome the Byzantine Generals Problem. They include:

Energy Efficiency

Nodes on a network that uses pBFT are not required to consume energy to help maintain a shared ledger or state. All they may have to do is propose or vote for a state change.

Quickly Approved Transactions

Distributed systems built using BFT have high throughput. They have the potential to process a large number of transactions per second (10,000+ transactions). In contrast, layer one infrastructure of the Bitcoin blockchain processes about seven, and that of Ethereum does about 15.

Drawbacks to Practical BFT

The BFT consensus protocols have their own challenges, though. They include the following:

Security Risks

Given that there is little resource at stake for a node, such as coins or energy expenditure, the network can easily be overwhelmed with the bad nodes. If more than a third of the nodes are corrupted, the entire system can be compromised.

Problems with Scalability

The nodes must communicate while forming a consensus on changes to a state. The more nodes are involved in the communication, the more time it takes to have a transaction concluded. This makes it difficult to scale.

Casper is a Leading Blockchain Consultant

The team behind the Casper project understands how consensus protocols affect the implementation of applications. The team has continued to amass knowledge and technical know-how in this area.

Implementing Blockchain Solutions for Businesses

Using this knowledge and technical know-how, Casper is prepared to help businesses make appropriate decisions as they embrace blockchain technology.

Contact Us Today for More Resources

Image courtesy of Pixabay.