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

fix(validator): improve error handling in attestation service #5511

Merged
merged 2 commits into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/validator/src/services/attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,18 @@ export class AttestationService {
await Promise.all(
Array.from(dutiesByCommitteeIndex.entries()).map(([index, duties]) =>
this.runAttestationTasksPerCommittee(duties, slot, index, signal).catch((e) => {
this.logger.error("Error on attestation routine", {slot, index}, e);
this.logger.error("Error on committee attestation routine", {slot, index}, e);
})
)
);
} else {
// Beacon node's endpoint produceAttestationData return data is not dependant on committeeIndex.
// Produce a single attestation for all committees and submit unaggregated attestations in one go.
await this.runAttestationTasksGrouped(duties, slot, signal);
try {
await this.runAttestationTasksGrouped(duties, slot, signal);
} catch (e) {
this.logger.error("Error on attestation routine", {slot}, e as Error);
}
}
};

Expand Down