Skip to content
Merged
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
7 changes: 6 additions & 1 deletion yarn-project/end-to-end/src/fixtures/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,14 @@ export async function setup(
if (enableAutomine) {
await ethCheatCodes.setAutomine(false);
await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
dateProvider.setTime((await ethCheatCodes.timestamp()) * 1000);
}

// Always sync dateProvider to L1 time after deploying L1 contracts, regardless of mining mode.
// In compose mode, L1 time may have drifted ahead of system time due to the local-network watcher
// warping time forward on each filled slot. Without this sync, the sequencer computes the wrong
// slot from its dateProvider and cannot propose blocks.
dateProvider.setTime((await ethCheatCodes.timestamp()) * 1000);

if (opts.l2StartTime) {
await ethCheatCodes.warp(opts.l2StartTime, { resetBlockInterval: true });
}
Expand Down
Loading