From 564b950a8d646b1da8062058f582082ab010fb63 Mon Sep 17 00:00:00 2001 From: Sai Deng Date: Tue, 15 Oct 2024 14:43:44 -0700 Subject: [PATCH] address comments --- .../src/fixed_recursive_verifier.rs | 2 +- zero/src/lib.rs | 2 -- zero/src/prover_state/mod.rs | 34 ++++++++----------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/evm_arithmetization/src/fixed_recursive_verifier.rs b/evm_arithmetization/src/fixed_recursive_verifier.rs index a8a96f8ea..b28f4adaf 100644 --- a/evm_arithmetization/src/fixed_recursive_verifier.rs +++ b/evm_arithmetization/src/fixed_recursive_verifier.rs @@ -578,7 +578,7 @@ pub struct ShrunkProofData, C: GenericConfig, /// The proof after applying shrinking recursion. diff --git a/zero/src/lib.rs b/zero/src/lib.rs index 6de5dee98..c2ca63f6a 100644 --- a/zero/src/lib.rs +++ b/zero/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(array_try_from_fn)] - zk_evm_common::check_chain_features!(); pub mod block_interval; diff --git a/zero/src/prover_state/mod.rs b/zero/src/prover_state/mod.rs index d5bf2c741..8cdfb45ce 100644 --- a/zero/src/prover_state/mod.rs +++ b/zero/src/prover_state/mod.rs @@ -181,25 +181,21 @@ impl ProverStateManager { // tuple containing the loaded table at the specified size and // its offset relative to the configured range used to pre-process the // circuits. - let circuits = std::array::try_from_fn( - |i| -> anyhow::Result> { - match degrees[i] { - Some(size) => { - let circuit_resource = RecursiveCircuitResource::get(&(i.into(), size)) - .map_err(|e| { - anyhow::Error::from(e).context(format!( - "Attempting to load circuit: {i} at size: {size}" - )) - })?; - Ok(Some(( - circuit_resource, - (size - self.circuit_config[i].start) as u8, - ))) - } - None => Ok(None), - } - }, - )?; + let circuits = core::array::from_fn(|i| match degrees[i] { + Some(size) => RecursiveCircuitResource::get(&(i.into(), size)) + .map(|circuit_resource| { + Some(( + circuit_resource, + (size - self.circuit_config[i].start) as u8, + )) + }) + .map_err(|e| { + anyhow::Error::from(e) + .context(format!("Attempting to load circuit: {i} at size: {size}")) + }) + .unwrap_or(None), + None => None, + }); Ok(circuits) }