# Byzantine Generals Problem ###### tags: `thread` When learning the blockchain consensus mechanism, there is an inescapable concept, which is the "Byzantine Generals Problem" Around this problem, many solutions were born, some of which were abandoned, others were feasible (and inspired Nakamoto PoW and Ethereum PoS) ## Byzantine Generals Problem In the blockchain world, the consensus mechanism is to require all individual nodes (generally the number of nodes will be very large) to agree on a single fact (this single fact is the transaction history) So in simple terms, the consensus is about reaching an agreement Also, a situation makes it more difficult for nodes to reach a consensus, which Leslie Lamport proposed in his 1982 paper👇 A group of generals (assume 9 here) surrounded Byzantium. Then all generals need to agree on the plan (attack or retreat) afterward But there are traitors among these generals who may prevent honest generals from agreeing ![](https://i.imgur.com/oBHRONY.png) This is the "Byzantine Generals Problem (BGP)", where all loyal generals can agree on the right plan despite traitors (lying, deliberately delaying, etc.) In this system (with traitors), it is very difficult to get all individual nodes to agree Any algorithm that solves the Byzantine Generals problem (which can tolerate Byzantine faults) is called Byzantine Fault Tolerance (or BFT algorithm) ## BFT algorithm and pBFT The earliest BFT algorithm is pBFT, and its idea is very simple: - It consists of one leader node (sending requests) and backup nodes (voting) - Communication is fast. All nodes reach the result at the same time (but the number of nodes cannot be too many) - High barriers to entry. Because all backup nodes have voting rights, if there are no barriers to entry, we can fake a large number of nodes to attack - Can tolerate Byzantine faults, allowing the 33% dishonest nodes ![](https://i.imgur.com/qORA3D5.png) But this is bound to constitute a very closed system. Because the number of nodes cannot be too many (otherwise it will cause slow communication), and becoming a node requires permission (high barriers to entry) Satoshi Nakamoto solved BGP under another idea, allowing everyone to participate without permission, and truly build a decentralized collaborative network (such a network must be no authority, non-permission, and efficient) ## Conclusions Anyways, It is interesting to learn consensus mechanisms, but must have a good understanding of some basic issues Such as how different algorithms solve the Byzantine Generals problem, and how to deal with Sybil attacks. How to balance decentralization/security/efficiency, etc. [Thread](https://twitter.com/LuozhuZhang/status/1576582130980704257?s=20&t=hf32T6kwnUQiTjAV1MfiLA)