Skip to content

Commit

Permalink
Fixed missing segment in circuit path
Browse files Browse the repository at this point in the history
- Was missing `zero_bin`.
- Also made the circuit directory error a bit more helpful (now also
  contains underlying IO error).
  • Loading branch information
BGluth committed Jul 10, 2024
1 parent 788cf3c commit 7a5e13f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions zero_bin/common/src/prover_state/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ pub(crate) trait DiskResource {

// Create the base folder if non-existent.
if std::fs::metadata(&circuits_dir).is_err() {
std::fs::create_dir(&circuits_dir).map_err(|_| {
DiskResourceError::IoError::<Self::Error>(std::io::Error::other(
format!("Could not create circuits folder at {}", circuits_dir),
))
std::fs::create_dir(&circuits_dir).map_err(|err| {
DiskResourceError::IoError::<Self::Error>(std::io::Error::other(format!(
"Could not create circuits folder at {} (err: {})", err,
circuits_dir
)))
})?;
}

Expand Down Expand Up @@ -282,6 +283,6 @@ fn prover_to_disk(
/// current directory.
fn relative_circuit_dir_path() -> String {
env::var(ZK_EVM_WORKSPACE_DIR_ENV)
.map(|p| format!("{}tools/{}", p, CIRCUITS_DIR))
.map(|p| format!("{}zero_bin/tools/{}", p, CIRCUITS_DIR))
.unwrap_or_else(|_| CIRCUITS_DIR.to_string())
}

0 comments on commit 7a5e13f

Please sign in to comment.