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

add metric for validator balance #981

Closed
xenowits opened this issue Aug 16, 2022 · 1 comment · Fixed by #1051
Closed

add metric for validator balance #981

xenowits opened this issue Aug 16, 2022 · 1 comment · Fixed by #1051
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@xenowits
Copy link
Contributor

xenowits commented Aug 16, 2022

Problem to be solved

Periodically calculate validator_balance metric for all validators in charon.

Effectiveness is calculated as follows:

total_balance = [GET /eth/v1/beacon/states/{state_id}/validator_balances].data[0].balance

Proposed solution

  • Scheduler already fetches validators every epoch
  • add a instrumentValidator function to scheduler.resolveActiveValidators after the IsActive check.
  • Set a core_scheduler_validator_effective_balance_gwei[pubkey] gauge

Note that this is a potential high cardinality metric.

Out of Scope

None

@corverroos corverroos added enhancement New feature or request good first issue Good for newcomers labels Aug 17, 2022
@xenowits
Copy link
Contributor Author

@dB2510 dB2510 linked a pull request Aug 29, 2022 that will close this issue
@dB2510 dB2510 changed the title add metric for validator effectiveness add metric for validator balance Aug 29, 2022
obol-bulldozer bot pushed a commit that referenced this issue Aug 29, 2022
Adds validator balance metric in scheduler.

category: misc
ticket: #981
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants