poanetwork / poa-ballot-stats

Read POA voting records and rank voters by how many ballots they missed.
GNU Lesser General Public License v3.0
7 stars 6 forks source link

Accurately compute the set of validators at any given block. #16

Closed afck closed 6 years ago

afck commented 6 years ago

The current implementation estimates the set of validators based on InitializeChange events, which is sometimes wrong because those don't necessarily get finalized and if they do, it's only in some later block. Unfortunately we don't have ChangeFinalized in the logs.

If the node runs with --pruning=archive, it would be possible to use the contract states at any given point, and call the contract methods to retrieve the validators. However, that would mean that the tool would stop working with https://sokol.poa.network and https://core.poa.network (https://core-trace.poa.network and https://sokol-trace.poa.network could be used instead, though).

afck commented 6 years ago

@igorbarinov: Is it okay to sacrifice compatibility with https://sokol.poa.network and https://core.poa.network for accurate membership data?

igorbarinov commented 6 years ago

@afck yes, let's specify that the requirement is to query a trace node @phahulin what is the launch string for the trace node? to include it into the document

phahulin commented 6 years ago

In this case, as I understand, traces are not required actually, just --pruning=archive cli option should suffice