-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Only log error when aggregator check fails #14046
Conversation
validator/client/validator.go
Outdated
@@ -705,7 +705,8 @@ func (v *validator) RolesAt(ctx context.Context, slot primitives.Slot) (map[[fie | |||
|
|||
aggregator, err := v.isAggregator(ctx, duty.Committee, slot, bytesutil.ToBytes48(duty.PublicKey), duty.ValidatorIndex) | |||
if err != nil { | |||
return nil, errors.Wrap(err, "could not check if a validator is an aggregator") | |||
aggregator = false | |||
log.WithError(err).Error("Could not check if a validator is an aggregator") |
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.
Tiny nit since it's checking a specific validator
log.WithError(err).Error("Could not check if a validator is an aggregator") | |
log.WithError(err).Error("Could not check if the validator is an aggregator") |
validator/client/validator.go
Outdated
@@ -730,7 +731,8 @@ func (v *validator) RolesAt(ctx context.Context, slot primitives.Slot) (map[[fie | |||
if inSyncCommittee { | |||
aggregator, err := v.isSyncCommitteeAggregator(ctx, slot, bytesutil.ToBytes48(duty.PublicKey), duty.ValidatorIndex) | |||
if err != nil { | |||
return nil, errors.Wrap(err, "could not check if a validator is a sync committee aggregator") | |||
aggregator = false | |||
log.WithError(err).Error("Could not check if a validator is a sync committee aggregator") |
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.
Same
log.WithError(err).Error("Could not check if a validator is a sync committee aggregator") | |
log.WithError(err).Error("Could not check if the validator is a sync committee aggregator") |
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
* Only log error when aggregator check fails * review (cherry picked from commit 2f2152e)
What type of PR is this?
Other
What does this PR do? Why is it needed?
If for whatever reason we are unable to check if the validator is an aggregator, instead of failing and not assigning any roles we should assume the validator is not an aggregator, log the error and continue. That way the validator will be able to get other rewards for the slot.