chaintope/tapyrus-signer

Broken round synchronous.

rantan opened this issue · 4 comments

I found a scenario which breaks round synchronous.

Scenario

Assumption

  • There are three signers A, B, and C.
  • B and C run with sync and A is stopped.
  • A gets back to run.
  • The order of round-robin is A→B→C.

Initial status

  • B and C are working in a round that the master of the round is A.
  • A is working in a round that the master of the round is C.

Execution result

  1. B, C's round is timeout. Then, they start a new round that master is B.
  2. A's round is timeout. Then, A starts a new round that master is A.
  3. B progress the round to the end with C. B broadcast completedblock message.
  4. B, C stats a new round that the master is C.
  5. A is sleeping. (In the current implementation, when the round that the node is master starts, the node is going to get to sleep for the round interval.)
  6. A awakes up. A progress the round to the end with B. A broadcast completedblock message.

After this, the block proof generation countiue with the broken round synchronous.

How to fix

  • Make tapyrus-siner stop getting into sleep when the round the node is master gets started.
  • Change the round master assumption when the node gets received key messages which relates round start and end like candidateblock, completedblock.

I have some questions.

  • What behavior is expected?
  • What does 'the broken round synchronous' mean?
  • What is 'the round master assumption'?

I have created a visualization for the scenario.

Tapyrus Note-39

@Yamaguchi

  • What behavior is expected?

I have 2 points.

  • Blocks should be going to be created with correct intervals.
  • All living nodes should be able to join each round. In the diagram, only two nodes can join each round because of sleeping one node.
  • What does 'the broken round synchronous' mean?

It is the status that is shown in the scenario visualization.

  • What is 'the round master assumption'?

I meant that it is master_index in NodeState.

I have created an issue #141 that proposes to update round initialization.

Can you check it and leave it some feedbacks. Thanks.