Skip to main content

"validatorCount" is number earning rewards on the first day of the "granularity"?

The "validatorCount" you return always gives the number of validators that did earn rewards on the first day of the "granularity" (e.g. "week/month"), correct?
When doing some calculations for periods where the number changed during the week, this led to some confusion at first.
https://api.rated.network/v1/eth/sets/SETID/proposals?fromDate=2024-06-03&toDate=2024-08-15&granularity=week&limit=100&offset=0
Internally, we are now resorting to an “"avg" number of reward- earning vals" if we are comparing different groups. Obviously this also has drawbacks like not being integer etc.

Status: Completed2 comments

Log in to comment and vote

Comments2

  • Robert Tiong

    •

    Sep 12, 2024

    Hi @Freddy-from-Germany! Responding to both your post and your first comment.

    The way we count validators for a day is based on whether they were active for the day (i.e. they were assigned an attestation duty or proposal duty). For the period, the count we return from the endpoint you shared is based on the highest amount of validators counted for that specific entity on any given day within that period. It does not matter if it is the first day or the last day; we take the highest count across all the days and use that value for the period.

    Hopefully this clarifies but do let me know if you have further questions.

  • Freddy-from-Germany

    •

    Sep 10, 2024

    And by specifying "reward-earning" we avoid confusion with regards to validator status, as we would include validators that are in onchain status active_ongoing and active_exiting (=earning rewards while in exit queue), which correspond e.g. to Prysm status "3-active" and "4-exiting". That is the way you'd also count the validators in a certain period?