Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Merged by Bors] - Reduce bandwidth over the VC<>BN API using dependant roots #4170
[Merged by Bors] - Reduce bandwidth over the VC<>BN API using dependant roots #4170
Changes from 5 commits
9e47bed
d905e8b
9cc8783
fa3c67a
a107882
1f56417
c120108
16797e0
7d6c042
cfaab2d
ab22458
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the (hypothetical) case where
INITIAL_DUTIES_QUERY_SIZE == 2
anduninitialized_validators == 1
I think we could fail to initialize that one uninitialized validator in the first call.To avoid this, I think we'd want something like:
My suggestion removes the guarantee that we'll always request
INITIAL_DUTIES_QUERY_SIZE
validators, but it does ensure that we always query for all uninitialized validators. I think it's probably OK to sometimes query for less thanINITIAL_DUTIES_QUERY_SIZE
, especially since we current have it set to1
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make sure we run
update_per_validator_duty_metrics
so that we start reporting the next-epoch duties as thecurrent_slot
progresses past the current-epoch slot.Since we've changed
update_per_validator_duty_metrics
, perhaps it makes sense to hoist it up intopoll_beacon_attesters
(perhaps after each call topoll_beacon_attesters_for_epoch
in here)? That way we can exit this whenever we like and still be confident thatupdate_per_validator_duty_metrics
is being called.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch 🙏 , I've moved this to where you suggested!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we were running this function for all duties and now we're only running it for new duties. I think that might pose a problem where we don't update the metrics to show the next epoch duties, once that next epoch arrives (assuming they haven't changed since the previous epoch).
I think we could solve this by iterating over
duties_service.attesters
instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, didn't think about this scenario! Will push a fix.