Skip to content

Commit 9d9a48d

Browse files
committed
fix: Do not attempt proposer check if late into a slot
Do not bother checking if we are the current proposer in the sequencer if we won't have time to propose a block anyway. This should fix a flake in block-building e2e tests, where we were seeing `proposer-rollup-check-failed` errors.
1 parent 65e5a6b commit 9d9a48d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

yarn-project/sequencer-client/src/sequencer/sequencer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,11 @@ export class Sequencer extends (EventEmitter as new () => TypedEventEmitter<Sequ
508508
await this.doRealWork();
509509
} catch (err) {
510510
if (err instanceof SequencerTooSlowError) {
511-
this.log.warn(err.message);
511+
// Log as warn only if we had to abort halfway through the block proposal
512+
const logLvl = [SequencerState.INITIALIZING_PROPOSAL, SequencerState.PROPOSER_CHECK].includes(err.proposedState)
513+
? ('debug' as const)
514+
: ('warn' as const);
515+
this.log[logLvl](err.message, { now: this.dateProvider.nowInSeconds() });
512516
} else {
513517
// Re-throw other errors
514518
throw err;

yarn-project/sequencer-client/src/sequencer/timetable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export class SequencerTimetable {
141141
case SequencerState.STOPPED:
142142
case SequencerState.IDLE:
143143
case SequencerState.SYNCHRONIZING:
144-
case SequencerState.PROPOSER_CHECK:
145144
return; // We don't really care about times for this states
145+
case SequencerState.PROPOSER_CHECK:
146146
case SequencerState.INITIALIZING_PROPOSAL:
147147
return this.initializeDeadline;
148148
case SequencerState.CREATING_BLOCK:

0 commit comments

Comments
 (0)