diff --git a/packages/beacon-node/src/api/impl/validator/index.ts b/packages/beacon-node/src/api/impl/validator/index.ts index 9c5e6c2987f1..1fccf083070c 100644 --- a/packages/beacon-node/src/api/impl/validator/index.ts +++ b/packages/beacon-node/src/api/impl/validator/index.ts @@ -957,6 +957,8 @@ export function getValidatorApi( break; case stateEpoch + 1: + // make sure shuffling is calculated and ready for next call to calculate nextProposers + await chain.shufflingCache.get(state.epochCtx.nextEpoch, state.epochCtx.nextDecisionRoot); // Requesting duties for next epoch is allowed since they can be predicted with high probabilities. // @see `epochCtx.getBeaconProposersNextEpoch` JSDocs for rationale. indexes = state.epochCtx.getBeaconProposersNextEpoch(); diff --git a/packages/state-transition/src/cache/epochCache.ts b/packages/state-transition/src/cache/epochCache.ts index 4eb16fa49927..5601162b2c2a 100644 --- a/packages/state-transition/src/cache/epochCache.ts +++ b/packages/state-transition/src/cache/epochCache.ts @@ -921,7 +921,7 @@ export class EpochCache { getBeaconProposersNextEpoch(): ValidatorIndex[] { if (!this.proposersNextEpoch.computed) { const indexes = computeProposers( - this.config.getForkSeqAtEpoch(this.epoch + 1), + this.config.getForkSeqAtEpoch(this.nextEpoch), this.proposersNextEpoch.seed, this.getShufflingAtEpoch(this.nextEpoch), this.effectiveBalanceIncrements