"Distributed consensus three" Byzantine general question----written agreement __ distributed

Source: Internet
Author: User

Written agreement

Lamport in the article, the reason why it will appear in the verbal communication of those mistakes is because some traitors can lie, here by signing is to prevent lying. Two conditions are added to the signature algorithm:


That is, A4 (a) the signature of a loyal general is not forged and content modification can be detected. (That is, even the traitor will be signed as the message forward)

(b) Any person may identify the general's signature, and the traitor May forge the signature of the traitor's commander. (The second half sentence is the latter part of the paper).

And here Lamport rules, each message can only be copied, and then add your own name and then send out.

The following are the specific algorithms:



For this algorithm to say is:

1. In the initialization of the Vi is similar to a set, which represents the first general received the order, such as vi= {Attack} is said to be a collection because Vi there will be no duplicate orders appear. This is clearly described in part (B) of the Algorithm step (2).

In the algorithm step (1) The general will broadcast the message of his name to all the deputies. Note that the format sent here is V:0,v is an order, 0 represents their identity.

2. Algorithm Step (2) (A), each aide will receive the message v:0 Put command V into your own command set VI (because their command set is empty at the beginning, so there is no duplication problem) then they copy the command and then add their own signature to get the message: V:0:i and then to the other lieutenants.

In algorithm step (2) (B) Because adjutant I will also receive a message from another aide v:0:1:...:jk. At this point I will judge V in not their own set of commands, if it does not exist will v to join VI, and in the case of K to sign the message, continue to send out.

Here are a few points to be aware of.

A If the general is loyal, so because the loyalty of the general's signature can not be changed, so all the orders are only V, but the signature of the message is not the same, then the aide will not repeat the order to add VI, so this is lamport in the paper mentioned if the general is loyal, Then each aide will only save a single order. The reason why this is mentioned here is that the following proofs need to be used.

B Why do you send when K, this is because each piece of information only need to be copied m+1 can be (here will be signed when the general is a signature, you can find that each signature is a copy of 1 times), more than M is not necessary. The reason for this is that the meeting will prove that only need to replicate m+1 all the loyalists can be reached

Consistent. There is the subscript k here, not on behalf of an aide's ID number, but the number of times signed, such as V:0:J3; This message, K, is equal to 1 (since only one signature was signed except the general) instead of 3.

3. Algorithm step (3), when an aide will not receive any messages will be executed choice function. No longer received here, the Lamport rule is that more than a period of time is no longer received. Here the choice function, Lamport did not do a specific implementation, just think, when the VI only one command to come to this command. When VI and VJ are equal, the result of choice execution is the same, that is, they can agree that this will only happen when the general is a traitor, so that the IC1 conditions are met.

When the third step is over, a unanimous order can be reached.

Let's take a look at how Lamport proves that only m+1 copies are needed.


The general idea of the proof is:

Situation (a) if the general is loyal, as we mentioned in the discussion of the algorithm, all the loyalist deputies can only receive a single order and then pass the choice function to get the command of the general, so meet the IC2.

situation (b) if the general is a traitor here. The general idea of proof is that only the VI,VJ is the same set. That is to prove that if I put the command V in VI in Step2, J will also put the command v into VJ.

Here's what we'll testify:

Because I want to put V command into VI, will certainly receive a message, V:0:J1:J2:...JK. So here's the discussion:

(1) If J belongs to one of the J1~JK, then if he has signed the message, he must have received the message V, so it is satisfied in this case.

(2) If J does not belong to one of the J1~JK, then discuss the scope of K:

A. If k then I must have countersigned his name, forward the message to all the deputies of course there's going to be a lieutenant. J (according to II of algorithm B), then J either saves him without V in the VJ of the command set, or ignores it in the circumstances, but either way, it guarantees that VJ and VI are consistent.

B. If k=m. I will not forward this message at this time. But because only m a traitor, and the general is a traitor, then this m+1 a copy there must be a loyal, and the loyal will not modify the message directly to the traitor General Message V to all the adjutant, of course, including J, so in this case can be guaranteed.

Now use an example to prove:

Fault tolerance (or exchange) can be completed when n=4,m=2 must undergo a m+1 wheel copy.

Examples show that: n=4,m=2,r=m+1 (r=3 number of copies) can be fault-tolerant

1, when the general, L3 is a traitor

step1:r1={x:0} r2={y:0} r3={0:0}

Step2:k=0;1 will send the x:0:1 to the 2,3;2 will send the y:0:2 to 1,3;3 to send the Z1:0:3 to 1, will send the Z2:0:3 to 2. Get:

R1={x:0;y:0:2;z1:0:3} r2={y:0;x:0:1 Z2:0:3} r3={0:0;x:0:1;y:0:2}

Step3:k=1,k for the next round of replication. 1 will send z1:0:3:1 to 2,3;2 will z2:0:3:2 to 1, 3. Get:

R1={x:0;y:0:2;z1:0:3 Z2:0:3:2} r2={y:0;x:0:1 z1:0:3 z2:0:3:1} k=2 algorithm executes the choice function.

The essence of a written agreement is the introduction of a signature system, which makes all messages available. This advantage, greatly saving the cost, he dissolved the verbal agreement of 1/3 requirements, as long as the adoption of a written agreement, loyal generals can achieve consistency (achieve IC1 and IC2). The effect is striking, and there is a clear flaw in the verbal agreement in comparison.

The conclusion of the written agreement was very exciting, and that was not the solution to the Byzantine general problem. But please note that we actually added some conditions to the A1~A4, which allowed the Byzantine general problem to be solved under these assumptions, but there are some problems in the real situation. To observe a1~a4, we do some assumptions that are difficult to complete in reality, such as the delay time of transmission information, the signature system of written protocol is difficult to implement, and the preservation of signature message record is difficult to escape from a central organization and exist independently.


Http://www.blockchainbrother.com/article/8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.