What is a practical Byzantine fault tolerance mechanism? 丨Introduction to Vernacular Blockchain 248

Author | Produced by Xiaona Du
| Vernacular Blockchain (ID: hellobtc)

Practical Byzantine Fault Tolerance (PBFT), referred to as PBFT, in the previous article "What is the consensus mechanism known as the "soul of the blockchain "" , we have already learned about several consensus mechanisms such as PoW, PoS, and DPoS. Today we will understand the practical Byzantine fault-tolerant mechanism. To understand the practical Byzantine fault-tolerant mechanism , let’s start with the Byzantine general problem.

 01 
Byzantine Generals Question

The story goes like this. The Byzantine Empire was the Eastern Roman Empire from the 5th to 15th centuries, which is now Turkey. The Byzantine Empire had great wealth, and its ten neighboring countries had long coveted it. But the Byzantine walls are so high that no single neighbor can successfully invade. Any single city-state invasion will fail, and the invading army will be annihilated, making itself vulnerable to the invasion of the other nine city-states.

These ten neighboring countries also covet each other's wealth and wars often break out. Byzantium's defense capabilities are very strong. If there are six or more neighboring countries to attack together, it will succeed. However, if one or several of the neighboring states betrayed and agreed to attack together, but when the others attacked, they repented. This will result in only five or fewer troops attacking at the same time, and all attacking troops will be annihilated.

Therefore, every neighboring country is cautious and can't easily trust the neighboring country, because a little carelessness will bring disaster to itself. This is the Byzantine generals problem.


 02 
Byzantine fault tolerance

In the previous article, we have already understood what is the consensus mechanism of the blockchain. The popular explanation is a rule agreed upon by everyone, and a consensus reached by everyone for a common purpose. The accounting consensus reached by blockchain network nodes is similar to that of the Byzantine generals problem. The nodes in the blockchain can be compared to generals, the generals who will not betray are compared to normal nodes, and the generals who will betray are compared to malicious node.

For ease of understanding, we assume that there are 4 generals A, B, C, and D attacking the city. At the same time, 3 generals attacked as successful. We assume that General B is a traitor, and General A sends a signal soldier to tell the other 3 generals to attack. Because General B is a traitor, he sends a signal soldier to tell General C and General Ding Choushi to attack. General C received the news from General A and sent a messenger to tell General B and General Ding Zishi to attack. General Ding received the news from General A and sent a signal soldier to tell General B and General C to attack. then:

  • General B received: Zi Shi, Zi Shi, Zi Shi;

  • General C received: Zishi, Choushi, Zishi;

  • General Ding received: Zishi, Choushi, Zishi;

In this way, each general carries out the most messages he has received. General C and General D received the most news about Zishi's offensive. The three generals, General A, General C, and General D, attacked at Zishi and succeeded. This is the PBFT algorithm. When studying the Byzantine Generals problem, the total number of distributed nodes must be greater than or equal to 4, and the number of malicious nodes cannot exceed one-third to ensure that nodes reach a consistent result. Each node in the blockchain According to this algorithm, consensus can be reached.

 03 
summary

Through the above description, do you have a deep understanding of the Byzantine fault tolerance mechanism? Please leave a message in the comment area.

——End——

"Sound Description: This series is only for entry-block chain science learning, does not constitute any investment advice or recommendations. If there are any errors or omissions, please leave a message to point out.

Dear, it’s said that 99.9% of the tasteful people have ordered "Watching"????

Guess you like

Origin blog.csdn.net/mrRqAEr7ci9s2v0/article/details/110675480