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
15 changes: 14 additions & 1 deletion crates/l2/sequencer/l1_committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,11 @@ impl GenServer for L1Committer {

// In the event that the current batch in L1 is greater than the one we have recorded we shouldn't send a new batch
if current_last_committed_batch > self.last_committed_batch {
info!(
l1_batch = current_last_committed_batch,
last_batch_registered = self.last_committed_batch,
"Committer was not aware of new L1 committed batches, updating internal state accordingly"
);
self.last_committed_batch = current_last_committed_batch;
self.last_committed_batch_timestamp = current_time;
self.schedule_commit(self.committer_wake_up_ms, handle.clone());
Expand All @@ -821,6 +826,14 @@ impl GenServer for L1Committer {
let commit_time: u128 = self.commit_time_ms.into();
let should_send_commitment =
current_time - self.last_committed_batch_timestamp > commit_time;

debug!(
last_committed_batch_at = self.last_committed_batch_timestamp,
will_send_commitment = should_send_commitment,
last_committed_batch = self.last_committed_batch,
"Committer woke up"
);

#[expect(clippy::collapsible_if)]
if should_send_commitment {
if self
Expand All @@ -834,7 +847,7 @@ impl GenServer for L1Committer {
}
}
}
self.schedule_commit(self.commit_time_ms, handle.clone());
self.schedule_commit(self.committer_wake_up_ms, handle.clone());
CastResponse::NoReply
}

Expand Down