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

Tracked validators metric #14575

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Oct 23, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

introduces a new metric for current tracked validators on the beacon node. the accuracy of this is not 100% in this basic metric as the tracked validators cache is not pruned for removed validators that have not been consistently tracked.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have made an appropriate entry to CHANGELOG.md.
  • I have added a description to this PR with sufficient context for reviewers to understand this PR.

@james-prysm james-prysm requested a review from a team as a code owner October 23, 2024 20:45
Comment on lines +51 to +55
func (t *TrackedValidatorsCache) Size() int {
t.Lock()
defer t.Unlock()
return len(t.trackedValidators)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be beneficial to add a note directly to the code that the accuracy of this is not 100%?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does return the size of the cache, it's more that the metric might not be fully representative

@james-prysm james-prysm added the Blocked Blocked by research or external factors label Oct 25, 2024
@james-prysm
Copy link
Contributor Author

PR is in discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Blocked by research or external factors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants