Micro Signal: AFBSDY

If you are new to blockchain, you have more or less heard of the Byzantine General problem, and you often see or hear that so-and-so chain has solved the Byzantine General problem using so-and-so algorithm, so what exactly is the Byzantine General problem?

Baidu's encyclopedia explains it as follows.

The Byzantine general problem (Byzantine failures) is a fundamental problem in peer-to-peer communication posed by Leslie Lambert. The implication is that it is impossible to attempt to achieve consistency by means of message passing on unreliable channels where message loss exists. Thus studies of consistency generally assume that the channel is reliable or that there is no present problem.

Feeling confused there? Don't worry, read the following story first ......

The story was made up by a guy named Leslie Lamport to describe the Distributed Consensus problem (Distributed Consensus) for distributed systems. The broad outlines are as follows.

Long long ago, war raged and the Byzantine Empire sent nine armies to guard its frontiers against enemies from every direction. Since the enemy is so powerful, no single army can fight it alone unless there are at least five armies working together to defeat it. However, the armies were separated by great distances and they could only pass messages to each other by messenger. The problem that plagued the nine generals was that they were unsure if there were traitors among them (including messengers) and that traitors might change their intentions to fight or the timing of the battle without permission. In this state, how could Byzantine generals ensure that more than five armies would join forces at the same time to win?

01

Assuming there are no traitors, General A makes an offer to attack: "The attack will be launched at 10 a.m. tomorrow morning. "The messenger then tells each of the other generals that if all goes well, he has received the consent of more than four other generals to launch the attack. If, unfortunately, the other two generals, B and C, also send different offers of battle at this time (e.g., retreat and attack tomorrow at 3:00/4:00 p.m.), the different generals may receive (and endorse) different offers of battle due to the difference in timing, which could result in General A's offer having 3 supporters, General B's offer having 4 supporters, General C's offer having 2 supporters, etc. None of the above can satisfy the condition of 5 armies fighting together. This is the origin of the Byzantine general problem.

02

If there is a traitor, the traitor will send different offers of battle to different generals (e.g. inform A to attack at 10am tomorrow, inform B to attack at 2pm tomorrow, etc.), and a traitor may agree to multiple offers (i.e. agree to attack at 10am and agree to attack at 2pm), causing confusion.

A traitor sending inconsistent attack proposals is called a "Byzantine error", and the fault tolerance that can handle Byzantine errors is called "Byzantine fault tolerance", or BFT for short.

I believe you can already understand the complexity of this issue.

solution

Before the advent of Bitcoin, the solution to the distributed system consistency problem was mainly the Paxos algorithm proposed by Lamport or its derivatives. Paxos-like algorithms are only applicable to centralized distributed systems, where such systems have no dishonest nodes that send false error messages, but allow for message delays that occur when the network is down or down.

Satoshi Nakamoto has creatively introduced "Proof of Work (POW)" in Bitcoin to solve this problem. The cost of sending messages is increased by POW, which reduces the rate at which nodes send messages, so that only one node is broadcasting at a time, and at the same time will attach its own signature to the broadcast.

The process is like one General A addressing the other generals (B, C, D... ) Initiate an offer of attack like General B, C, D... Seeing an offer of attack signed by General A, a general who is honest will immediately agree to the offer of attack and not initiate a new offer of attack of his own.

The above is how individual blocks in the Bitcoin network reach consensus (achieve consistency).

Understanding how individual blocks achieve consistency makes it easier to understand the entire blockchain if it agrees.

Let's change the general's problem slightly: suppose it takes multiple attacks to take a castle, and each offer to attack must be based on the most previous victories (only then the enemy has the most losses and our attack is more likely to win), so that when General A receives an offer to attack, he checks to see if the offer is based on the most victories, and if not, General A will not agree to such an offer, and if so, General A will write the offer down. This is the Bitcoin network's longest chain option.

economic analysis

Proof of workload actually amounts to an increase in the cost of posting false blocks. Under proof of work, only the first node to complete the proof can broadcast the block, so it is very difficult to compete and requires a high level of arithmetic, and if it does not succeed the arithmetic is spent for nothing (arithmetic costs money). If there is such arithmetic power as an honest node, it can be equally profitable (which is what miners do), and it reduces the possibility of nodes releasing fake blocks, and the whole system is more stable as a result.

Many have criticized the workload as proving a huge waste of electricity, prompting the exploration of new mechanisms for solving the consensus problem. The proof-of-stake mechanism (POS) is a proxy for this, and in the context of the Byzantine General problem, it likewise raises the cost of traitors, as accounts need to hold large balances in the first place to have a better chance of broadcasting blocks.

At the end of the day, the core of the consensus algorithm is to solve the Byzantine General problem.

Highly recommended!

China's first mining-ready blockchain-enabled education platform

15 million AFCCs to give away! Send! Send!

Source / Chicco Blockchain / By / Tiny Bear

Recommended>>
1、AI predicts human brain activity your thoughts are being spied on
2、Angular4 SpringCloud source code for enterprise level base functionality
3、LukeC The big guy breaks down his own gear to get out of the pit What made Big Brother make such a decision
4、The semirobotic age is expected to arrive when human bodies are replaced by machines
5、次旗舰全面屏vivoY75s玩转AI上手体验十分不错

已推荐到看一看 和朋友分享想法
最多200字，当前共 发送

已发送

确定
分享你的想法...
取消

确定
最多200字，当前共

发送中