The article has the best possible explanation I can come up with.

I know it is complicated and difficult to understand.

I suggest you compile the code and run it for a few different cases to convince yourself that it is working properly.

- Mark

]]>Nice to meet you.

I am Shu Zheng a student in software engineering. I have trouble in understanding the om algorithm in paper 《The Byzantine Generals Problem》, which is also the subject of this article.

But I can’t fully understand your article too. Maybe I am not clever enough.

This algorithm is driving me mad. Can you help me?

This article said

”

Calculating the output values is a three step process:

1.Each leaf node in the tree (all values at rank m) copies its input value to the output value.

”

But in Lamport’s Algorithm Definition

”

For each i, and each j ≠ i, let vi be the value lieutenant i received from lieutenant j in step 2 (using Algorithm (m-1)). Lieutenant i uses the value majority (v1, v2, … vn).

”

It means the output result comes from other lieutenant during step2.

But in your article you simple copy the input to output.

I don’t think it right.

Can you help me?

Thank you so much.

]]>If all the generals had good information at that point, then a simple majority would work. You know that a majority of the lieutenants are honest, so this should work.

However, some number of lieutentants have bad information at that point. Either bad information from the general himself, who may be dishonest, or from other dishonest lieutenants.

There can be a large enough number of dishonest lieutenants so that they swing the early votes the wrong way. You can work this out pretty easily.

- Mark

]]>This can be a confusing algorithm, no doubt about it.

Why are there m+1 iterations? Because Lamport proved that his algorithm was correct after m+1 iterations. If there are m faulty processes and the algorithm were only to go through m iterations, it would be possible to have an incorrect result.

The proof of this is something you need to get from the original paper – this blog post is about implementation.

I only have one specific example in this article, it follow the heading “A More Complicated Example.” The examples before it could be for an instance in which the maximum number of faulty processes was 2 and the the total number of processes is 7, but I didn’t work that part out completely.

The example in “A More Complicated Example” is a very specific example of the message flow that occurs when n is 7 and m is 2.

- Mark

]]>and in your first example. you pick m=1 and you did 3 iterations ?

In the first round, the message from general to all soldiers. In second round each soldier sent 6 messages including himself . and then last round where you told that each will send 36 messages.

can you explain me why 3 iterations because it should have 2 iterations according to rule m+1 ?

thanks ]]>

The lack of examples for N > 4 and an apparent counter-example I came up with where I was able to reach agreement with N = 6 and F = 2 with a simple majority algorithm were leaving me perplexed as to why one would need 3F + 1 nodes to reach agreement.

This part, in particular: “a subversive source process with one collaborator can cause half the processes to choose to attack, while half the processes elect to retreat, leading to maximum confusion” was mind-opening. I had forgotten to test a faulty commander with N = 6 and M = 2 and considering that case I can indeed reach a non-agreement state using the simple majority algorithm. In fact, I can also reach such a non-agreement state with N = 7 (due to even N – 2, we can have half of the N – 2 saying 0 and the other half saying 1).

From what I figure, in order to being able to get a majority for that case, Lamport’s algorithm has the side-effect of not being able to obtain agreement in N = 6, M = 2 with non-faulty commander where the simple majority algorithm works.

Thank you once again for your detailed analysis and explanation :)

]]>The field is moving so quickly that research articles and wikis are probably more important than books at this point. The bitcoin protocol is built using well-known cryptographic primitives so the specific advance was more related to the distributed na…

]]>