Skip to content

Commit

Permalink
fix: backend test; comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sifnoc committed Mar 14, 2024
1 parent e4f1200 commit a0484c7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions backend/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ mod test {
generate_setup_artifacts(K, Some(PARAMS_PATH), &univariate_grand_sum_circuit).unwrap();

// Create a proof
let instances = vec![Fp::one(); 1]; // This instance is necessary to verify proof on solidity verifier.
let instances = vec![Fp::zero(); 1]; // This instance is necessary to verify proof on solidity verifier.
let (zk_snark_proof, advice_polys, _omega) = full_prover(
&params,
&pk,
Expand Down Expand Up @@ -314,7 +314,7 @@ mod test {
generate_setup_artifacts(K, Some(PARAMS_PATH), &univariate_grand_sum_circuit).unwrap();

// Create a SNARK proof
let instances = vec![Fp::one(); 1]; // This instance is necessary to verify proof on solidity verifier.
let instances = vec![Fp::zero(); 1]; // This instance is necessary to verify proof on solidity verifier.
let (zk_snark_proof, advice_polys, _omega) = full_prover(
&params,
&pk,
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/Summa.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ contract Summa is Ownable {
uint8 balanceByteRange
) internal view returns (bool isValid) {
// The number of permutations is 2 + (balanceByteRange/2) * numberOfCurrencies because of the circuit structure:
// 1 per instance column, 1 per constant column (range check) and balanceByteRange/2 per range check columns times the number of currencies
// 1 per instance column, 1 per constant column (range check) and (balanceByteRange/2) + 1 per range check columns times the number of currencies
uint256 numPermutations = 2 +
((balanceByteRange / 2) + 1) *
numberOfCurrencies;
Expand Down
14 changes: 1 addition & 13 deletions kzg_prover/benches/kzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,9 @@ fn criterion_benchmark(_c: &mut Criterion) {

// Demonstrating that a higher value of K has a more significant impact on benchmark performance than the number of users
#[cfg(not(feature = "no_range_check"))]
{
const K: u32 = 18;
const N_USERS: usize = (1 << K) - 6;
bench_kzg::<
K,
N_USERS,
N_CURRENCIES,
N_POINTS,
UnivariateGrandSumConfig<N_CURRENCIES, N_USERS>,
>(format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str());
}
#[cfg(not(feature = "no_range_check"))]
{
const K: u32 = 17;
const N_USERS: usize = (1 << K) - 6;
const N_USERS: usize = 2usize.pow(K) - 6;
bench_kzg::<
K,
N_USERS,
Expand Down
1 change: 0 additions & 1 deletion kzg_prover/examples/chunked_univariate_grand_sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use std::error::Error;

use halo2_proofs::halo2curves::bn256::{Fr as Fp, G1Affine};
use halo2_proofs::halo2curves::group::cofactor::CofactorCurveAffine;
use halo2_proofs::halo2curves::group::Curve;
use halo2_proofs::transcript::TranscriptRead;
use halo2_proofs::{
Expand Down
2 changes: 0 additions & 2 deletions kzg_prover/src/utils/dummy_entries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pub fn generate_dummy_entries<const N_USERS: usize, const N_CURRENCIES: usize>(/
#[cfg(test)]
mod tests {
use super::*;
use crate::cryptocurrency::Cryptocurrency;
use crate::entry::Entry;

#[test]
fn test_generate_random_entries() {
Expand Down

0 comments on commit a0484c7

Please sign in to comment.