From 2f28718a17416c68d401c808fb9d737571fd2a87 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Mon, 24 Jul 2023 18:57:15 +0200 Subject: [PATCH] refactor: update distributed aggregation selection error logs (#5780) --- packages/validator/src/services/attestation.ts | 6 ++---- packages/validator/src/services/syncCommittee.ts | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/validator/src/services/attestation.ts b/packages/validator/src/services/attestation.ts index b5bd851760fd..f954a9d2d0d5 100644 --- a/packages/validator/src/services/attestation.ts +++ b/packages/validator/src/services/attestation.ts @@ -322,9 +322,7 @@ export class AttestationService { this.logger.debug("Submitting partial beacon committee selection proofs", {slot, count: partialSelections.length}); const res = await Promise.race([ - this.api.validator - .submitBeaconCommitteeSelections(partialSelections) - .catch((e) => this.logger.error("Error on submitBeaconCommitteeSelections", {slot}, e)), + this.api.validator.submitBeaconCommitteeSelections(partialSelections), // Exit attestation aggregation flow if there is no response after 1/3 of slot as // beacon node would likely not have enough time to prepare an aggregate attestation. // Note that the aggregations flow is not explicitly exited but rather will be skipped @@ -334,7 +332,7 @@ export class AttestationService { ]); if (!res) { - throw new Error("submitBeaconCommitteeSelections did not resolve after 1/3 of slot"); + throw new Error("Failed to receive combined selection proofs before 1/3 of slot"); } ApiError.assert(res, "Error receiving combined selection proofs"); diff --git a/packages/validator/src/services/syncCommittee.ts b/packages/validator/src/services/syncCommittee.ts index adbda3231697..9f104e0d7d4b 100644 --- a/packages/validator/src/services/syncCommittee.ts +++ b/packages/validator/src/services/syncCommittee.ts @@ -261,9 +261,7 @@ export class SyncCommitteeService { this.logger.debug("Submitting partial sync committee selection proofs", {slot, count: partialSelections.length}); const res = await Promise.race([ - this.api.validator - .submitSyncCommitteeSelections(partialSelections) - .catch((e) => this.logger.error("Error on submitSyncCommitteeSelections", {slot}, e)), + this.api.validator.submitSyncCommitteeSelections(partialSelections), // Exit sync committee contributions flow if there is no response after 2/3 of slot. // This is in contrast to attestations aggregations flow which is already exited at 1/3 of the slot // because for sync committee is not required to resubscribe to subnets as beacon node will assume @@ -275,7 +273,7 @@ export class SyncCommitteeService { ]); if (!res) { - throw new Error("submitSyncCommitteeSelections did not resolve after 2/3 of slot"); + throw new Error("Failed to receive combined selection proofs before 2/3 of slot"); } ApiError.assert(res, "Error receiving combined selection proofs");