2021-10-07

Byzantine Fault Tolerance


Byzantine Fault Tolerance (BFT) is the ability of a network to reach consensus even when it is exposed to attacks within the network. The main goal of BFT is to reduce the influence from the attacker and prevent failure of the whole network.

BFT has an important role in blockchain technology as the transactions recorded in the blocks are agreed upon by unknown nodes. The nodes could be mischievous and tamper the blocks. To prevent this, the network needs to have certain mechanisms to reduce the effect of such attacks on the network and maintain the integrity of the blocks through the honest nodes.

Byzantine Generals Problem

Byzantine Generals Problem

 

BFT stems from the Byzantine Generals Problem in computer science. The Byzantine Generals Problem can be laid out as follow:

1.       There are 3 Byzantine Generals planning to raid a castle

2.       All three generals are separated from one another

3.       They can only communicate through messengers

4.       They need to agree on either to attack or retreat to successfully conquer the castle

If one of the generals was bribed by the enemy, how can the other two honest generals agree with their decision? Is there any solution to this problem?

Let’s assume the following situations:

The 3 generals are divided into 3 legions, one of the legions is led by the commander and the other two legions are led by the lieutenants. Now, let us analyse the following two scenarios from the perspective of lieutenant 1.

Situation 1

 

Let say Lieutenant 2 is corrupt, Lieutenant 1 receives an attack order from the honest Commander and learns from the corrupt Lieutenant 2 that the Commander ordered him to retreat.

 

 

 

Situation 2

 

Let say the Commander is corrupt, Lieutenant 1 receives an attack order from the corrupt Commander and learns from the honest Lieutenant 2 that the Commander ordered him to retreat.

 

 

In both situations, Lieutenant 1 received the same conflicting messages from both parties. However, he is unable to tell who is corrupt, and who is honest.

Solution

 

There is no solution for the 3 Byzantine Generals Problem if one of them is corrupt. In general, the solution for the Byzantine Generals Problem only exists if there are more than two thirds of the honest generals in total. In terms of network system, a particular network can only reach consensus if the number of honest nodes is more than two third of the total nodes in the network.

Blockchain technology

 

Blockchain technology is based upon the network system where the nodes (miners) validate or mine the blocks. Since the honesty of the nodes is unknown, the blockchain technology is exposed to the Byzantine Generals Problem.

There are many ways to mitigate this problem such as Proof of Work and Proof of Stake. Each of these mechanisms has their own advantages and weaknesses.

Reference

 

1. Lamport, Leslie, Robert E. Shostak and Marshall C. Pease. “The Byzantine Generals Problem.” ACM Trans. Program. Lang. Syst. 4 (1982): 382-401.