Skip to content

Commit

Permalink
Add a few comments and update Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
autquis committed Jan 18, 2024
1 parent d13296c commit 1f988ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ ark-poly = { git = "https://github.com/arkworks-rs/algebra/" }
ark-crypto-primitives = { git = "https://github.com/arkworks-rs/crypto-primitives" }
ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std/" }

ark-bls12-377 = { git = "https://github.com/arkworks-rs/curves/" }
ark-bls12-381 = { git = "https://github.com/arkworks-rs/curves/" }
ark-bn254 = { git = "https://github.com/arkworks-rs/curves/" }
ark-bls12-377 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bls12-381 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-bn254 = { git = "https://github.com/arkworks-rs/algebra/" }
9 changes: 6 additions & 3 deletions bench-templates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ use ark_poly_commit::{LabeledPolynomial, PolynomialCommitment};
pub use criterion::*;
pub use paste::paste;

/// Measure the time cost of {commit/open/verify} across a range of num_vars
/// Measure the time cost of `method` (i.e., commit/open/verify) of a
/// multilinear PCS for all `num_vars` specified in `nv_list`.
/// `rand_poly` is a function that outputs a random multilinear polynomial.
/// `rand_point` is a function that outputs a random point in the domain of polynomial.
pub fn bench_pcs_method<
F: PrimeField,
P: Polynomial<F>,
PCS: PolynomialCommitment<F, P, PoseidonSponge<F>>,
>(
c: &mut Criterion,
range: Vec<usize>,
nv_list: Vec<usize>,
msg: &str,
method: impl Fn(
&PCS::CommitterKey,
Expand All @@ -38,7 +41,7 @@ pub fn bench_pcs_method<
let mut group = c.benchmark_group(msg);
let rng = &mut ChaCha20Rng::from_rng(test_rng()).unwrap();

for num_vars in range {
for num_vars in nv_list {
let pp = PCS::setup(num_vars, Some(num_vars), rng).unwrap();
let (ck, vk) = PCS::trim(&pp, num_vars, num_vars, None).unwrap();

Expand Down
1 change: 0 additions & 1 deletion poly-commit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ark-poly = {version = "^0.4.0", default-features = false }
ark-crypto-primitives = {version = "^0.4.0", default-features = false, features = ["sponge", "merkle_tree"] }
ark-std = { version = "^0.4.0", default-features = false }
blake2 = { version = "0.10", default-features = false }
merlin = { version = "3.0.0", default-features = false }
rand = { version = "0.8.0", optional = true }
ark-relations = { version = "^0.4.0", default-features = false, optional = true }
ark-r1cs-std = { version = "^0.4.0", default-features = false, optional = true }
Expand Down

0 comments on commit 1f988ac

Please sign in to comment.