Skip to content

Commit

Permalink
Log submit selections error if thrown after cutoff slot time
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Apr 7, 2023
1 parent cd181bf commit d76bf7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/validator/src/services/attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ 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),
this.api.validator
.submitBeaconCommitteeSelections(partialSelections)
.catch((e) => this.logger.error("Error on submitBeaconCommitteeSelections", {slot}, e)),
// 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 Down
4 changes: 3 additions & 1 deletion packages/validator/src/services/syncCommittee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ 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),
this.api.validator
.submitSyncCommitteeSelections(partialSelections)
.catch((e) => this.logger.error("Error on submitSyncCommitteeSelections", {slot}, e)),
// 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 Down

0 comments on commit d76bf7b

Please sign in to comment.