Skip to content

Commit

Permalink
Added eip_7594 benches
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr committed Oct 23, 2024
1 parent 1376c8b commit e8b8d8e
Show file tree
Hide file tree
Showing 10 changed files with 543 additions and 14 deletions.
107 changes: 103 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ members = [
"mcl/kzg",
"mcl/kzg-bench",
"zkcrypto",
"constantine"
"constantine",
"rust-eth-kzg-benches",
]


Expand Down
4 changes: 4 additions & 0 deletions blst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ harness = false
name = "eip_4844"
harness = false

[[bench]]
name = "eip_7594"
harness = false

[[bench]]
name = "lincomb"
harness = false
32 changes: 32 additions & 0 deletions blst/benches/eip_7594.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use criterion::{criterion_group, criterion_main, Criterion};
use kzg::{eip_4844::{blob_to_kzg_commitment_rust,
bytes_to_blob}
, eip_7594::{compute_cells_and_kzg_proofs, recover_cells_and_kzg_proofs, verify_cell_kzg_proof_batch}};
use kzg_bench::benches::eip_7594::bench_eip_7594;
use rust_kzg_blst::{
eip_4844::load_trusted_setup_filename_rust,
types::{
fft_settings::FsFFTSettings,
fp::FsFp,
fr::FsFr,
g1::{FsG1, FsG1Affine},
g2::FsG2,
kzg_settings::FsKZGSettings,
poly::FsPoly,
},
};

fn bench_eip_7594_(c: &mut Criterion) {
bench_eip_7594::<FsFr, FsG1, FsG2, FsPoly, FsFFTSettings, FsKZGSettings, FsFp, FsG1Affine>(
c,
&load_trusted_setup_filename_rust,
&bytes_to_blob,
&blob_to_kzg_commitment_rust,
&compute_cells_and_kzg_proofs,
&recover_cells_and_kzg_proofs,
&verify_cell_kzg_proof_batch
);
}

criterion_group!(benches, bench_eip_7594_);
criterion_main!(benches);
Loading

0 comments on commit e8b8d8e

Please sign in to comment.