From f56c34cdf1c09b33cc1067cd3dba6495fa0050e5 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 29 Oct 2025 12:57:55 -0300 Subject: [PATCH] fix: Check if slot is taken after proposer check in sequencer Otherwise we would continuously warn that we cant propose since the slot was taken by someone else. This check needs to happen AFTER the proposer check passes. --- .../src/sequencer/sequencer.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.ts index 85750a274677..1b19d891e0e3 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.ts @@ -284,15 +284,6 @@ export class Sequencer extends (EventEmitter as new () => TypedEventEmitter= slot) { - this.log.warn( - `Cannot propose block at next L2 slot ${slot} since that slot was taken by block ${syncedTo.blockNumber}`, - { ...syncLogData, block: syncedTo.block.header.toInspect() }, - ); - return; - } - // Check that we are a proposer for the next slot this.setState(SequencerState.PROPOSER_CHECK, slot); const [canPropose, proposer] = await this.checkCanPropose(slot); @@ -303,6 +294,15 @@ export class Sequencer extends (EventEmitter as new () => TypedEventEmitter= slot) { + this.log.warn( + `Cannot propose block at next L2 slot ${slot} since that slot was taken by block ${syncedTo.blockNumber}`, + { ...syncLogData, block: syncedTo.block.header.toInspect() }, + ); + return; + } + // We now need to get ourselves a publisher. // The returned attestor will be the one we provided if we provided one. // Otherwise it will be a valid attestor for the returned publisher.