The decentralized nature of cryptocurrency is one of its distinguishing features. A distributed network of nodes verifies and records transactions, allowing cryptocurrencies to operate without the oversight of a central party. For this to work, each cryptocurrency must have a method of reaching consensus. This is where Byzantine Fault Tolerance enters the picture. So what is PBFT in blockchain? Let’s find out.
Practical Byzantine Fault Tolerance Explained
In the late 1990s, Barbara Liskov and Miguel Castro developed the BFT algorithm. It was designed to function efficiently as asynchronous byzantine fault tolerance with no upper limit on the time it takes to receive a response to a concerned request. The practical BFT application was created to address significant issues in the existing BFT model. However, it is critical to understand the BFT model because it was originally developed to understand the practical or asynchronous BFT.
The Byzantine Fault Tolerance algorithm has its roots in 1982, with the creation of the Byzantine General’s Problem. The Byzantine General’s Problem was invented by Leslie Lamport, Marshall Pease, and Robert Shostak, and it gave rise to BFT. In a scenario where various Byzantine generals gather around an enemy city before attacking it, the concept of BFT has a promising relationship with military tactics. The problem was well explained in a paper published in 1982 by LESLIE LAMPORT, ROBERT SHOSTAK, and MARSHALL PEASE at Microsoft Research:
“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 all loyal generals decide upon the same plan of action, and 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 the first condition regardless of what the traitors do. The loyal generals should not only reach an agreement but should agree upon a reasonable plan.”
Byzantine fault tolerance can be achieved if the network’s correctly functioning nodes agree on their values. Missing messages can be assigned a default vote value, which means that we can assume that the message from a specific node is faulty if it is not received within a certain time limit. Furthermore, if the majority of nodes respond with the correct value, we can assign a default response.
Leslie Lamport demonstrated that if we have 3m+1 correctly functioning processors, we can reach a consensus (agreement on the same state) if at least m processors are faulty, which means that more than two-thirds of the total number of processors must be honest.
what is PBFT in blockchain?
Practical Byzantine Fault Tolerance is a system that consists of a primary and secondary node. This system is one of the solutions to the Byzantine Generals’ Problem because these nodes collaborate to reach a consensus. The primary goal of the PBFT was to correct the flaws in the original BFT consensus mechanism.
The PBFT consensus mechanism seeks to ensure practical Byzantine state machine replication in order to accommodate Byzantine nodes or failures. The primary assumption underlying the practical BFT mechanism is the existence of independent node failures. Practical BFT also assumes that specific independent nodes are in charge of spreading manipulated messages.
The most striking feature of the practical BFT mechanism is that it is ideal for asynchronous systems. Furthermore, it is capable of providing high performance while also having a low overhead runtime. With practical BFT, users would only see a slight increase in latency.
How Practical Byzantine Fault Tolerance (PBFT) Works?
A question like “what is PBFT in blockchain” is essential to knowing how the consensus mechanism operates. Let’s find out! PBFT attempts to provide a practical Byzantine state machine replication that can function even in the presence of malicious nodes in the system.
In a PBFT-enabled distributed system, nodes are ordered sequentially, with one node serving as the primary (or leader node) and the others serving as secondary (or the backup nodes).
It is important to note that any eligible node in the system can become the primary by switching from secondary to primary (typically, in the case of a primary node failure). The goal is that all honest nodes help in reaching a consensus regarding the state of the system using the majority rule.
A real-world Byzantine Fault Tolerant system can function as long as the maximum number of malicious nodes is less than or equal to one-third of all nodes in the system. The system becomes more secure as the number of nodes increases.
PBFT consensus rounds are divided into four phases
- The client initiates communication with the primary (leader) node.
- The request is broadcast to all secondary (backup) nodes by the primary (leader) node.
- The nodes (primary and secondary) provide the requested service and then respond to the client.
- The request is successfully served when the client receives “m+1” replies with the same result from different nodes in the network, where m is the maximum number of faulty nodes allowed.
The primary (leader) node is switched during each view (PBFT consensus round) and can be replaced by a view change protocol if a predefined amount of time passes without the leading node broadcasting a request to the backups (secondary). If necessary, a majority of the honest nodes can vote on the current leading node’s legitimacy and replace it with the next in line.
Practical Byzantine Fault Tolerance Advantages
All nodes in the system allow for seamless and consistent communication between nodes. The primary goal of the communication is to ensure that honest nodes in the network can reach a consensus on the state of the blockchain system based on the majority. It also ensures that nodes not only verify the message but also ensure that it has not been modified during transmission.
Without performing the complex mathematical operation, Practical Byzantine Fault Tolerance (PBFT) can achieve the desired results. The Zilliqa employee carries out the complex mathematical operation by combining every 100th block of the practical Byzantine Fault Tolerance (PBFT).
Multiple confirmations for the distribution network are not required in practical Byzantine Fault Tolerance (PBFT). In the case of the Bitcoin mechanism, each node is individually connected to multiple nodes, and each node verifies every incoming and outgoing transaction. The confirmation of each transaction can take up to 10-60 minutes to complete. The number of nodes connected to it determines the completion of the entire operation.
Byzantine Fault Tolerance vs Proof of Work
A consensus algorithm is a mechanism by which a blockchain network achieves consensus. Proof of Work is the most commonly used implementation (PoW). Let’s look at Bitcoin as an example.
While the Bitcoin protocol specifies the system’s primary rules, the PoW consensus algorithm specifies how these rules will be followed in order to reach consensus (for instance, during the verification and validation of transactions).
Although the concept of “proof of work” predates cryptocurrencies, Satoshi Nakamoto modified it as an algorithm that allowed the creation of Bitcoin as a BFT system.
Although the PoW algorithm is not completely immune to Byzantine faults, due to the high cost of mining and the underlying cryptographic techniques, PoW has proven to be one of the most secure and reliable blockchain network implementations. In this regard, Satoshi Nakamoto’s Proof of Work consensus algorithm is widely regarded as one of the most brilliant solutions to Byzantine faults.
what is PBFT in blockchain: Conclusion
With the article above I hope you now understand what is PBFT in blockchain. Byzantine Fault Tolerance is a well-studied concept in distributed systems, and its incorporation into real-world systems and platforms, whether through an optimized version or hybrid form, remains a critical infrastructure component of cryptocurrencies today.
As platforms continue to develop and innovate in the field of consensus models for large-scale public blockchain systems, advanced Byzantine fault tolerance mechanisms will be critical to ensuring the integrity and trustlessness of various systems.