-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hyrax-pcs' into ligero-uni-and-ml
- Loading branch information
Showing
47 changed files
with
1,513 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use ark_pcs_bench_templates::*; | ||
use ark_poly::{DenseMultilinearExtension, MultilinearExtension}; | ||
|
||
use ark_bn254::{Fr, G1Affine}; | ||
use ark_ff::PrimeField; | ||
use ark_poly_commit::hyrax::HyraxPC; | ||
|
||
use rand_chacha::ChaCha20Rng; | ||
|
||
// Hyrax PCS over BN254 | ||
type Hyrax254 = HyraxPC<G1Affine, DenseMultilinearExtension<Fr>>; | ||
|
||
fn rand_poly_hyrax<F: PrimeField>( | ||
num_vars: usize, | ||
rng: &mut ChaCha20Rng, | ||
) -> DenseMultilinearExtension<F> { | ||
DenseMultilinearExtension::rand(num_vars, rng) | ||
} | ||
|
||
fn rand_point_hyrax<F: PrimeField>(num_vars: usize, rng: &mut ChaCha20Rng) -> Vec<F> { | ||
(0..num_vars).map(|_| F::rand(rng)).collect() | ||
} | ||
|
||
const MIN_NUM_VARS: usize = 12; | ||
const MAX_NUM_VARS: usize = 22; | ||
|
||
bench!(Hyrax254, rand_poly_hyrax, rand_point_hyrax); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.