diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 96b5d7ece..5b3513d28 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -4,33 +4,147 @@ on: inputs: tags: description: "Test scenario tags" + jobs: - benchmarks: + bench_elgamal: runs-on: self-hosted steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-11-03 + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy + - name: Bench elgamal + run: cargo bench --verbose --bench elgamal + + bench_poseidon: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy + - name: Bench poseidon + run: cargo bench --verbose --bench poseidon + + bench_einsum_accum_matmul: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 override: true components: rustfmt, clippy - name: Bench einsum accum matmul run: cargo bench --verbose --bench accum_einsum_matmul + + bench_accum_matmul_relu: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench accum matmul relu run: cargo bench --verbose --bench accum_matmul_relu + + bench_relu: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench relu run: cargo bench --verbose --bench relu + + bench_accum_dot: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench accum dot run: cargo bench --verbose --bench accum_dot + + bench_accum_conv: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench accum conv run: cargo bench --verbose --bench accum_conv + + bench_accum_sumpool: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench accum sumpool run: cargo bench --verbose --bench accum_sumpool + + bench_pairwise_add: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench pairwise add run: cargo bench --verbose --bench pairwise_add + + bench_accum_sum: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench accum sum run: cargo bench --verbose --bench accum_sum + + bench_pairwise_pow: + runs-on: self-hosted + needs: [bench_poseidon] + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2023-06-27 + override: true + components: rustfmt, clippy - name: Bench pairwise pow run: cargo bench --verbose --bench pairwise_pow - - name: Bench accum pack - run: cargo bench --verbose --bench accum_pack + + diff --git a/Cargo.toml b/Cargo.toml index 73da242a2..c61cbd888 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,9 +100,12 @@ harness = false name = "pairwise_pow" harness = false +[[bench]] +name = "poseidon" +harness = false [[bench]] -name = "accum_pack" +name = "elgamal" harness = false diff --git a/benches/accum_pack.rs b/benches/accum_pack.rs deleted file mode 100644 index f3f5cc60a..000000000 --- a/benches/accum_pack.rs +++ /dev/null @@ -1,117 +0,0 @@ -use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; -use ezkl_lib::circuit::poly::PolyOp; -use ezkl_lib::circuit::*; -use ezkl_lib::execute::create_proof_circuit_kzg; -use ezkl_lib::pfsys::TranscriptType; -use ezkl_lib::pfsys::{create_keys, srs::gen_srs}; -use ezkl_lib::tensor::*; -use halo2_proofs::poly::kzg::commitment::KZGCommitmentScheme; -use halo2_proofs::poly::kzg::strategy::SingleStrategy; -use halo2_proofs::{ - arithmetic::Field, - circuit::{Layouter, SimpleFloorPlanner, Value}, - plonk::{Circuit, ConstraintSystem, Error}, -}; -use halo2curves::bn256::{Bn256, Fr}; -use rand::rngs::OsRng; -use std::marker::PhantomData; - -static mut LEN: usize = 4; -const K: usize = 16; - -#[derive(Clone)] -struct MyCircuit { - inputs: [ValTensor; 1], - _marker: PhantomData, -} - -impl Circuit for MyCircuit { - type Config = BaseConfig; - type FloorPlanner = SimpleFloorPlanner; - type Params = (); - - fn without_witnesses(&self) -> Self { - self.clone() - } - - fn configure(cs: &mut ConstraintSystem) -> Self::Config { - let len = unsafe { LEN }; - - let a = VarTensor::new_advice(cs, K, len); - let b = VarTensor::new_advice(cs, K, len); - let output = VarTensor::new_advice(cs, K, len); - - Self::Config::configure(cs, &[a, b], &output, CheckMode::UNSAFE) - } - - fn synthesize( - &self, - mut config: Self::Config, - mut layouter: impl Layouter, - ) -> Result<(), Error> { - layouter.assign_region( - || "", - |region| { - let mut region = region::RegionCtx::new(region, 0); - config - .layout(&mut region, &self.inputs, Box::new(PolyOp::Pack(2, 1))) - .unwrap(); - Ok(()) - }, - )?; - Ok(()) - } -} - -fn runpack(c: &mut Criterion) { - let mut group = c.benchmark_group("accum_pack"); - let params = gen_srs::>(17); - for &len in [16, 512].iter() { - unsafe { - LEN = len; - }; - - // parameters - let a = Tensor::from((0..len).map(|_| Value::known(Fr::random(OsRng)))); - - let circuit = MyCircuit { - inputs: [ValTensor::from(a)], - _marker: PhantomData, - }; - - group.throughput(Throughput::Elements(len as u64)); - group.bench_with_input(BenchmarkId::new("pk", len), &len, |b, &_| { - b.iter(|| { - create_keys::, Fr, MyCircuit>(&circuit, ¶ms) - .unwrap(); - }); - }); - - let pk = - create_keys::, Fr, MyCircuit>(&circuit, ¶ms).unwrap(); - - group.throughput(Throughput::Elements(len as u64)); - group.bench_with_input(BenchmarkId::new("prove", len), &len, |b, &_| { - b.iter(|| { - let prover = create_proof_circuit_kzg( - circuit.clone(), - ¶ms, - vec![], - &pk, - TranscriptType::Blake, - SingleStrategy::new(¶ms), - CheckMode::UNSAFE, - ); - prover.unwrap(); - }); - }); - } - group.finish(); -} - -criterion_group! { - name = benches; - config = Criterion::default().with_plots(); - targets = runpack -} -criterion_main!(benches); diff --git a/benches/elgamal.rs b/benches/elgamal.rs new file mode 100644 index 000000000..52b52a8ef --- /dev/null +++ b/benches/elgamal.rs @@ -0,0 +1,127 @@ +use ark_std::test_rng; +use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; +use ezkl_lib::circuit::modules::elgamal::{ + ElGamalConfig, ElGamalGadget, ElGamalVariables, NUM_INSTANCE_COLUMNS, +}; +use ezkl_lib::circuit::modules::Module; +use ezkl_lib::circuit::*; +use ezkl_lib::execute::create_proof_circuit_kzg; +use ezkl_lib::graph::modules::{ELGAMAL_CONSTRAINTS_ESTIMATE, ELGAMAL_FIXED_COST_ESTIMATE}; +use ezkl_lib::pfsys::create_keys; +use ezkl_lib::pfsys::srs::gen_srs; +use ezkl_lib::pfsys::TranscriptType; +use ezkl_lib::tensor::*; +use halo2_proofs::circuit::Value; +use halo2_proofs::poly::kzg::commitment::KZGCommitmentScheme; +use halo2_proofs::poly::kzg::strategy::SingleStrategy; +use halo2_proofs::{ + arithmetic::Field, + circuit::{Layouter, SimpleFloorPlanner}, + plonk::{Circuit, ConstraintSystem, Error}, +}; +use halo2curves::bn256::{Bn256, Fr}; +use rand::rngs::OsRng; + +#[derive(Clone, Debug)] +struct EncryptytionCircuit { + message: ValTensor, + variables: ElGamalVariables, +} + +impl Circuit for EncryptytionCircuit { + type Config = ElGamalConfig; + type FloorPlanner = SimpleFloorPlanner; + type Params = (); + + fn without_witnesses(&self) -> Self { + self.clone() + } + + fn configure(cs: &mut ConstraintSystem) -> Self::Config { + ElGamalGadget::configure(cs) + } + + fn synthesize( + &self, + config: Self::Config, + mut layouter: impl Layouter, + ) -> Result<(), Error> { + let mut chip = ElGamalGadget::new(config); + chip.load_variables(self.variables.clone()); + let sk: Tensor> = + Tensor::new(Some(&[Value::known(self.variables.sk).into()]), &[1]).unwrap(); + chip.layout( + &mut layouter, + &[self.message.clone(), sk.into()], + vec![0; NUM_INSTANCE_COLUMNS], + )?; + Ok(()) + } +} + +fn runelgamal(c: &mut Criterion) { + let mut group = c.benchmark_group("elgamal"); + + for size in [784, 2352, 12288].iter() { + let mut rng = test_rng(); + + let k = ((size * ELGAMAL_CONSTRAINTS_ESTIMATE + ELGAMAL_FIXED_COST_ESTIMATE) as f32) + .log2() + .ceil() as u32; + let params = gen_srs::>(k); + + let var = ElGamalVariables::gen_random(&mut rng); + + let message = (0..*size).map(|_| Fr::random(OsRng)).collect::>(); + + let run_inputs = (message.clone(), var.clone()); + let public_inputs: Vec> = ElGamalGadget::run(run_inputs).unwrap(); + + let mut message: Tensor> = + message.into_iter().map(|m| Value::known(m).into()).into(); + message.reshape(&[1, *size]); + + let circuit = EncryptytionCircuit { + message: message.into(), + variables: var, + }; + + group.throughput(Throughput::Elements(*size as u64)); + group.bench_with_input(BenchmarkId::new("pk", size), &size, |b, &_| { + b.iter(|| { + create_keys::, Fr, EncryptytionCircuit>( + &circuit, ¶ms, + ) + .unwrap(); + }); + }); + + let pk = + create_keys::, Fr, EncryptytionCircuit>(&circuit, ¶ms) + .unwrap(); + + group.throughput(Throughput::Elements(*size as u64)); + group.bench_with_input(BenchmarkId::new("prove", size), &size, |b, &_| { + b.iter(|| { + let prover = create_proof_circuit_kzg( + circuit.clone(), + ¶ms, + public_inputs.clone(), + &pk, + TranscriptType::Blake, + SingleStrategy::new(¶ms), + CheckMode::UNSAFE, + ); + prover.unwrap(); + }); + }); + } + group.finish(); +} + +criterion_group! { + name = benches; + config = Criterion::default().with_plots().sample_size(10); + targets = runelgamal +} +criterion_main!(benches); diff --git a/benches/poseidon.rs b/benches/poseidon.rs new file mode 100644 index 000000000..2ef06e57a --- /dev/null +++ b/benches/poseidon.rs @@ -0,0 +1,115 @@ +use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; +use ezkl_lib::circuit::modules::poseidon::spec::{PoseidonSpec, POSEIDON_RATE, POSEIDON_WIDTH}; +use ezkl_lib::circuit::modules::poseidon::{PoseidonChip, PoseidonConfig, NUM_INSTANCE_COLUMNS}; +use ezkl_lib::circuit::modules::Module; +use ezkl_lib::circuit::*; +use ezkl_lib::execute::create_proof_circuit_kzg; +use ezkl_lib::graph::modules::{POSEIDOIN_FIXED_COST_ESTIMATE, POSEIDON_CONSTRAINTS_ESTIMATE}; +use ezkl_lib::pfsys::create_keys; +use ezkl_lib::pfsys::srs::gen_srs; +use ezkl_lib::pfsys::TranscriptType; +use ezkl_lib::tensor::*; +use halo2_proofs::circuit::Value; +use halo2_proofs::poly::kzg::commitment::KZGCommitmentScheme; +use halo2_proofs::poly::kzg::strategy::SingleStrategy; +use halo2_proofs::{ + arithmetic::Field, + circuit::{Layouter, SimpleFloorPlanner}, + plonk::{Circuit, ConstraintSystem, Error}, +}; +use halo2curves::bn256::{Bn256, Fr}; +use rand::rngs::OsRng; + +const L: usize = 10; + +#[derive(Clone, Debug)] +struct MyCircuit { + image: ValTensor, +} + +impl Circuit for MyCircuit { + type Config = PoseidonConfig; + type FloorPlanner = SimpleFloorPlanner; + type Params = (); + + fn without_witnesses(&self) -> Self { + self.clone() + } + + fn configure(cs: &mut ConstraintSystem) -> Self::Config { + PoseidonChip::::configure(cs) + } + + fn synthesize( + &self, + config: Self::Config, + mut layouter: impl Layouter, + ) -> Result<(), Error> { + let chip: PoseidonChip = + PoseidonChip::new(config); + chip.layout( + &mut layouter, + &[self.image.clone()], + vec![0; NUM_INSTANCE_COLUMNS], + )?; + Ok(()) + } +} + +fn runposeidon(c: &mut Criterion) { + let mut group = c.benchmark_group("poseidon"); + + for size in [64, 784, 2352, 12288].iter() { + let k = ((size * POSEIDON_CONSTRAINTS_ESTIMATE + POSEIDOIN_FIXED_COST_ESTIMATE) as f32) + .log2() + .ceil() as u32; + let params = gen_srs::>(k); + + let message = (0..*size).map(|_| Fr::random(OsRng)).collect::>(); + let output = + PoseidonChip::::run(message.to_vec()) + .unwrap(); + + let mut image = Tensor::from(message.into_iter().map(|x| Value::known(x))); + image.reshape(&[1, *size]); + + let circuit = MyCircuit { + image: ValTensor::from(image), + }; + + group.throughput(Throughput::Elements(*size as u64)); + group.bench_with_input(BenchmarkId::new("pk", size), &size, |b, &_| { + b.iter(|| { + create_keys::, Fr, MyCircuit>(&circuit, ¶ms) + .unwrap(); + }); + }); + + let pk = + create_keys::, Fr, MyCircuit>(&circuit, ¶ms).unwrap(); + + group.throughput(Throughput::Elements(*size as u64)); + group.bench_with_input(BenchmarkId::new("prove", size), &size, |b, &_| { + b.iter(|| { + let prover = create_proof_circuit_kzg( + circuit.clone(), + ¶ms, + output.clone(), + &pk, + TranscriptType::Blake, + SingleStrategy::new(¶ms), + CheckMode::UNSAFE, + ); + prover.unwrap(); + }); + }); + } + group.finish(); +} + +criterion_group! { + name = benches; + config = Criterion::default().with_plots().sample_size(10); + targets = runposeidon +} +criterion_main!(benches); diff --git a/src/graph/modules.rs b/src/graph/modules.rs index 65f6ebda9..cd22f5df5 100644 --- a/src/graph/modules.rs +++ b/src/graph/modules.rs @@ -15,12 +15,16 @@ use super::{VarVisibility, Visibility}; const POSEIDON_LEN_GRAPH: usize = 10; // TODO: Need a dummy pass module to get the exact size of each module, this is a rough estimate -const POSEIDON_CONSTRAINTS_ESTIMATE: usize = 44; -const ELGAMAL_CONSTRAINTS_ESTIMATE: usize = 44; -// 2^15 -const POSEIDOIN_FIXED_COST_ESTIMATE: usize = 128; -// 2^15 -const ELGAMAL_FIXED_COST_ESTIMATE: usize = 32768; +/// Module sizes +pub const POSEIDON_CONSTRAINTS_ESTIMATE: usize = 44; +/// Module sizes +pub const ELGAMAL_CONSTRAINTS_ESTIMATE: usize = 128; +// 2^7 +/// Module sizes +pub const POSEIDOIN_FIXED_COST_ESTIMATE: usize = 128; +// 2^17 +/// Module sizes +pub const ELGAMAL_FIXED_COST_ESTIMATE: usize = 131072; /// Poseidon module type pub type ModulePoseidon = diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 3f9f52886..1a8e7a820 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -11,7 +11,7 @@ mod native_tests { use std::sync::Once; use tempdir::TempDir; static COMPILE: Once = Once::new(); - static KZG17: Once = Once::new(); + static KZG19: Once = Once::new(); static KZG23: Once = Once::new(); static KZG26: Once = Once::new(); static START_ANVIL: Once = Once::new(); @@ -44,13 +44,13 @@ mod native_tests { }); } - fn init_params_17() { - KZG17.call_once(|| { + fn init_params_19() { + KZG19.call_once(|| { let status = Command::new(format!("{}/release/ezkl", *CARGO_TARGET_DIR)) .args([ "gen-srs", - &format!("--srs-path={}/kzg17.srs", TEST_DIR.path().to_str().unwrap()), - "--logrows=17", + &format!("--srs-path={}/kzg19.srs", TEST_DIR.path().to_str().unwrap()), + "--logrows=19", ]) .status() .expect("failed to execute process"); @@ -423,25 +423,25 @@ mod native_tests { #(#[test_case(TESTS[N])])* fn kzg_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); - kzg_prove_and_verify(test.to_string(), 17, "safe", "private", "private", "public"); + kzg_prove_and_verify(test.to_string(), 19, "safe", "private", "private", "public"); } #(#[test_case(TESTS[N])])* fn kzg_prove_and_verify_hashed_output(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); - kzg_prove_and_verify(test.to_string(), 17, "safe", "private", "private", "hashed"); + kzg_prove_and_verify(test.to_string(), 19, "safe", "private", "private", "hashed"); } #(#[test_case(TESTS[N])])* fn kzg_prove_and_verify_encrypted_output(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); - kzg_prove_and_verify(test.to_string(), 17, "safe", "private", "private", "encrypted"); + kzg_prove_and_verify(test.to_string(), 19, "safe", "private", "private", "encrypted"); } #(#[test_case(TESTS[N])])* @@ -516,7 +516,7 @@ mod native_tests { #(#[test_case(TESTS_ON_CHAIN_INPUT[N])])* fn kzg_evm_on_chain_input_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_on_chain_input_prove_and_verify(test.to_string(), 200, "on-chain", "file"); @@ -527,7 +527,7 @@ mod native_tests { #(#[test_case(TESTS_ON_CHAIN_INPUT[N])])* fn kzg_evm_on_chain_output_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_on_chain_input_prove_and_verify(test.to_string(), 200, "file", "on-chain"); @@ -539,7 +539,7 @@ mod native_tests { #(#[test_case(TESTS_ON_CHAIN_INPUT[N])])* fn kzg_evm_on_chain_input_output_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_on_chain_input_prove_and_verify(test.to_string(), 200, "on-chain", "on-chain"); @@ -552,7 +552,7 @@ mod native_tests { #(#[test_case(TESTS_EVM[N])])* fn kzg_evm_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_prove_and_verify(test.to_string(), "private", "private", "public", 1); @@ -561,7 +561,7 @@ mod native_tests { #(#[test_case(TESTS_EVM[N])])* fn kzg_evm_hashed_input_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_prove_and_verify(test.to_string(), "hashed", "private", "private", 1); @@ -570,7 +570,7 @@ mod native_tests { #(#[test_case(TESTS_EVM[N])])* fn kzg_evm_hashed_params_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_prove_and_verify(test.to_string(), "private", "hashed", "public", 1); @@ -579,7 +579,7 @@ mod native_tests { #(#[test_case(TESTS_EVM[N])])* fn kzg_evm_hashed_output_prove_and_verify_(test: &str) { crate::native_tests::init_binary(); - crate::native_tests::init_params_17(); + crate::native_tests::init_params_19(); crate::native_tests::mv_test_(test); crate::native_tests::start_anvil(); kzg_evm_prove_and_verify(test.to_string(), "private", "private", "hashed", 1); @@ -1398,7 +1398,7 @@ mod native_tests { &format!("{}/{}/key.pk", test_dir, example_name), "--vk-path", &format!("{}/{}/key.vk", test_dir, example_name), - &format!("--srs-path={}/kzg17.srs", test_dir), + &format!("--srs-path={}/kzg19.srs", test_dir), &format!( "--settings-path={}/{}/settings.json", test_dir, example_name @@ -1419,7 +1419,7 @@ mod native_tests { &format!("{}/{}/proof.pf", test_dir, example_name), "--pk-path", &format!("{}/{}/key.pk", test_dir, example_name), - &format!("--srs-path={}/kzg17.srs", TEST_DIR.path().to_str().unwrap()), + &format!("--srs-path={}/kzg19.srs", TEST_DIR.path().to_str().unwrap()), "--transcript=evm", "--strategy=single", &format!( @@ -1437,7 +1437,7 @@ mod native_tests { ); let code_arg = format!("{}/{}/deployment.code", test_dir, example_name); let vk_arg = format!("{}/{}/key.vk", test_dir, example_name); - let param_arg = format!("--srs-path={}/kzg17.srs", test_dir); + let param_arg = format!("--srs-path={}/kzg19.srs", test_dir); let opt_arg = format!("--optimizer-runs={}", num_runs); let rpc_arg = format!("--rpc-url={}", anvil_url); let addr_path_arg = format!("--addr-path={}/{}/addr.txt", test_dir, example_name); @@ -1572,7 +1572,7 @@ mod native_tests { &format!("{}/{}/key.pk", test_dir, example_name), "--vk-path", &format!("{}/{}/key.vk", test_dir, example_name), - &format!("--srs-path={}/kzg17.srs", test_dir), + &format!("--srs-path={}/kzg19.srs", test_dir), circuit_settings.as_str(), ]) .status() @@ -1615,7 +1615,7 @@ mod native_tests { &format!("{}/{}/proof.pf", test_dir, example_name), "--pk-path", &format!("{}/{}/key.pk", test_dir, example_name), - &format!("--srs-path={}/kzg17.srs", TEST_DIR.path().to_str().unwrap()), + &format!("--srs-path={}/kzg19.srs", TEST_DIR.path().to_str().unwrap()), "--transcript=evm", "--strategy=single", circuit_settings.as_str(), @@ -1629,7 +1629,7 @@ mod native_tests { test_dir, example_name ); let vk_arg = format!("{}/{}/key.vk", test_dir, example_name); - let param_arg = format!("--srs-path={}/kzg17.srs", test_dir); + let param_arg = format!("--srs-path={}/kzg19.srs", test_dir); let opt_arg = format!("--optimizer-runs={}", num_runs);