From 7b0df3b22f04f1fdead308ec30572f565b34dd5c Mon Sep 17 00:00:00 2001 From: Joaquin Carletti <56092489+ColoCarletti@users.noreply.github.com> Date: Mon, 20 May 2024 11:37:08 -0300 Subject: [PATCH] feat(prover_cli): add general status for batch command (#1953) This PR adds a check to the batch status command to show that a batch does not exist or that the proving process for it has already finished. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`. --- prover/prover_cli/src/commands/status/batch.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/prover/prover_cli/src/commands/status/batch.rs b/prover/prover_cli/src/commands/status/batch.rs index 389437f17ac..6f52170444a 100644 --- a/prover/prover_cli/src/commands/status/batch.rs +++ b/prover/prover_cli/src/commands/status/batch.rs @@ -35,6 +35,22 @@ pub(crate) async fn run(args: Args, config: ProverCLIConfig) -> anyhow::Result<( "== {} ==", format!("Batch {} Status", batch_data.batch_number).bold() ); + + if let Status::Custom(msg) = batch_data.compressor.witness_generator_jobs_status() { + if msg.contains("Sent to server") { + println!("> Proof sent to server ✅"); + return Ok(()); + } + } + + let basic_witness_generator_status = batch_data + .basic_witness_generator + .witness_generator_jobs_status(); + if matches!(basic_witness_generator_status, Status::JobsNotFound) { + println!("> No batch found. 🚫"); + return Ok(()); + } + if !args.verbose { display_batch_status(batch_data); } else {