Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: oldest unpicked batch #692

Merged
merged 12 commits into from
Jan 10, 2024
16 changes: 13 additions & 3 deletions core/lib/zksync_core/src/house_keeper/fri_prover_queue_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,23 @@ impl PeriodicJob for FriProverStatsReporter {

let mut db_conn = self.db_connection_pool.access_storage().await.unwrap();

if let Some(l1_batch_number) = db_conn
let oldest_unpicked_batch = match db_conn
.proof_generation_dal()
.get_oldest_unpicked_batch()
.await
{
metrics::gauge!("fri_prover.oldest_unpicked_batch", l1_batch_number.0 as f64)
}
Some(l1_batch_number) => l1_batch_number.0 as f64,
// if there is no unpicked batch in database, we use sealed batch number as a result
None => {
db_conn
.blocks_dal()
.get_sealed_l1_batch_number()
.await
.unwrap()
.0 as f64
}
};
metrics::gauge!("fri_prover.oldest_unpicked_batch", oldest_unpicked_batch);
Artemka374 marked this conversation as resolved.
Show resolved Hide resolved

if let Some(l1_batch_number) = db_conn
.proof_generation_dal()
Expand Down
Loading