diff --git a/packages/validator/src/services/proposerPreferences.ts b/packages/validator/src/services/proposerPreferences.ts index 0c400a3bcb5c..29e161754156 100644 --- a/packages/validator/src/services/proposerPreferences.ts +++ b/packages/validator/src/services/proposerPreferences.ts @@ -29,7 +29,10 @@ type SubmittedAtEpoch = {dependentRoot: RootHex; slots: Set}; * dependent root for an epoch shifts (e.g. after a reorg) — detected by comparing the cached * `dependentRoot` reported by `BlockDutiesService` against the one we last submitted under. * - * No-op pre-gloas. + * Proposers should broadcast their preferences before the fork so the proposer preference caches + * of beacon nodes and builders are warm for the first Gloas slots. We start submitting + * as soon as a duty's proposal slot is in Gloas, which is up to `SUBMIT_BEFORE_PROPOSAL_SLOTS` + * before the fork, so only the first few Gloas slots are affected by this pre-fork submission. */ export class ProposerPreferencesService { private readonly submitted = new Map(); @@ -47,7 +50,10 @@ export class ProposerPreferencesService { } private runProposerPreferencesTask = async (slot: Slot): Promise => { - if (!isForkPostGloas(this.config.getForkName(slot))) { + // Start running once the submission window (`slot + SUBMIT_BEFORE_PROPOSAL_SLOTS`) reaches + // Gloas, i.e. already in the epoch before the fork. This allows builders to prepare and + // submit bids for the first Gloas slots. + if (!isForkPostGloas(this.config.getForkName(slot + SUBMIT_BEFORE_PROPOSAL_SLOTS))) { return; } @@ -82,6 +88,7 @@ export class ProposerPreferencesService { for (const duty of dutiesAtEpoch.data) { if (duty.slot <= slot) continue; if (duty.slot > slot + SUBMIT_BEFORE_PROPOSAL_SLOTS) continue; + if (!isForkPostGloas(this.config.getForkName(duty.slot))) continue; if (submission.slots.has(duty.slot)) continue; try {