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

Only log error when aggregator check fails #14046

Merged
merged 3 commits into from
May 27, 2024
Merged

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented May 24, 2024

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.

@rkapka rkapka added Ready For Review A pull request ready for code review Validator Client labels May 24, 2024
@rkapka rkapka marked this pull request as ready for review May 24, 2024 09:54
@rkapka rkapka requested a review from a team as a code owner May 24, 2024 09:54
@rkapka rkapka requested review from kasey, saolyn and terencechain May 24, 2024 09:54
@@ -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")
Copy link
Contributor

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

Suggested change
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")

@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Suggested change
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")

@rkapka rkapka enabled auto-merge May 27, 2024 13:55
Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

LGTM

@rkapka rkapka added this pull request to the merge queue May 27, 2024
Merged via the queue into develop with commit 2f2152e May 27, 2024
17 checks passed
@rkapka rkapka deleted the aggregator-role-log branch May 27, 2024 18:12
prestonvanloon pushed a commit that referenced this pull request May 31, 2024
* Only log error when aggregator check fails

* review

(cherry picked from commit 2f2152e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review Validator Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants