Skip to content

Commit

Permalink
Requested changes for PR #310
Browse files Browse the repository at this point in the history
- Renamed "CARGO_WORKSPACE_DIR" --> "ZK_EVM_WORKSPACE_DIR".
  • Loading branch information
BGluth committed Jul 9, 2024
1 parent 3df7730 commit 67535cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ rustflags = ["-Z", "linker-features=-lld"]

[env]
# If we're running in the project workspace, then we should set the workspace env var so we read/write to/from files relative to the workspace.
CARGO_WORKSPACE_DIR = { value = "", relative = true }
ZK_EVM_WORKSPACE_DIR = { value = "", relative = true }
4 changes: 2 additions & 2 deletions zero_bin/common/src/prover_state/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::{
const CIRCUITS_DIR: &str = "circuits/";
const PROVER_STATE_FILE_PREFIX: &str = "prover_state";
const VERIFIER_STATE_FILE_PREFIX: &str = "verifier_state";
const CARGO_WORKSPACE_DIR_ENV: &str = "CARGO_WORKSPACE_DIR";
const ZK_EVM_WORKSPACE_DIR_ENV: &str = "ZK_EVM_WORKSPACE_DIR";

fn get_serializers() -> (
DefaultGateSerializer,
Expand Down Expand Up @@ -281,7 +281,7 @@ fn prover_to_disk(
/// directory that lives in `tools/`. Otherwise, just use `circuits` in the
/// current directory.
fn relative_circuit_dir_path() -> String {
env::var(CARGO_WORKSPACE_DIR_ENV)
env::var(ZK_EVM_WORKSPACE_DIR_ENV)
.map(|p| format!("{}tools/{}", p, CIRCUITS_DIR))
.unwrap_or_else(|_| CIRCUITS_DIR.to_string())
}
2 changes: 1 addition & 1 deletion zero_bin/tools/prove_stdio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ VERIFY_OUT_PATH="${TOOLS_DIR}/verify.out"
TEST_OUT_PATH="${TOOLS_DIR}/test.out"

# Set the environment variable to let the binary know that we're running in the project workspace.
export CARGO_WORKSPACE_DIR="${TOOLS_DIR}/../"
export ZK_EVM_WORKSPACE_DIR="${TOOLS_DIR}/../"

# Configured Rayon and Tokio with rough defaults
export RAYON_NUM_THREADS=$num_procs
Expand Down

0 comments on commit 67535cc

Please sign in to comment.