The Byzantine generals problem is a famous problem in computer science that was posed in the 80s of the last century. So what is Byzantine Fault Tolerance? What problem have blockchains solved? Join Weakhand to find out details in this article.
What is Byzantine Fault Tolerance?
Byzantine Fault Tolerance (BFT) is a concept in the field of distributed systems that refers to the ability of a system to handle errors and ensure consistency in the event of a failure.
BFT is a secondary error control mechanism, meaning it operates independently of the primary error control system. The goal of BFT is to ensure that the system still operates correctly and consistently in the event of one or more nodes in the system failing or being attacked.
BFT was born to solve the problems of the Byzantine generals problem that existed in the 80s of the last century.
Byzantine Problems and Problems
The Byzantine Generals Problem was introduced by Leslie Lamport, Robert Shostak and Marshall Pease in 1982 in the article “The Byzantine Generals Problem” with the following main content:
“There are N generals holding different armies, including M generals who are traitors, trying to prevent other generals from following the agreement:
- 4 generals want to attack.
- 4 generals want to withdraw their troops.
- A traitor general tells the first group that he wants to attack, and tells the second group that he wants to withdraw.
Byzantine generals could only communicate by messages transmitted through messengers. The problem arises when verifying the information I receive from other generals is accurate or not and is the information I send slow, lost or changed?
When applied to blockchain, this problem raises the question of how consensus can be achieved in a distributed environment when nodes may not trust each other and are subject to fraud or error.
Specific problems in the Byzantine problem include determining trustworthy nodes to transmit information, ensuring the correctness of transmitted information, resolving information conflicts in case some nodes cheat. cheat, and find a way to reach consensus in case some nodes fail.
Why Use BFT
BFT is used to solve the Byzantine error problem, which is the situation when nodes in the blockchain network disagree on a certain state or transaction, or when there are nodes acting abnormally or attacking from the outside. outside the network.
BFT allows nodes in the network to reach consensus on the state of the system and securely create new blocks, avoiding problems with communication errors, typos, or errors due to malicious actions. .
Therefore, BFT is an indispensable part of building a trustworthy and secure blockchain system.
Components That Make Up BFT
The Byzantine Fault Tolerance system consists of two main components:
- Replica: Are nodes in a distributed system, with the function of copying, storing and processing requests.
- Node leads: is the coordination node in the system, responsible for managing and synchronizing operations between replicas to ensure system consistency and reliability when some replicas encounter problems.
How It Works and Ensures Consistency in BFT
Nodes in the BFT system act as consensus nodes, and decisions are only considered official when consensus is reached from all consensus nodes.
To ensure consistency within the system, BFT uses two main methods:
- Synchronous adjustment: All consensus nodes must perform the same action simultaneously to achieve consensus. Otherwise, they will be excluded from the consensus process.
- Four Steps Through the Process: The consensus process consists of four steps – proposal, forward proposal, consensus and resolution. This process ensures that the decisions made by the consensus node are consistent and have integrity.
Thanks to the combination of both methods, BFT ensures consistency and synchronization in the consensus process between consensus nodes in a distributed system.
Consensus Algorithms
BFT is an important feature in consensus algorithms used in blockchain. These algorithms such as pBFT (Practical Byzantine Fault Tolerance), Tendermint, and Hyperledger Fabric use BFT to ensure the safety and reliability of new block and transaction validation in the blockchain network.
To achieve consensus, blockchains must use a specific consensus mechanism such as Proof of Work (PoW) or Proof of Stake (PoS).
To put it simply, we can think of Bitcoin as a protocol with many different system rules, and Proof of Work will be a way for Bitcoin’s rules to always reach consensus.
To add a block to the Bitcoin blockchain network, nodes must prove that they have performed resource-consuming work, and this resource consumption encourages the most truthful information.
Since it is difficult to remove a block that has been added to the blockchain, the moment information is released, all nodes in the network can easily verify the accuracy of that information. If that information is incorrect, the majority of nodes will agree to remove it from the block.
Although the PoW algorithm does not guarantee absolute Byzantine fault tolerance, thanks to the expensive proof generation process and cryptographic techniques behind it, PoW has been proven to be one of the consensus algorithms. The safest and most reliable at the present time.
Summary
Above is the necessary information for everyone to understand what is Byzantine Fault Tolerance? Weakhand hopes that through this article, everyone will gain a lot of useful information and make effective use of it in their research process.