Since the birth of Bitcoin as a peer-to-peer electronic cash system in 2008, many other digital currencies have gradually emerged, and each digital currency has its own specific mechanism. But almost all digital currencies have one thing in common, that is, blockchain as the core architecture.

In most cases, blockchains are designed to be decentralized electronic ledgers maintained by a distributed network of nodes. Therefore, blockchain systems can allow financial transactions to be fully transparent and reliable without intermediaries. Digital currencies are gradually replacing traditional bank payment systems that require high credibility.

As with most distributed computing systems, participants in a cryptocurrency network need to periodically discuss and agree on the current state of the blockchain, which is known as reaching consensus. However, reaching consensus in a distributed network in a secure and efficient manner is not an easy task.

So how does a distributed network of computer nodes agree on decisions when some nodes may be faulty or behave dishonestly? This is the root of the so-called Byzantine Generals Problem, which gave rise to the concept of Byzantine Fault Tolerance.


What is the Byzantine Generals Problem?

In simple terms, in 1982, the Byzantine Generals Problem was conceived as a logical dilemma that illustrates the communication problems a group of Byzantine generals can have when trying to agree on their next move.

The dilemma assumes that each general has his own army, each located in a different location around the city they intend to attack. The generals need to agree on whether to attack or retreat. As long as all the generals reach a consensus, that is, a coordinated decision to execute together, it does not matter whether they attack or retreat.

Therefore, we can consider the following conditions:

  • Each general must make a decision: attack or retreat (yes or no);

  • Once a decision is made, it cannot be changed;

  • All generals must agree on a unified decision and execute it simultaneously.


The communication problem mentioned above involves the fact that one general can only communicate with another general through messages sent by informants. Therefore, the core challenge of the Byzantine Generals' Problem is that messages may be delayed, corrupted, or lost in some way.

Furthermore, even if the message is successfully delivered, one or more generals may choose (for any reason) to act maliciously and send fraudulent messages to confuse the other generals, causing the action to fail.

If we apply this dilemma to the blockchain, each general represents a network node, and the nodes need to reach a consensus on the current state of the system. In other words, the majority of participants in the distributed network must agree and perform the same actions to avoid failure.

Therefore, the only way to reach consensus in these types of distributed systems is to have at least two-thirds of the network's nodes be reliable and honest. This means that the system is vulnerable to failures and attacks (such as a 51% attack) if the majority of nodes in the network decide to act maliciously.


Byzantine Fault Tolerance (BFT)

In simple terms, Byzantine Fault Tolerance (BFT) is the property of a system that is able to resist a series of failures caused by the Byzantine Generals Problem. This means that a Byzantine Fault Tolerant system will continue to operate even if some nodes fail or act maliciously.

There are multiple possible solutions to the Byzantine Generals Problem, and therefore, there are multiple ways to build a Byzantine Fault Tolerant system. Similarly, there are various different ways to implement Byzantine Fault Tolerance in blockchains, which is what we call a consensus algorithm.


Blockchain consensus algorithm

We can define a consensus algorithm as the mechanism by which a blockchain network reaches consensus. The most common examples are Proof of Work (PoW) and Proof of Stake (PoS). Here we take Bitcoin as an example.

The Bitcoin protocol specifies the main rules of the system, and the proof-of-work consensus algorithm explains how these rules are followed to reach consensus (e.g., during the verification and validation of transactions).

Although the concept of proof of work predates digital currency, Satoshi Nakamoto modified the original version and developed an improved proof of work algorithm that can generate Bitcoin as a Byzantine fault-tolerant system.

Please note that the proof-of-work algorithm is not completely resistant to Byzantine faults, but due to the high cost of mining and the underlying encryption technology, proof-of-work has proven to be one of the most secure and reliable methods in blockchain networks. In this sense, the proof-of-work consensus algorithm designed by Satoshi Nakamoto is considered by many to be one of the most brilliant solutions to Byzantine fault tolerance.

in conclusion

The Byzantine Generals Problem is an interesting dilemma that ultimately gave rise to Byzantine Fault Tolerant systems, which are finding wide application in a variety of scenarios. In addition to the blockchain industry, some use cases of Byzantine Fault Tolerant systems include the aviation, aerospace, and nuclear power industries.

In the field of digital currency, having efficient network communication and a good consensus mechanism is crucial for any blockchain ecosystem. Securing these systems requires continuous efforts, and existing consensus algorithms have not yet been able to overcome some limitations (such as scalability). Nevertheless, proof of work and proof of stake are both effective methods for Byzantine fault-tolerant systems, and their potential applications will inspire more innovation.