Skip to content

Commit

Permalink
Merge 15af91d into fce550c
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Jul 20, 2023
2 parents fce550c + 15af91d commit 6b2e34b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/validator/src/services/attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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");

Expand Down
6 changes: 2 additions & 4 deletions packages/validator/src/services/syncCommittee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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");

Expand Down

0 comments on commit 6b2e34b

Please sign in to comment.