Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Sep 13, 2024
1 parent 5854a41 commit c4caddb
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions plonky2/src/fri/witness_util.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use std::iter;

use anyhow::Result;
use itertools::Itertools;
use plonky2_field::types::Field;

use crate::field::extension::Extendable;
use crate::fri::proof::{FriProof, FriProofTarget};
Expand All @@ -23,14 +20,12 @@ where
{
witness.set_target(fri_proof_target.pow_witness, fri_proof.pow_witness)?;

assert!(fri_proof_target.final_poly.len() >= fri_proof.final_poly.coeffs.len());
for (&t, &x) in fri_proof_target.final_poly.0.iter().zip(
fri_proof
.final_poly
.coeffs
.iter()
.chain(iter::repeat(&F::Extension::ZERO)),
) {
for (&t, &x) in fri_proof_target
.final_poly
.0
.iter()
.zip_eq(&fri_proof.final_poly.coeffs)
{
witness.set_extension_target(t, x)?;
}

Expand All @@ -56,7 +51,7 @@ where
for (&t, &x) in at.0.iter().zip_eq(&a.0) {
witness.set_target(t, x)?;
}
for (&t, &x) in at.1.siblings.iter().zip(&a.1.siblings) {
for (&t, &x) in at.1.siblings.iter().zip_eq(&a.1.siblings) {
witness.set_hash_target(t, x)?;
}
}
Expand All @@ -69,7 +64,7 @@ where
.merkle_proof
.siblings
.iter()
.zip(&s.merkle_proof.siblings)
.zip_eq(&s.merkle_proof.siblings)
{
witness.set_hash_target(t, x)?;
}
Expand Down

0 comments on commit c4caddb

Please sign in to comment.