The introduction of blockchain technology in 2008 with a whitepaper on peer-to-peer electronic cash systems by Satoshi Nakamoto changed the perception of technology. Over the years, blockchain technology has found many noticeable applications across different sectors other than finance. Apart from certain exceptions, blockchain solutions are basically tailored as decentralized in nature. Different nodes arranged in a distributed network take care of a digital ledger that keeps a record of all transactions on the network.
All the participants must agree on specific transactions for their validity, thereby implying the need for consensus mechanisms such as Byzantine Fault Tolerance or BFT. Although you would come across the mention of BFT commonly in different discussions on blockchain, its exact functions are unknown to many. The following guide helps you uncover the basics of the BFT, including its foundation, benefits, and use cases.
Build your identity as a certified blockchain expert with 101 Blockchains’ Blockchain Certifications designed to provide enhanced career prospects.
Why Learn About Byzantine Fault Tolerance?
Consensus models are the major components in the distributed blockchain systems. They are important additions to the blockchain ecosystem for offering a crucial functionality promised with blockchain technology. Basically, they serve as the foundation for promoting interaction between users on a blockchain network in a trustless environment.
Practical Byzantine Fault Tolerance is a prominent example of one of the most common consensus mechanisms with promising benefits. The suitable implementation of consensus mechanisms into cryptocurrency platforms could result in the creation of diverse types of networks featuring exceptional potential.
Therefore, it is quite clear that blockchain helps people and computers in coming to an agreement on things without the need for trusting each other. Consensus mechanisms establish a set of rules that the network of people and computers can trust easily. Byzantine Fault Tolerance is a prominent intervention in the blockchain landscape that enables the creation of credible blockchain rules and protocols.
Prior Knowledge to Learn About Byzantine Fault Tolerance
If you want to learn about Byzantine Fault Tolerance in blockchain, then it is important to start with the basics. First of all, let us get a detailed impression of how consensus works. Subsequently, we can find out how military tactics fit in the equation with blockchain technology and its applications.
Peers and Nodes in Blockchain
Blockchain solutions run in the form of networks that allocate equal access and rights to all computers in the network. The nodes could communicate directly with each other. So, what is a node? Every computer on the blockchain network is referred to as a peer or node. In a fully decentralized solution, no peer or node has more power than other peers or nodes.
Therefore, a blockchain does not have coordinators, directors, or managers for enforcing rules and determining and punishing unacceptable behavior. On the contrary, the system depends on a fact implying that all nodes follow similar rules or protocols for entering the agreement.
Consensus is the term you find when you look for agreement among all nodes, and it literally means ‘general agreement.’ Consensus is the most important but difficult task in a decentralized system without any authority. A major share of nodes should agree on the truth or validity of information or transactions, thereby ensuring the proper functioning of the system or network.
The blockchain network should carry out consensus at regular intervals. However, consensus mechanisms such as Byzantine Fault Tolerance are mandatory to deal with the uncertainty of some nodes failing or misbehaving. Furthermore, some nodes could disagree with the consensus of other nodes. Therefore, it is important to ensure that the system design can overcome such vulnerabilities easily.
Curious to learn about blockchain implementation and strategies? Enroll Now in Blockchain Technology – Implementation And Strategy Course!
Byzantine Fault Tolerance Explained
Barbara Liskov and Miguel Castro introduced the BFT algorithm in the late 90s. It was tailored for working efficiently as asynchronous byzantine fault tolerance without any upper limit on the time of receiving a response to a concerned request. The practical BFT application has been developed for addressing notable issues in the existing BFT model. However, it is essential to know the BFT model as it was created originally for understanding the practical or asynchronous BFT.
The origins of the Byzantine Fault Tolerance algorithm go back to 1982 with the foundation of the Byzantine General’s Problem. Leslie Lamport, Marshall Pease, and Robert Shostak created the Byzantine General’s Problem and subsequently gave rise to BFT. The concept of BFT has a promising relationship with military tactics in a scenario where different Byzantine generals gather around an enemy city before attacking it. Some of the notable highlights of the Byzantine General’s Problem could help in understanding the actual work of the Byzantine Fault Tolerance consensus.
- The different Byzantine generals command their respective units at different positions outside the city they are about to attack.
- The generals can communicate with each other through messengers, sending one message at a time.
- The Byzantine generals must have coordination and agreement on a particular plan of action for successfully attacking or retreating.
- If all the generals attack at the same time or all of them retreat at the same time, there is no problem. However, if one general retreats while others attack or attack while the others retreat, the general would end up losing. Therefore, the outcome will be bad for all of the generals and their units.
- Another important point in the Byzantine General’s Problem is the fact that some of the generals are not loyal. These generals could try sending the wrong or manipulated information to other generals for confusing them.
Start your blockchain journey Now with the Enterprise Blockchains Fundamentals – Free Course!
Therefore, the Byzantine Fault Tolerance model could help in resolving this problem. The generals would need an algorithm that could guarantee the following conditions.
- All the loyal generals would act and agree on the same plan of action.
- The loyal generals of the Byzantine army would not follow a bad plan under the influence of traitor generals.
- The loyal generals would follow all the rules specified in the algorithm
- All the loyal generals of the Byzantine army must reach a consensus irrespective of the actions of traitors.
- Most important of all, the loyal generals should also reach an agreement on a specific and reasonable plan.
Start learning Blockchain with the world’s first Blockchain Expert Career Path and become a Blockchain Expert!
How Does BFT Apply to Blockchain?
Now, it is important to find out how the Byzantine General’s Problem is applicable in the case of blockchain. In the case of a peer-to-peer network, unanimous agreement among loyal and non-faulty nodes could help in achieving consensus. The foundation of Byzantine Fault Tolerance is visible in a scenario where all nodes repeat an incoming message.
If a node repeats the incoming message, then it clearly indicates that it does not have any issues or faults. On the other hand, if the recipients repeat the incoming message, the network could easily rule out the possibility of Byzantine nodes. What is a Byzantine Node?
Byzantine node refers to the traitor node which could lie or mislead other nodes in the network intentionally. The byzantine node could also mislead or lie to the nodes that are involved in the consensus protocol. A perfectly operational blockchain network would ensure that Byzantine Fault Tolerance in blockchain helps it in overcoming failures. Byzantine nodes or malicious nodes can lead to certain pitfalls known as Byzantine failures.
Users could come across two distinct types of Byzantine failures, with the first one being completely technical in nature. A slightly technical error in the node could affect its functionality, and in some cases, it might stop responding or working altogether. The other type of Byzantine failure refers to the arbitrary node failure. In the case of an arbitrary node failure, a node might show the following traits,
- Failing to return a result
- Providing responses with incorrect results
- Responding with deliberately misleading results for queries
- Providing a response to a single query with different results to different components of the system
Byzantine Fault Tolerance or BFT helps in overcoming all these challenges effectively by reducing the impact of malicious nodes. It can protect the network from dangerous system failures and ensure the ideal functioning of the network. Basically, it lets the honest nodes and malicious nodes do their own work without affecting the network’s performance. Over the course of many years, extensive research over the Byzantine General’s Problem and optimization with a varied set of practical solutions has led to the introduction of many improvements over the conventional BFT.
Get familiar with the terms related to blockchain with Blockchain Basics Flashcards.
What is Practical BFT Consensus?
Practical Byzantine Fault Tolerance emerged as one of the prominent optimizations of BFT in 1999 by Barbara Liskov and Miguel Castro in their academic paper with the title ‘Practical Byzantine Fault Tolerance.’ The primary objective of the practical BFT was to resolve the discrepancies evident in the original BFT consensus mechanism.
The pBFT consensus mechanism wants to ensure a practical Byzantine state machine replication for tolerating Byzantine nodes or failures. The primary notion underpinning the practical BFT mechanism refers to the assumption about the existence of independent node failures. Practical BFT also assumes that particular independent nodes are responsible for propagating manipulated messages.
The most striking highlight of the practical BFT mechanism refers to the fact that it is ideal for asynchronous systems. In addition, it is also capable of offering high performance alongside exceptional overhead runtime. Users would have to encounter just a slight growth in latency with practical BFT.
Preparing for Blockchain interviews? You should go through this set of 50 most common Blockchain interview questions to prepare well and crack the interview.
Highlights of Practical BFT
If you want to learn more about practical or asynchronous byzantine fault tolerance, then you have to understand its traits. Here are some of the significant aspects which clearly dictate an asynchronous BFT consensus mechanism.
- Basically, all nodes in the asynchronous or practical BFT model are arranged in a sequence. One node in the network serves as the primary node or leader node, and the other nodes are known as backup nodes.
- All nodes in the system allow the capability for communication between nodes. The primary goal of the communication focuses on ensuring that honest nodes in the network could arrive at a specific agreement regarding the state of the blockchain system on the grounds of the majority.
- Nodes have the capability to communicate with each other seamlessly and consistently. Practical BFT ensures that nodes not only verify the message but also ensure that the message has not been subject to any modifications during transmission.
Working of pBFT
The working of the practical Byzantine Fault Tolerance model relies profoundly on certain assumptions. The most prominent assumption regarding practical BFT refers to the fact that the number of malicious nodes in the network could not be equal to or more than one-third of the total nodes in the system for a specific window of vulnerability.
Additional nodes in the system would reduce the mathematical probability for a number of nodes amounting to almost one-third of the total nodes in the system becoming malicious. The practical BFT algorithm ensures the facility of safety as well as liveness for a number of nodes up to (n-1)/ 1/3. In this case, n denotes the total number of nodes that are malicious or faulty simultaneously. The following result eventually points towards the correctness of responses that clients receive for their requests on the grounds of linearization.
Stages of Consensus in Practical BFT
In order to understand the practical variant of the Byzantine Fault Tolerance algorithm, you have to understand the stages in its consensus. All rounds in the practical BFT consensus generally include almost 4 phases. The model deviates slightly from the pure Byzantine General’s Problem by adopting a ‘Commander and Lieutenant’ approach. Therefore, you wouldn’t find that all the generals are equal in private BFT. The important steps to understand how BFT works are as follows,
- Clients send requests to the leader node for invoking a specific service operation.
- The leader node could then multicast the request to backup nodes in the network.
- Nodes could also ensure execution of assigned requests followed by sending a relevant reply to the client.
- The client would then wait for (f+1) replies from various nodes with a similar result. In this case, ‘f’ denotes the maximum number of nodes with possibility of faults. The outcome is basically reflective of the result from the operation.
It is also important to ensure that nodes are fulfilling the important requirements for Byzantine Fault Tolerance in Blockchain. The nodes must be deterministic and begin with the same state for practical BFT. The final outcome would imply that all honest nodes could reach an agreement regarding the order of the record. The nodes could either accept or reject the record in the final result. Interestingly, practical BFT utilizes a round-robin type format for modifying the leader node in each view.
In addition, it is also possible to replace the leader node with a protocol known as view change. Such a protocol is suitable in cases where the leader node has not multicasted the request for a particular amount of time. Furthermore, practical or asynchronous Byzantine Fault Tolerance ensures that a large majority of honest nodes could decide together on the faulty nature of a leader. The honest nodes could also replace the faulty leader with the next leader node in succession as its replacement.
Start your blockchain journey Now with the Enterprise Blockchains Fundamentals – Free Course!
Benefits and Pitfalls of Practical BFT
The practical BFT model for blockchain consensus was tailored for practical applications. The original academic paper underlying practical BFT has also outlined the particular shortcomings while showcasing key improvements for the implementation of the algorithm in real-world systems. Practical Byzantine Fault Tolerance can help in ensuring the following advantages.
1. Flexibility and Speed of Transactions
First of all, it can provide the assurance of transaction finality without any requirement of confirmations such as in Proof-of-Work. You can find a considerable difference from the PoW model employed by Bitcoin with practical BFT. When the nodes in a practical BFT model agree on a concerned block, the block is considered as final. The finality relies on the fact that all honest nodes are in agreement regarding the system’s state at a particular time. The communication among the honest nodes helps in ensuring credible agreement on the system’s state.
2. Low Energy Consumption
The next important advantage with this Byzantine Fault Tolerance algorithm in comparison to PoW consensus is the reduced energy usage. The Proof-of-Work model employed in Bitcoin implies the requirement of a PoW round for each block. Gradually, miners in the Bitcoin network increase electrical consumption, which can outperform the annual electricity consumption of small countries.
Practical BFT does not involve intensive computational efforts, thereby leading to a profound reduction in consumption of electrical energy. With practical BFT, miners don’t have to solve PoW hashing algorithms for each block with requirement of intensive computational resources.
However, practical BFT also has a certain amount of setbacks. For example, the practical BFT model is applicable only in its classical form. Therefore, you are restricted to small consensus group sizes to avoid the cumbersome volumes of communication needed between nodes. Furthermore, the use of digital signatures and Method Authentication Codes for message authentication can present concerns of inefficiency.
Want to become a bitcoin expert? Enroll Now in Getting Started with Bitcoin Technology Course
Bottom Line
On a final note, it is quite clear that Byzantine Fault Tolerance has a significant role in transforming consensus approaches. Blockchain applications are slowly gaining momentum throughout different sectors. However, there are many concerns that are emerging in modern blockchain networks.
Therefore, it is important to look at BFT as a vital instrument for ensuring that the network functions normally despite malicious actors. Blockchain is accessible and transparent, and so it can invite many unwanted participants wanting to take out their private interests. So, a clear understanding of consensus mechanisms such as BFT and improvisations such as practical BFT becomes necessary. Learn more about BFT model now!
*Disclaimer: The article should not be taken as, and is not intended to provide any investment advice. Claims made in this article do not constitute investment advice and should not be taken as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this article. Do your own research!