Since Bitcoin was created in 2008 as a peer-to-peer cryptocurrency system, many other cryptocurrencies have been born, each of which has its own mechanism. But the common point of most cryptocurrencies is blockchain – the core element in the architecture.
With a few exceptions, blockchains are designed with the mind towards decentralization, acting as an electronic ledger maintained by a distributed network of computer nodes. For this reason, blockchain technology allows the creation of trustless economic systems where transparent and reliable financial transactions can be carried out without the need for intermediaries. Cryptocurrencies are being adopted as a viable alternative to traditional banking and payment systems, which rely heavily on trust.
Just like most distributed computing systems, participants in the cryptocurrency network need to agree on the current state of the blockchain, and that is what we call consensus. However, achieving consensus on a secure and reliable distributed network is not an easy thing.
So how does a distributed network of computer nodes reach consensus when processing a decision, if some of the nodes in it are likely to fail or be unreliable? This is the fundamental question of the so-called Byzantine generals problem, from which the concept of the Byzantine fault tolerance system was born.
What is the Byzantine generals problem?
Briefly, the Byzantine generals problem, introduced in 1982, describes a dual logic problem. The problem describes a group of Byzantine generals experiencing communication problems while trying to agree on a next move.
The problem assumes that each general has his own army and that each general is stationed in different locations around the city they intend to attack. The generals must agree on whether to attack or retreat. The issue of attack or retreat is not important but the consensus of all generals, that is, consensus on a common decision to coordinate implementation.
Therefore, we can consider the following goals:
Each champion must decide: attack or retreat (yes or no);
The decision cannot be changed once it is made;
All champions must agree on the same decision and proceed in sync with each other.
The communication problems mentioned above are related to the fact that a champion can only communicate with other champions through messages delivered by messengers. The central issue of the Byzantine generals problem here is that messages can be delayed, destroyed, or lost.
Also, even considering that the message will be delivered successfully, there is still a chance that one or more champions may choose (for whatever reason) to perform harmful actions and send a message. wrong to interfere with other champions, resulting in a total defeat.
If we apply the dilemma to the case of blockchain, each champion will represent a network node and the nodes need to reach consensus on the current state of the system. In other words, the majority of participants in a distributed network must agree and take the same action to avoid a total failure.
So, the only way to achieve consensus in these types of distributed systems is to have the consensus of at least ⅔ or more honest and trusted network nodes. This means that if the majority of nodes in the network decide to take a malicious action, the system will be vulnerable to failure and attack (e.g. 51st attack).
What is Byzantine Fault Tolerance (BFT)?
In a nutshell, the Byzantine Fault Tolerance (BFT) system is a system that can solve the problem of the Byzantine generals problem. This means that the BFT system can continue to function even if some nodes fail or perform harmful actions.
There are many possible solutions to the problem of the Byzantine generals problem, so there are many ways to construct a BFT system. Likewise, there are different ways for a blockchain to achieve Byzantine fault tolerance and what we have here are consensus algorithms.
Blockchain Consensus Algorithms
We can define a consensus algorithm as a mechanism through which a blockchain network reaches consensus. The most popular algorithms are Proof of Work (PoW) and Proof of Stake (PoS). Let’s take Bitcoin as an example.
While the Bitcoin protocol prescribes the main rules of the system, the PoW consensus algorithm prescribes how these rules will be followed in order to reach consensus (for example, during verification and validation). receive transactions).
Although the concept of Proof of Work existed long before the advent of cryptocurrencies, Satoshi Nakamoto developed it into an algorithm that allowed the creation of Bitcoin as a BFT system.
Note that the PoW algorithm does not guarantee 100% Byzantine fault tolerance, but thanks to the expensive mining process and the cryptographic techniques behind it, PoW has proven to be one of the safest and most reliable implementations. most trusted for blockchain networks. In that sense, the Proof of Work consensus algorithm, designed by Satoshi Nakamoto, is considered one of the most genius solutions to the Byzantine bug problem.
The Byzantine generals problem is an intriguing dichotomy that gave rise to the BFT systems that are now widely applied in different scenarios. In addition to the blockchain industry, a few use cases for the BFT system include the aviation, space, and nuclear power industries.
In the cryptocurrency context, having an efficient network communication along with a good consensus mechanism is very important for any blockchain ecosystem. Securing these systems is an ongoing process, and existing consensus algorithms do not yet overcome some limitations (e.g. scalability). Still, PoW and PoS are very interesting solutions for building BFT systems, and the potential applications from them are clearly inspiring widespread improvements.
The problem of Byzantine generals in Blockchain technology
History of blockchain technology
Three generations of Blockchain technology
According to TapchiBitcoin.vn