Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ describe('sequencer', () => {

expect(blockBuilder.buildBlock).not.toHaveBeenCalled();
expect(publisher.enqueueProposeL2Block).not.toHaveBeenCalled();
expect(publisher.canProposeAtNextEthBlock).not.toHaveBeenCalled();
});

it('does not publish a block if it does not have enough time left in the slot after collecting attestations', async () => {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/sequencer-client/src/sequencer/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ export class Sequencer extends (EventEmitter as new () => TypedEventEmitter<Sequ
return;
}

this.setState(SequencerState.PROPOSER_CHECK, undefined);

const chainTipArchive = syncedTo.archive;
const newBlockNumber = syncedTo.blockNumber + 1;

const { slot, ts, now } = this.epochCache.getEpochAndSlotInNextL1Slot();

this.setState(SequencerState.PROPOSER_CHECK, slot);

// Check that the archiver and dependencies have synced to the previous L1 slot at least
// TODO(#14766): Archiver reports L1 timestamp based on L1 blocks seen, which means that a missed L1 block will
// cause the archiver L1 timestamp to fall behind, and cause this sequencer to start processing one L1 slot later.
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/sequencer-client/src/sequencer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export type SequencerStateWithSlot =
| SequencerState.INITIALIZING_PROPOSAL
| SequencerState.CREATING_BLOCK
| SequencerState.COLLECTING_ATTESTATIONS
| SequencerState.PUBLISHING_BLOCK;
| SequencerState.PUBLISHING_BLOCK
| SequencerState.PROPOSER_CHECK;

export type SequencerStateCallback = () => SequencerState;

Expand Down
Loading