Skip to content

Commit

Permalink
chore: clippy OK
Browse files Browse the repository at this point in the history
  • Loading branch information
roynalnaruto committed Nov 5, 2024
1 parent dd10d9a commit 7b9e296
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
1 change: 0 additions & 1 deletion aggregator/src/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ impl From<&Protocol<G1Affine>> for FixedProtocol {
preprocessed: protocol.preprocessed.clone(),
init_state: protocol
.transcript_initial_state
.clone()
.expect("protocol transcript init state None"),
}
}
Expand Down
18 changes: 2 additions & 16 deletions aggregator/src/aggregation/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,10 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
let loader: Rc<Halo2Loader<G1Affine, EccChip<Fr, FpConfig<Fr, Fq>>>> =
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,
Expand Down Expand Up @@ -269,29 +266,21 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
// 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()
Expand All @@ -300,15 +289,13 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
.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()
.range()
.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.
//
Expand Down Expand Up @@ -378,7 +365,6 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {

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,
Expand Down
2 changes: 2 additions & 0 deletions prover/src/common/prover/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<const N_SNARKS: usize>(
&mut self,
id: &str,
Expand Down Expand Up @@ -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<const N_SNARKS: usize>(
&mut self,
name: &str,
Expand Down
2 changes: 1 addition & 1 deletion testool/src/statetest/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}

Expand Down

0 comments on commit 7b9e296

Please sign in to comment.