[The Byzantine Generals Problem]

Byzantine failures is a fundamental problem in peer-to-peer communication posed by Leslie Lambert. The meaning is that there is a message

Attempting to achieve consistency through message passing on a lost unreliable channel is impossible. Therefore, the study of consistency generally assumes that the channel is reliable

, or this problem does not exist.



 

The story goes like this, the Byzantine Empire wanted to attack a powerful enemy and sent 10 armies to surround this enemy. This enemy, although no bigger than the Byzantine Empire, was enough to defend against simultaneous attacks by 5 regular Byzantine armies. For some reasons, these 10 armies cannot be united to make a single point breakthrough and must attack simultaneously in separate encirclement states. Any one of their armies alone has no chance of winning, unless at least 6 armies attack at the same time to take down the enemy country. They are scattered around the enemy country, relying on the signal soldiers to communicate with each other to negotiate the intention and timing of the attack. The problem that plagued these generals was that they weren't sure if there were traitors among them, and traitors could change the intention or timing of the attack without authorization. In this state, could the "loyal" Byzantine generals find a distributed protocol that would allow them to negotiate remotely and reach the correct agreement to win the battle? This is the famous Byzantine Generals problem.

 

A group of generals want to achieve a certain goal (unanimous attack or unanimous retreat), but it is not feasible to act alone, they must cooperate and reach a consensus; because of the existence of traitors, the generals do not know how to reach consensus. Note that "consistency" is what the Byzantine Generals problem is discussed here.

 

general problem

The Byzantine Generals Problem is a problem of agreement, in which the generals of the Byzantine Empire's army must unanimously decide whether to attack an enemy army. The problem is that the generals are geographically separated and there are traitors among the generals. Traitors can act arbitrarily to achieve the following goals: trick some generals into taking an offensive action; facilitate a decision that not all generals agree on, such as facilitating an offensive action when the generals do not wish to attack; or confuse some generals so that they cannot Decide. If the traitor achieves one of these ends, the outcome of any offensive operation is doomed, and victory can only be achieved by a fully consensual effort.

The Byzantine hypothesis is a modeling of the real world, where computers and networks can behave unpredictably due to hardware errors, network congestion or disconnection, and malicious attacks. Byzantine fault-tolerant protocols must deal with these failures, and these protocols must also meet the specifications required by the problem to be solved. These algorithms are usually characterized by their resilience t, which represents the number of erroneous processes the algorithm can cope with. Many classical algorithm problems can only be solved when n ≥ 3t+1, such as the Byzantine Generals problem, where n is the total number of processes in the system.



 

 

invalid

The so-called Byzantine failure refers to a situation where one party sends a message to the other party, and the other party does not receive it, or receives the wrong message.

In fault-tolerant distributed computing, Byzantine failure can be any error in the execution of an algorithm in a distributed system. These errors are collectively referred to as "crash failures" and "send and miss failures". When a Byzantine failure occurs, the system may react in any unpredictable way.

These arbitrary failures can be roughly divided into the following categories:

Failure during another step of the algorithm, i.e. crash failure;

A step of the algorithm cannot be executed correctly;

Performed any of the steps not specified by the algorithm

The steps are performed by the processes, and the algorithms are performed by these processes. A faulty process is one that at some point has the above. A process without errors is the correct process.

 

 

solution algorithm

The original description of the Byzantine problem is: n generals are separated in different places, and loyal generals hope to reach a certain order through some agreement (such as attacking together or retreating together). But some of these renegade generals will prevent loyal generals from agreeing on orders by sending the wrong message. Lamport proved that loyal generals can reach agreement on orders when the total number of generals is greater than 3m and the number of defectors is m or less.

In order to ensure the above requirements, the following two conditions must be met:

1. Every two loyal generals must receive the same value v(i) (v(i) is the order of the ith general)

2. If the ith general is loyal, then he sends the same order as v(i) received by each loyal general

In order to simplify the above model, we use the form of a general sending orders to multiple adjutants to prove that the general who sends the order is called the commander, and the general who receives the order is the adjutant, then the above two conditions can be expressed as:

IC1. All loyal lieutenants obey the same order

IC2. If the commanding general is loyal, then all loyal adjutants obey the commander's (commanding general) order

Special Note: Only one general sends orders at a time, and sends his orders to n-1 lieutenants. m represents the number of traitors, since the total number of generals is n, the total number of adjutants is n-1. Adjutant compliance in IC2 actually means that loyal generals can correctly receive orders from loyal generals.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326883299&siteId=291194637