Skip to content

Commit

Permalink
feat(prover_cli): add general status for batch command (#1953)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
ColoCarletti authored May 20, 2024
1 parent a603ac8 commit 7b0df3b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions prover/prover_cli/src/commands/status/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7b0df3b

Please sign in to comment.