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

Figure out validators weighting purpose, check compliance with C# implementation #512

Closed
roman-khimov opened this issue Nov 21, 2019 · 1 comment
Milestone

Comments

@roman-khimov
Copy link
Member

I think we can use mainnet data for tests, there are several changes of validators in the 2M-3M block range, one of which was found by @fyrchik: https://neoscan.io/block/2866503

We need to check whether our implementation in #508 would give the same result at this height (and others where the validators list was changed) and then add some real tests for it.

@roman-khimov roman-khimov added the network P2P layer label Nov 21, 2019
@roman-khimov roman-khimov added this to the v0.72.3 milestone Feb 12, 2020
@roman-khimov
Copy link
Member Author

Turns out, we're currently missing ValidatorsCount structure in our implementation and mis-using this weighting function. It's made to select the number of current validators based on the voting information involving this number of validators (like account X votes for 3 validators, all of its votes go into the bin number 3, account Y votes for 5 validators, its votes go into the '5' bin).

roman-khimov added a commit that referenced this issue Feb 12, 2020
We were completely lacking ValidatorsCount that is supposed to track the
number of votes with particular count of consensus nodes which in theory can
change the number of active consensus nodes (if it ever to exceed the number
of standby validators), so we were not producing the right count and based on
that not giving the right set of validators.

Fixes #512.
roman-khimov added a commit that referenced this issue Feb 12, 2020
We were completely lacking ValidatorsCount that is supposed to track the
number of votes with particular count of consensus nodes which in theory can
change the number of active consensus nodes (if it ever to exceed the number
of standby validators), so we were not producing the right count and based on
that not giving the right set of validators.

Fixes #512.
roman-khimov added a commit that referenced this issue Feb 12, 2020
We were completely lacking ValidatorsCount that is supposed to track the
number of votes with particular count of consensus nodes which in theory can
change the number of active consensus nodes (if it ever to exceed the number
of standby validators), so we were not producing the right count and based on
that not giving the right set of validators.

Fixes #512.
roman-khimov added a commit that referenced this issue Feb 12, 2020
We were completely lacking ValidatorsCount that is supposed to track the
number of votes with particular count of consensus nodes which in theory can
change the number of active consensus nodes (if it ever to exceed the number
of standby validators), so we were not producing the right count and based on
that not giving the right set of validators.

Fixes #512.
@roman-khimov roman-khimov modified the milestones: v0.72.3, v0.73.0 Feb 16, 2020
@roman-khimov roman-khimov removed the network P2P layer label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant