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

Fix inconsistent online representatives list from RPC #2874

Conversation

guilhermelawless
Copy link
Contributor

This was reported in #2533 and @Srayman figured the problem lied in clearing the list of representatives on every sample.

Now, on sampling, a backup of the online reps is made, and the RPC will report both the backup reps and the ones currently sampling (so it can span a period between 5 and 10 minutes, depending on when it is triggered).

Online weight sampling is untouched.

Also fixes a bug affecting mostly the beta network which has a small ledger and low activity. When the hash chosen by the rep crawler query was recently confirmed, it would lead to the confirm_ack response being dismissed as a vote replay.

This minor change increases rep crawler and online reps consistency in small ledgers with low activity - mostly for the beta network.
…a RPC

The list of online reps is only used externally by RPC, but it has been noted that it is often inconsistent. This is due to clearing the list upon sampling online weight.

With this change, a backup is made on each sample, and RPC will now report the list of both currently sampling reps, and the ones previously sampled.
@guilhermelawless guilhermelawless added bug rpc Changes related to Remote Procedure Calls labels Aug 6, 2020
@guilhermelawless guilhermelawless added this to the V22.0 milestone Aug 6, 2020
@guilhermelawless guilhermelawless self-assigned this Aug 6, 2020
@guilhermelawless guilhermelawless merged commit 1c7e388 into nanocurrency:develop Sep 9, 2020
@guilhermelawless guilhermelawless deleted the online-reps-consistency branch September 9, 2020 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rpc Changes related to Remote Procedure Calls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants