Skip to content

Commit ea68532

Browse files
fix(prover): Propagating errors for CP & Compressor (#4288)
## What ❔ Fix for error propagating for CP & Compressor. We need run_inner for instant cancelling all the operations upon receiving SIGTERM <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ Errors weren't propagating from tokio::select! <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent 8302a81 commit ea68532

File tree

2 files changed

+6
-2
lines changed
  • prover/crates/bin

2 files changed

+6
-2
lines changed

prover/crates/bin/circuit_prover/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ async fn main() -> anyhow::Result<()> {
7575
let (metrics_stop_sender, metrics_stop_receiver) = tokio::sync::watch::channel(false);
7676

7777
tokio::select! {
78-
_ = run_inner(cancellation_token.clone(), metrics_stop_receiver, &mut managed_tasks) => {},
78+
res = run_inner(cancellation_token.clone(), metrics_stop_receiver, &mut managed_tasks) => {
79+
res?
80+
},
7981
_ = stop_signal_receiver => {
8082
tracing::info!("Stop request received, shutting down");
8183
}

prover/crates/bin/proof_fri_compressor/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ async fn main() -> anyhow::Result<()> {
6363
let (metrics_stop_sender, metrics_stop_receiver) = tokio::sync::watch::channel(false);
6464

6565
tokio::select! {
66-
_ = run_inner(cancellation_token.clone(), metrics_stop_receiver, &mut managed_tasks) => {},
66+
res = run_inner(cancellation_token.clone(), metrics_stop_receiver, &mut managed_tasks) => {
67+
res?
68+
},
6769
_ = stop_signal_receiver => {
6870
tracing::info!("Stop request received, shutting down");
6971
}

0 commit comments

Comments
 (0)