Skip to content

Commit d2921cf

Browse files
committed
Do not propagate witness cache save failure
1 parent 8ac83ba commit d2921cf

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

scripts/prove/bin/multi.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,14 @@ async fn main() -> Result<()> {
6262

6363
// Save to cache if enabled
6464
if args.cache {
65-
let cache_path =
66-
save_stdin_to_cache(l2_chain_id, l2_start_block, l2_end_block, &stdin)?;
67-
info!("Saved stdin to cache: {}", cache_path.display());
65+
match save_stdin_to_cache(l2_chain_id, l2_start_block, l2_end_block, &stdin) {
66+
Ok(cache_path) => {
67+
info!("Saved stdin to cache: {}", cache_path.display());
68+
}
69+
Err(e) => {
70+
warn!("Failed to save stdin cache: {e}");
71+
}
72+
}
6873
}
6974

7075
Ok::<_, anyhow::Error>((stdin, duration))

scripts/utils/bin/cost_estimator.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ where
105105

106106
// Save SP1Stdin to cache
107107
if cache_enabled {
108-
if let Ok(cache_path) = save_stdin_to_cache(l2_chain_id, start, end, &stdin) {
109-
info!("Saved stdin to cache: {}", cache_path.display());
108+
match save_stdin_to_cache(l2_chain_id, start, end, &stdin) {
109+
Ok(cache_path) => {
110+
info!("Saved stdin to cache: {}", cache_path.display());
111+
}
112+
Err(e) => {
113+
log::warn!("Failed to save stdin cache for range {}-{}: {e}", start, end);
114+
}
110115
}
111116
}
112117

0 commit comments

Comments
 (0)