Since the beginning of Bitcoin in 2008 as a peer-to-peer electronic financial system, many digital currencies have been created, each of them operating with a special mechanism. But the one thing that all digital currencies have in common is blockchain as the basic element in their structure.

All blockchains are intentionally designed to be decentralized and with few exceptions, they act as a digital ledger maintained by a distributed network of computer nodes. For this reason, blockchain technology has allowed the creation of trustworthy economic systems where financial transactions can be carried out in a transparent and reliable manner without the need for intermediaries.

The use of digital currencies is currently being embraced as a viable alternative to traditional banking systems and payment methods that rely heavily on trust.

As is the case in most distributed computing systems, participants in a cryptocurrency network need to regularly agree on the current state in which the blockchain operates. This is what we call a consensus achievement. However, reaching consensus on distributed networks in a safe and secure manner is a very difficult task.

So, how can a distributed network of computer nodes agree on whether some nodes are likely to fail or act illegally? This is the fundamental question of the so-called Byzantine Generals’ Problem from which the concept of Byzantine Fault Tolerance arose.


What is the Byzantine generals’ problem?

In short, the 1982 Byzantine Generals Problem was conceived as a logical dilemma illustrating how a group of Byzantine generals might have problems communicating with each other when trying to agree on the next step in their plan.

The dilemma assumes that each general has his own army, that each group is located in different locations around the city he intends to attack, and that each general must agree to either attack or retreat. It does not matter whether they attack or retreat as long as all the generals reach a consensus i.e. agree on a joint decision in order to implement it in coordination.

Therefore, we may consider the following objectives:

  • Each general must decide: attack or retreat (yes or no).

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

  • All generals must agree on the same decision and implement it in a synchronized manner.

The above communication problems are related to the fact that each single general is only able to communicate with another general through messages which are sent by the carrier/courier. Thus, the main challenge of the problem for Byzantine generals was that messages could be delayed, damaged, or lost.

Additionally, even if the message is successfully delivered, one or more generals may (for any reason) choose to act maliciously and send a spoofed message to confuse the other generals, leading to the complete failure of the mission.

If we apply this dilemma in the context of blockchain, each gen represents a network node and the nodes have to reach a consensus on the current state of the system. Said another way, the majority of participants in a distributed network have to agree to and perform the same action to avoid a complete failure.

Therefore, the only way to reach consensus in these types of distributed systems is by having ⅔ (two-thirds) or more honest nodes. This means that if the majority of the network decides to act maliciously, the system will be vulnerable to failures and attacks (e.g. 51% attack).


Byzantine Fault Tolerance - BFT

In short, Byzantine fault tolerance (BFT) is the property of a system capable of resisting the type of failure derived from the Byzantine Generals Problem. This means that the BFT system is able to continue operating even if some nodes fail or behave maliciously.

There is more than one possible solution to the Byzantine Generals problem, and this means that there are multiple ways to build a BFT system. Likewise, there are multiple different approaches for blockchains to achieve Byzantine fault tolerance and this leads us to so-called consensus algorithms.


Blockchain consensus algorithms

We can define a consensus algorithm as the mechanism through which a blockchain network reaches consensus. The most common applications are Proof of Work (PoW) and Proof of Stake (PoS). But let's take the case of Bitcoin as an example.

While the Bitcoin protocol stipulates the basic rules of the system, it is the consensus algorithm known as Proof of Work (PoW)  that defines how these rules are followed in order to reach consensus (for example, during transaction verification).

Although the concept of Proof of Work is older than cryptocurrencies, Satoshi Nakamoto developed a modified version of it as an algorithm that enabled the creation of Bitcoin as a BFT system.

Note that the Proof of Work (PoW) algorithm is not 100% byzantine fault tolerant but due to the cost-intensive mining process and cryptographic techniques, PoW has proven to be one of the most secure and trustworthy implementations of blockchain networks.

Therefore, the Proof of Work algorithm designed by Satoshi Nakamoto is used by many as one of the most ingenious solutions to Byzantine errors.


Conclusion

The problem of Byzantine generals is an interesting dilemma that eventually gave rise to BFT systems  which are widely applied in different scenarios. Even outside the blockchain industry, a few use cases of BFT include the aviation, space, and nuclear energy industries.

Within the context of digital currencies, having an efficient communication network along with a consensus mechanism is vital for any blockchain system. Securing these systems is an ongoing effort and existing consensus algorithms are still working to overcome some limitations (such as scalability). However, Proof of Work (PoW) and Proof of Stake (PoS) are two very interesting approaches to BFT systems and the potential applications are certainly a source of widespread inspiration.