mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 06:43:07 +00:00
Clippy
This commit is contained in:
parent
ea69a87338
commit
acadd64371
@ -285,7 +285,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CompressedFriProof<F, D> {
|
||||
HashMap::<usize, Vec<_>>::new();
|
||||
common_data.fri_params.reduction_arity_bits.len()
|
||||
];
|
||||
for (round, mut index) in indices.iter().copied().enumerate() {
|
||||
for &(mut index) in indices {
|
||||
let initial_trees_proof = query_round_proofs.initial_trees_proofs[&index].clone();
|
||||
for (i, (leaves_data, proof)) in
|
||||
initial_trees_proof.evals_proofs.into_iter().enumerate()
|
||||
|
||||
@ -83,20 +83,18 @@ pub(crate) fn verify_fri_proof<F: RichField + Extendable<D>, const D: usize>(
|
||||
|
||||
let precomputed_reduced_evals =
|
||||
PrecomputedReducedEvals::from_os_and_alpha(os, challenges.fri_alpha);
|
||||
for (round, (&x_index, round_proof)) in challenges
|
||||
for (&x_index, round_proof) in challenges
|
||||
.fri_query_indices
|
||||
.iter()
|
||||
.zip(&proof.query_round_proofs)
|
||||
.enumerate()
|
||||
{
|
||||
fri_verifier_query_round(
|
||||
challenges,
|
||||
precomputed_reduced_evals,
|
||||
initial_merkle_caps,
|
||||
&proof,
|
||||
proof,
|
||||
x_index,
|
||||
n,
|
||||
round,
|
||||
round_proof,
|
||||
common_data,
|
||||
)?;
|
||||
@ -220,7 +218,6 @@ fn fri_verifier_query_round<F: RichField + Extendable<D>, const D: usize>(
|
||||
proof: &FriProof<F, D>,
|
||||
mut x_index: usize,
|
||||
n: usize,
|
||||
round: usize,
|
||||
round_proof: &FriQueryRound<F, D>,
|
||||
common_data: &CommonCircuitData<F, D>,
|
||||
) -> Result<()> {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use crate::field::extension_field::Extendable;
|
||||
use crate::field::field_types::{Field, RichField};
|
||||
use crate::field::field_types::RichField;
|
||||
use crate::fri::verifier::{compute_evaluation, fri_combine_initial, PrecomputedReducedEvals};
|
||||
use crate::hash::hashing::hash_n_to_1;
|
||||
use crate::iop::challenger::Challenger;
|
||||
@ -93,13 +93,6 @@ impl<F: RichField + Extendable<D>, const D: usize> ProofWithPublicInputs<F, D> {
|
||||
}
|
||||
|
||||
impl<F: RichField + Extendable<D>, const D: usize> CompressedProofWithPublicInputs<F, D> {
|
||||
pub(crate) fn fri_query_indices(
|
||||
&self,
|
||||
common_data: &CommonCircuitData<F, D>,
|
||||
) -> anyhow::Result<Vec<usize>> {
|
||||
Ok(self.get_challenges(common_data)?.fri_query_indices)
|
||||
}
|
||||
|
||||
pub(crate) fn get_challenges(
|
||||
&self,
|
||||
common_data: &CommonCircuitData<F, D>,
|
||||
@ -165,8 +158,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CompressedProofWithPublicInpu
|
||||
PrecomputedReducedEvals::from_os_and_alpha(&self.proof.openings, fri_alpha);
|
||||
let mut fri_query_inferred_elements = Vec::new();
|
||||
let log_n = common_data.degree_bits + common_data.config.rate_bits;
|
||||
for query_round in 0..common_data.config.fri_config.num_query_rounds {
|
||||
let mut x_index = fri_query_indices[query_round];
|
||||
for &(mut x_index) in &fri_query_indices {
|
||||
let mut subgroup_x = F::MULTIPLICATIVE_GROUP_GENERATOR
|
||||
* F::primitive_root_of_unity(log_n).exp_u64(reverse_bits(x_index, log_n) as u64);
|
||||
let mut old_eval = fri_combine_initial(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user