Skip to content

Commit

Permalink
Update halo2_proofs/src/plonk/prover.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Han <[email protected]>
  • Loading branch information
alexander-camuto and han0110 authored Oct 31, 2023
1 parent 3170018 commit bf9f53c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions halo2_proofs/src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,18 @@ where
);

// Add blinding factors to advice columns
for (column_index, advice_values) in &mut advice_values.iter_mut().enumerate() {
for cell in &mut advice_values[unusable_rows_start..] {
*cell = Scheme::Scalar::random(&mut rng);
if witness.unblinded_advice.contains(&column_index) {
*cell = Blind::default().0;
} else {
for (column_index, advice_values) in column_indices.iter().zip(&mut advice_values) {
if witness.unblinded_advice.contains(column_index) {
for cell in &mut advice_values[unusable_rows_start..] {
*cell = Scheme::Scalar::random(&mut rng);
}
} else {
#[cfg(feature = "sanity-checks")]
for cell in &advice_values[unusable_rows_start..] {
assert_eq!(*cell, Scheme::Scalar::ZERO);
}
}
}
}
}

Expand Down

0 comments on commit bf9f53c

Please sign in to comment.