Amber avatar
Coin98 Insights
Nơi chia sẻ tất cả những kiến thức Crypto từ cơ bản đến nâng cao, kinh nghiệm đầu tư Bitcoin và các hình thức đầu tư tiền điện tử khác.

What is BFT? How does BFT work?

Byzantine Fault, or Byzantine Generals’ problem, has been a widely debated topic in various fields like computer science or distributed systems. Let's find out more about BFT in this article.
Amber avatar
quangphan
5 min read
Published Sep 28 2021
Updated May 28 2024
byzantine fault tolerance

What is Byzantine Fault Tolerance (BFT)?

Byzantine Fault Tolerance is the ability how a distributed system or network can operate and reach a consensus (neutral agreement), considering some participants may fail to act or do so maliciously. Its name derives from a paradox called Byzantine Generals’ Problem, whereas Byzantine Fault Tolerance is the solution to the problem.

advertising

For the network to work correctly, even though some of its participants meet problems (intentionally or unintentionally), there have to be some common rules and conditions so that the functional participants can guarantee the network’s consensus.

What is the Byzantine Generals’ Problem?

Byzantine Generals’ Problem was first introduced in 1982 in a paper by a group of people at Microsoft Research. The problem was clearly described as follows:

“Imagine that several divisions of the Byzantine army are camped outside an enemy city, each division commanded by its own general. The generals can communicate with one another only by messenger. After observing the enemy, they must decide upon a common plan of action.

However, some of the generals may be traitors, trying to prevent the loyal generals from reaching an agreement. The generals must decide on when to attack the city, but they need a strong majority of their army to attack at the same time.

The generals must have an algorithm to guarantee that (a) all loyal generals decide upon the same plan of action and (b) a small number of traitors cannot cause the loyal generals to adopt a bad plan.

The loyal generals will all do what the algorithm says they should, but the traitors may do anything they wish. The algorithm must guarantee condition (a) regardless of what the traitors do. The loyal generals should not only reach agreement but should agree upon a reasonable plan.”

Byzantine Generals’ Problem, although similar to the Two Generals’ Problem (Two Generals’ Paradox), is a more general version. In a more complicated manner, the Byzantine Generals’ Problem can impose more variations. For example, the messengers can fail to deliver the message on the way or even deliberately change the original content.

What is BFT in Crypto?

In crypto, specifically blockchain technology, Byzantine Fault Tolerance plays an extremely important role. When we apply the Byzantine Generals’ Problem to crypto, the generals are the nodes. All nodes within a blockchain network have to communicate with each other and find a way to reach a consensus, which leads to methods that we call consensus algorithms.

There are numerous ways to achieve Byzantine Fault Tolerance. Therefore, there also exist various consensus algorithms in the blockchain space, each with its own solutions to the problem for optimal efficiency.

Bitcoin, with its Proof of Work consensus algorithm, is among the first to reach Byzantine Fault Tolerance in crypto. Since its introduction in 2008, Proof of Work has proved to be one of the most secure and reliable solutions to this problem, along with the success of Bitcoin.

How Proof of Work reaches Byzantine Fault Tolerance

How does Practical Byzantine Fault Tolerance work?

Practical Byzantine Fault Tolerance (pBFT) is a consensus algorithm introduced in the late 90s by Barbara Liskov and Miguel Castro with the goal of solving the existing problems of the already available Byzantine Fault Tolerance solutions.

In general, pBFT works by initially assigning 1 node as the primary (leader) node and others as the secondary (backup) node. Any node can become the primary should the current one fails to operate.

Additionally, a pBFT system can function when and only when the maximum number of malicious nodes must not be greater than or equal to one-third of all nodes within the system.

There are 4 phases of pBFT consensus rounds:

Request: The client sends a request to the primary (leader) node.
Pre-prepare: The primary (leader) node broadcasts the request to all the secondary (backup) nodes.
Prepare: The nodes (primary and secondary) perform the service requested.
Commit: The reply is sent to the client if it is valid.
how pbft works
How practical Byzantine Fault Tolerance (pBFT) works

Centralization and decentralization

As you can see, to reach Byzantine Fault Tolerance, each node (or participant) within the network has to communicate and cooperate with the other. There is no trustworthy information source for anyone to rely on. Therefore, only decentralized networks have to consider Byzantine Fault Tolerance.

On the other hand, for centralized networks, there are always one or more third parties who act as an intermediary between each participant, making communication and consensus much easier. Each participant does not have to trust the other anymore; they can simply deliver all the information to the intermediary.

byzantine fault tolerance
Byzantine Fault Tolerance in Centralization and Decentralization

FAQs about BFT in Crypto

Is Proof of Stake Byzantine Fault Tolerance?

As mentioned above, blockchain technology requires consensus algorithms to reach Byzantine Fault Tolerance. Being one of them, Proof of Stake can meet Byzantine Fault Tolerance requirements just like Proof of Work.

Is Tendermint BFT?

Tendermint, first introduced in 2014, is the first adaptation of the Proof-of-Stake consensus derived from the Practical Byzantine Fault Tolerant (PBFT) algorithm. Thus, it is considered a BFT Proof-of-Stake consensus algorithm.

Is Ethereum Byzantine Fault Tolerance?

Ethereum is currently using the Proof-of-Work consensus algorithm, similar to what Bitcoin uses. In the future, Ethereum will switch its network to Proof-of-Stake.

Either way, Ethereum is still able to meet Byzantine Fault Tolerance.

Conclusion

Byzantine Fault Tolerance is the ability how a distributed system or network can operate and reach a consensus (neutral agreement), considering some participants may fail to act or do so maliciously.

Its name derives from a paradox called Byzantine Generals’ Problem, whereas Byzantine Fault Tolerance is the solution to the problem.

In short, Byzantine Generals’ Problem refers to a problem when several generals want to attack a fortress and must decide as a group whether to attack or retreat. We have to find out how these generals can reach a consensus regardless of malicious acts or failed communication attempts.

When we apply the Byzantine Generals’ Problem to crypto, the generals are the nodes. All nodes within a blockchain network have to communicate with each other and find a way to reach a consensus, which leads to methods that we call consensus algorithms.

There are numerous ways to achieve Byzantine Fault Tolerance. Therefore, there also exist various consensus algorithms in the blockchain space, each with its own solutions to the problem for optimal efficiency.