diff --git a/README.md b/README.md index dae080dc..95085b2f 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,20 @@ Look into `prove-block.sh` for the available options or run the script without i ./script/prove-block.sh taiko_a7 native sync ``` +### Task Management +The script `prove-block.sh` always sends a POST request to Raiko server and enqueue a proving task. If you repeately send the same request, it will pull the latest status of the task and return the proof if ready. +To check the progress of all tasks: + +```shell + curl --location --request POST 'http://localhost:8080/proof/report' +``` + +To prune all tasks (the cancellation feature that kills prover is still WIP): + +```shell + curl --location --request POST 'http://localhost:8080/proof/prune' +``` + ## Provers For all host programs, you can enable CPU optimization through exporting `CPU_OPT=1`. diff --git a/tasks/src/mem_db.rs b/tasks/src/mem_db.rs index 146b54cb..f0496d3b 100644 --- a/tasks/src/mem_db.rs +++ b/tasks/src/mem_db.rs @@ -136,8 +136,9 @@ impl InMemoryTaskDb { .enqueue_task .iter() .flat_map(|(descriptor, statuses)| { + // Return the latest status statuses - .iter() + .last() .map(|status| TaskReport(descriptor.clone(), status.0)) }) .collect())