-
Notifications
You must be signed in to change notification settings - Fork 747
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
Reduce load on validator subscription channels #5311
Conversation
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.
Yeah nice. Reducing messages ftw
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.
LGTM
@michaelsproul Can we roll this in with #5305 ? |
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.
Looks good with the BTreeSet
tweak!
Happy to merge and continue testing on infra over the weekend
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 84a902a |
Issue Addressed
N/A
Proposed Changes
Since we now only subscribe to a fixed number of long lived subnets per node, the
validator_index
field inValidatorSubscription
type is entirely inconsequential to the beacon node.This PR does 2 things:
validator_index
field from theValidatorSubscription
type. This allows us to filter duplicates which can be quite a lot in high validator count setups.I'm not completely sure at what size of the vector we'll start seeing slowness in the channel, but by filtering duplicates, we shouldn't be sending too many.
Max length of the vector would be
max_committees_per_slot * slots_per_epoch * 2(aggregator bit) = 4096
.Not super attached to this change, but if we send one by one, then we should probably change the
ValidatorSubscriptionMessage
to take just a single message instead of a vector for consistency.