Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobottazzi committed Dec 11, 2023
1 parent aa2e894 commit 51d27e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
3 changes: 0 additions & 3 deletions kzg_prover/src/chips/range/range_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ impl<const N_BYTES: usize> RangeCheckChip<N_BYTES> {
let mut zs = Vec::with_capacity(N_BYTES);
let mut z = element.clone();

// print assigned element
println!("element: {:?}", element);

// Calculate 1 / 2^8
let two_pow_eight_inv = Value::known(Fp::from(1 << 8).invert().unwrap());

Expand Down
16 changes: 5 additions & 11 deletions kzg_prover/src/circuits/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ mod test {
use crate::cryptocurrency::Cryptocurrency;
use crate::entry::Entry;
use crate::utils::parse_csv_to_entries;
use halo2_proofs::{
dev::{FailureLocation, MockProver, VerifyFailure},
halo2curves::bn256::Fr as Fp,
plonk::Any,
};
use halo2_proofs::dev::MockProver;
use num_bigint::BigUint;

const K: u32 = 9;
Expand All @@ -28,9 +24,8 @@ mod test {

let mut entries: Vec<Entry<N_CURRENCIES>> = vec![Entry::init_empty(); N_USERS];
let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
let _ =
parse_csv_to_entries::<&str, N_CURRENCIES, N_BYTES>(path, &mut entries, &mut cryptos)
.unwrap();
parse_csv_to_entries::<&str, N_CURRENCIES, N_BYTES>(path, &mut entries, &mut cryptos)
.unwrap();

let circuit = UnivariateGrandSum::<N_BYTES, N_USERS, N_CURRENCIES>::init(entries.to_vec());

Expand Down Expand Up @@ -60,9 +55,8 @@ mod test {
let mut entries: Vec<Entry<N_CURRENCIES>> = vec![Entry::init_empty(); N_USERS];
let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];

let _ =
parse_csv_to_entries::<&str, N_CURRENCIES, N_BYTES>(path, &mut entries, &mut cryptos)
.unwrap();
parse_csv_to_entries::<&str, N_CURRENCIES, N_BYTES>(path, &mut entries, &mut cryptos)
.unwrap();

// Calculate total for all entry columns
let mut csv_total: Vec<BigUint> = vec![BigUint::from(0u32); N_CURRENCIES];
Expand Down
2 changes: 1 addition & 1 deletion kzg_prover/src/circuits/univariate_grand_sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ where
entries: &[Entry<N_ASSETS>],
) -> Result<Vec<Vec<AssignedCell<Fp, Fp>>>, Error> {
layouter.assign_region(
|| "assign entries and accumulated balance to table",
|| "assign entries to the table",
|mut region| {
// create a bidimensional vector to store the assigned balances. The first dimension is the number of entries, the second dimension is the number of balances
let mut assigned_balances = vec![vec![]];
Expand Down

0 comments on commit 51d27e9

Please sign in to comment.