Skip to content

Commit

Permalink
Fix reproducible guest build (#1713)
Browse files Browse the repository at this point in the history
  • Loading branch information
exeokan authored Jan 16, 2025
1 parent 9dd9b41 commit 1265a26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/run-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Compile Citrea by running command:
cargo build --release
```

If you wish to verify ZK-Proofs, add `REPR_GUEST_BUILD=1` before `cargo b...`
If you wish to verify ZK-Proofs, add `REPR_GUEST_BUILD_LATEST=1` before `cargo b...`

#### Step 2.4: Run Citrea

Expand Down
6 changes: 3 additions & 3 deletions guests/risc0/batch-proof/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use risc0_build::{embed_methods_with_options, DockerOptions, GuestOptions};
fn main() {
// Build environment variables
println!("cargo:rerun-if-env-changed=SKIP_GUEST_BUILD");
println!("cargo:rerun-if-env-changed=REPR_GUEST_BUILD");
println!("cargo:rerun-if-env-changed=REPR_GUEST_BUILD_LATEST");
println!("cargo:rerun-if-env-changed=OUT_DIR");
// Compile time constant environment variables
println!("cargo:rerun-if-env-changed=CITREA_NETWORK");
Expand Down Expand Up @@ -59,9 +59,9 @@ fn get_guest_options() -> HashMap<&'static str, risc0_build::GuestOptions> {
features.push("testing".to_string());
}

let use_docker = if std::env::var("REPR_GUEST_BUILD").is_ok() {
let use_docker = if std::env::var("REPR_GUEST_BUILD_LATEST").is_ok() {
let this_package_dir = std::env!("CARGO_MANIFEST_DIR");
let root_dir = format!("{this_package_dir}/../../");
let root_dir = format!("{this_package_dir}/../../../");
Some(DockerOptions {
root_dir: Some(root_dir.into()),
})
Expand Down
6 changes: 3 additions & 3 deletions guests/risc0/light-client-proof/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use risc0_build::{embed_methods_with_options, DockerOptions, GuestOptions};
fn main() {
// Build environment variables
println!("cargo:rerun-if-env-changed=SKIP_GUEST_BUILD");
println!("cargo:rerun-if-env-changed=REPR_GUEST_BUILD");
println!("cargo:rerun-if-env-changed=REPR_GUEST_BUILD_LATEST");
println!("cargo:rerun-if-env-changed=OUT_DIR");
// Compile time constant environment variables
println!("cargo:rerun-if-env-changed=CITREA_NETWORK");
Expand Down Expand Up @@ -59,9 +59,9 @@ fn get_guest_options() -> HashMap<&'static str, risc0_build::GuestOptions> {
features.push("testing".to_string());
}

let use_docker = if std::env::var("REPR_GUEST_BUILD").is_ok() {
let use_docker = if std::env::var("REPR_GUEST_BUILD_LATEST").is_ok() {
let this_package_dir = std::env!("CARGO_MANIFEST_DIR");
let root_dir = format!("{this_package_dir}/../../");
let root_dir = format!("{this_package_dir}/../../../");
Some(DockerOptions {
root_dir: Some(root_dir.into()),
})
Expand Down

0 comments on commit 1265a26

Please sign in to comment.