Skip to content

Commit

Permalink
remove test for now, since it is too slow
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Nov 4, 2024
1 parent fe14b15 commit d4bd6ce
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions evm_arithmetization/src/fixed_recursive_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3327,75 +3327,3 @@ pub mod testing {
}
}
}

#[cfg(test)]
mod tests {
use std::env;
use dotenvy::dotenv;
use plonky2::field::goldilocks_field::GoldilocksField;
use plonky2::plonk::config::PoseidonGoldilocksConfig;
use super::*;

/// Parses a string representing a range in the format "start..end" into a `Range<usize>`.
fn parse_range(range_str: &str) -> anyhow::Result<std::ops::Range<usize>> {
let parts: Vec<&str> = range_str.split("..").collect();
if parts.len() == 2 {
let start = parts[0].parse::<usize>()?;
let end = parts[1].parse::<usize>()?;
Ok(start..end)
} else {
Err(anyhow::anyhow!("Invalid range format"))
}
}

/// Ensures that all circuits can be generated without any issues
/// using the production or default STARK configurations.
#[test]
#[ignore]
fn test_production_recursion_config() -> anyhow::Result<()> {
type F = GoldilocksField;
const D: usize = 2;
type C = PoseidonGoldilocksConfig;

// Load environment variables from the .env file
dotenv().ok();

// Macro to fetch and parse environment variables representing ranges
macro_rules! fetch_and_parse_range {
($env_var:expr) => {
parse_range(&env::var($env_var).expect(concat!($env_var, " not set")))?
};
}

// Fetch and parse the ranges from environment variables
let arithmetic_range = fetch_and_parse_range!("ARITHMETIC_CIRCUIT_SIZE");
let byte_packing_range = fetch_and_parse_range!("BYTE_PACKING_CIRCUIT_SIZE");
let cpu_range = fetch_and_parse_range!("CPU_CIRCUIT_SIZE");
let keccak_range = fetch_and_parse_range!("KECCAK_CIRCUIT_SIZE");
let keccak_sponge_range = fetch_and_parse_range!("KECCAK_SPONGE_CIRCUIT_SIZE");
let logic_range = fetch_and_parse_range!("LOGIC_CIRCUIT_SIZE");
let memory_range = fetch_and_parse_range!("MEMORY_CIRCUIT_SIZE");
let memory_before_range = fetch_and_parse_range!("MEMORY_BEFORE_CIRCUIT_SIZE");
let memory_after_range = fetch_and_parse_range!("MEMORY_AFTER_CIRCUIT_SIZE");

// Initialize AllStark and generate the recursive circuits
let all_stark = AllStark::<F, D>::default();
AllRecursiveCircuits::<F, C, D>::new(
&all_stark,
&[
arithmetic_range,
byte_packing_range,
cpu_range,
keccak_range,
keccak_sponge_range,
logic_range,
memory_range,
memory_before_range,
memory_after_range,
],
RecursionConfig::default(),
);

Ok(())
}
}

0 comments on commit d4bd6ce

Please sign in to comment.