Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect ViewChange messages consensus calculating #1506

Open
Toktar opened this issue Jan 22, 2021 · 1 comment
Open

Incorrect ViewChange messages consensus calculating #1506

Toktar opened this issue Jan 22, 2021 · 1 comment

Comments

@Toktar
Copy link
Contributor

Toktar commented Jan 22, 2021

The simulation test for ViewChange sometimes fails

def test_new_view_combinations(random):

because of problem with getting a checkpoint on the phase of collecting ViewChange messages in the method calc_checkpoint(). It receives a list of ViewChange messages like a parameter.
If it's a 4 node pool and the list contains the follow ViewChange messages

  • ViewChange_1 | checkpoints_ends: 10, 20 | stable_checkpoint: 10
  • ViewChange_2 | checkpoints_ends: 0, 10 | stable_checkpoint: 0
  • ViewChange_2 | checkpoints_ends: 0 | stable_checkpoint: 0

Then we don't have a strong consensus of 3 (n-f=4-1) checkpoins with the same checkpoint end. It means, that the node can't finish a view change.

Expected problem: Low probability one or more nodes may not finish View Change and after a short period just start a new one.
With an incredibly low probability a pool can freeze with endless view changes. But it can be fixed by POOL_RESTART transaction.

We don’t think we have a big chance to face this case. But we need to remember about it and fix.

@Toktar Toktar changed the title ViewChange consensus protocol problem Incorrect ViewChange messages consensus calculating Jan 22, 2021
Toktar pushed a commit to Toktar/indy-plenum that referenced this issue Feb 26, 2021
Toktar pushed a commit to Toktar/indy-plenum that referenced this issue Mar 1, 2021
Toktar pushed a commit to Toktar/indy-plenum that referenced this issue Mar 1, 2021
Toktar pushed a commit to Toktar/indy-plenum that referenced this issue Mar 15, 2021
Toktar pushed a commit to Toktar/indy-plenum that referenced this issue Mar 24, 2021
@WadeBarnes
Copy link
Member

WadeBarnes commented Mar 24, 2021

When addressing this issue, please ensure any workarounds such as this are addressed;

cp = pool.nodes[0]._view_changer._new_view_builder.calc_checkpoint(votes)
# In some cases checkpoints can't be collected. Uncomment this after fixing issue #1506
# assert cp is not None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants