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: handle uncaught exceptions when getting proposer duties #6073

Merged
merged 1 commit into from
Oct 31, 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
6 changes: 4 additions & 2 deletions packages/validator/src/services/blockDuties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export class BlockDutiesService {
const isLastSlotEpoch = computeStartSlotAtEpoch(nextEpoch) === currentSlot + 1;
if (isLastSlotEpoch) {
// no need to await for other steps, just poll proposers for next epoch
void this.pollBeaconProposersNextEpoch(currentSlot, nextEpoch, signal);
this.pollBeaconProposersNextEpoch(currentSlot, nextEpoch, signal).catch((e) => {
this.logger.error("Error on pollBeaconProposersNextEpoch", {}, e);
});
}

// Notify the block proposal service for any proposals that we have in our cache.
Expand Down Expand Up @@ -163,7 +165,7 @@ export class BlockDutiesService {
}

/**
* This is to avoid some delay on the first slot of the opoch when validators has proposal duties.
* This is to avoid some delay on the first slot of the epoch when validators have proposal duties.
* See https://github.com/ChainSafe/lodestar/issues/5792
*/
private async pollBeaconProposersNextEpoch(currentSlot: Slot, nextEpoch: Epoch, signal: AbortSignal): Promise<void> {
Expand Down