From 7b9e296751127dbdc228a6a649e5e7c8d8644bae Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 5 Nov 2024 10:54:48 +0000 Subject: [PATCH] chore: clippy OK --- aggregator/src/aggregation.rs | 1 - aggregator/src/aggregation/circuit.rs | 18 ++---------------- prover/src/common/prover/aggregation.rs | 2 ++ testool/src/statetest/executor.rs | 2 +- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/aggregator/src/aggregation.rs b/aggregator/src/aggregation.rs index 501c2fb591..a616965750 100644 --- a/aggregator/src/aggregation.rs +++ b/aggregator/src/aggregation.rs @@ -54,7 +54,6 @@ impl From<&Protocol> for FixedProtocol { preprocessed: protocol.preprocessed.clone(), init_state: protocol .transcript_initial_state - .clone() .expect("protocol transcript init state None"), } } diff --git a/aggregator/src/aggregation/circuit.rs b/aggregator/src/aggregation/circuit.rs index f2f914086d..06cb53c9b0 100644 --- a/aggregator/src/aggregation/circuit.rs +++ b/aggregator/src/aggregation/circuit.rs @@ -225,13 +225,10 @@ impl Circuit for BatchCircuit { let loader: Rc>>> = Halo2Loader::new(ecc_chip, ctx); - // // extract the assigned values for // - instances which are the public inputs of each chunk (prefixed with 12 // instances from previous accumulators) // - new accumulator - // - log::debug!("aggregation: chunk aggregation"); let ( assigned_aggregation_instances, acc, @@ -269,29 +266,21 @@ impl Circuit for BatchCircuit { // fixed set of values expected. // // First we load the constants. - log::info!("populating constants"); let mut preprocessed_polys_halo2 = Vec::with_capacity(7); let mut preprocessed_polys_sp1 = Vec::with_capacity(7); - for (i, &preprocessed_poly) in - self.halo2_protocol.preprocessed.iter().enumerate() - { - log::debug!("load const {i}"); + for &preprocessed_poly in self.halo2_protocol.preprocessed.iter() { preprocessed_polys_halo2.push( config .ecc_chip() .assign_constant_point(&mut ctx, preprocessed_poly), ); - log::debug!("load const {i} OK"); } - for (i, &preprocessed_poly) in self.sp1_protocol.preprocessed.iter().enumerate() - { - log::debug!("load const (sp1) {i}"); + for &preprocessed_poly in self.sp1_protocol.preprocessed.iter() { preprocessed_polys_sp1.push( config .ecc_chip() .assign_constant_point(&mut ctx, preprocessed_poly), ); - log::debug!("load const (sp1) {i} OK"); } let transcript_init_state_halo2 = config .ecc_chip() @@ -300,7 +289,6 @@ impl Circuit for BatchCircuit { .gate() .assign_constant(&mut ctx, self.halo2_protocol.init_state) .expect("IntegerInstructions::assign_constant infallible"); - log::debug!("load transcript OK"); let transcript_init_state_sp1 = config .ecc_chip() .field_chip() @@ -308,7 +296,6 @@ impl Circuit for BatchCircuit { .gate() .assign_constant(&mut ctx, self.sp1_protocol.init_state) .expect("IntegerInstructions::assign_constant infallible"); - log::info!("populating constants OK"); // Commitments to the preprocessed polynomials. // @@ -378,7 +365,6 @@ impl Circuit for BatchCircuit { ctx.print_stats(&["protocol check"]); - log::debug!("batching: assigning barycentric"); let barycentric = config.blob_consistency_config.assign_barycentric( &mut ctx, &self.batch_hash.blob_bytes, diff --git a/prover/src/common/prover/aggregation.rs b/prover/src/common/prover/aggregation.rs index cca60d5443..d17e838a94 100644 --- a/prover/src/common/prover/aggregation.rs +++ b/prover/src/common/prover/aggregation.rs @@ -12,6 +12,7 @@ use snark_verifier_sdk::Snark; use std::env; impl<'params> Prover<'params> { + #[allow(clippy::too_many_arguments)] pub fn gen_agg_snark( &mut self, id: &str, @@ -42,6 +43,7 @@ impl<'params> Prover<'params> { self.gen_snark(id, degree, &mut rng, circuit, "gen_agg_snark") } + #[allow(clippy::too_many_arguments)] pub fn load_or_gen_agg_snark( &mut self, name: &str, diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 2dcecc8d4c..34dbbc4485 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -644,7 +644,7 @@ pub fn run_test( eth_types::constants::set_env_coinbase(&st.env.current_coinbase); prover::test::chunk_prove( &test_id, - prover::ChunkProvingTask::from(vec![_scroll_trace]), + prover::ChunkProvingTask::new(vec![_scroll_trace], prover::ChunkKind::Halo2), ); }