Skip to content

Commit 9839bf7

Browse files
committed
prover quit while proving process has panicked
1 parent bdf7826 commit 9839bf7

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/prover-bin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition.workspace = true
99
scroll-zkvm-types.workspace = true
1010
scroll-zkvm-prover.workspace = true
1111
libzkp = { path = "../libzkp"}
12-
scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "05648db" }
12+
scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "22ad34e" }
1313
serde.workspace = true
1414
serde_json.workspace = true
1515
once_cell.workspace =true

crates/prover-bin/src/prover.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,20 @@ impl ProvingService for LocalProver {
202202
error: Some(format!("proving task failed: {}", e)),
203203
..Default::default()
204204
},
205-
Err(e) => QueryTaskResponse {
206-
task_id: req.task_id,
207-
status: TaskStatus::Failed,
208-
error: Some(format!("proving task panicked: {}", e)),
209-
..Default::default()
210-
},
205+
Err(e) => {
206+
if e.is_panic() {
207+
// simply re-throw panic for any panicking in proving prrocess,
208+
// cause worker loop and the whole prover exit
209+
std::panic::resume_unwind(e.into_panic());
210+
}
211+
212+
QueryTaskResponse {
213+
task_id: req.task_id,
214+
status: TaskStatus::Failed,
215+
error: Some(format!("proving task panicked: {}", e)),
216+
..Default::default()
217+
}
218+
}
211219
};
212220
} else {
213221
return QueryTaskResponse {

0 commit comments

Comments
 (0)