diff --git a/Cargo.toml b/Cargo.toml index 04f5a32..1e9c73f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ serde_json = { version = "1.0", default-features = false } tempfile = "3.8" tokio = { version = "1.39", features = ["full"] } toml = "0.8.0" -which = "6.0.1" tracing = { version = "0.1.40", default-features = false } # Citrea dependencies diff --git a/src/config/mod.rs b/src/config/mod.rs index f515993..2d602e8 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -16,7 +16,7 @@ pub use test_case::{TestCaseConfig, TestCaseEnv}; pub use utils::config_to_file; pub use crate::citrea_config::{ - batch_prover::BatchProverConfig, + batch_prover::{BatchProverConfig, ProverGuestRunConfig}, bitcoin::BitcoinServiceConfig, light_client_prover::LightClientProverConfig, rollup::{FullNodeConfig, RollupPublicKeys, RpcConfig, RunnerConfig, StorageConfig}, diff --git a/src/node.rs b/src/node.rs index 72e5860..b0f41de 100644 --- a/src/node.rs +++ b/src/node.rs @@ -91,7 +91,7 @@ impl Node { } fn spawn(config: &C) -> Result { - let citrea = get_citrea_path(); + let citrea = get_citrea_path()?; let dir = config.dir(); let kind = C::node_kind(); diff --git a/src/utils.rs b/src/utils.rs index 84582f7..66f0b02 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -7,9 +7,9 @@ use std::{ path::{Path, PathBuf}, }; +use anyhow::anyhow; use rand::{distributions::Alphanumeric, thread_rng, Rng}; use tracing::debug; -use which::which; use super::Result; @@ -27,9 +27,11 @@ pub fn get_workspace_root() -> PathBuf { .to_path_buf() } -/// Get citrea path from CITREA env or resolves to PATH using which. -pub fn get_citrea_path() -> PathBuf { - std::env::var("CITREA").map_or_else(|_| which("citrea").unwrap(), PathBuf::from) +/// Get citrea path from CITREA_E2E_TEST_BINARY env +pub fn get_citrea_path() -> Result { + std::env::var("CITREA_E2E_TEST_BINARY") + .map(PathBuf::from) + .map_err(|_| anyhow!("CITREA_E2E_TEST_BINARY is not set. Cannot resolve citrea path")) } pub fn get_stdout_path(dir: &Path) -> PathBuf {