Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Oct 15, 2024
1 parent 557d221 commit 564b950
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion evm_arithmetization/src/fixed_recursive_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ pub struct ShrunkProofData<F: RichField + Extendable<D>, C: GenericConfig<D, F =
/// The initial degree for generating the proof.
pub init_degree: usize,

/// The Common Circuit Data from last shrinking circuit.
/// The [`CommonCircuitData`] of the last shrinking circuit.
pub common_circuit_data: CommonCircuitData<F, D>,

/// The proof after applying shrinking recursion.
Expand Down
2 changes: 0 additions & 2 deletions zero/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(array_try_from_fn)]

zk_evm_common::check_chain_features!();

pub mod block_interval;
Expand Down
34 changes: 15 additions & 19 deletions zero/src/prover_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Option<(RecursiveCircuitsForTableSize, u8)>> {
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)
}
Expand Down

0 comments on commit 564b950

Please sign in to comment.