Skip to content

Commit

Permalink
Revert "Change interface to take strongly typed commitment and proof …
Browse files Browse the repository at this point in the history
…types"

This reverts commit f8300ca.
  • Loading branch information
pawanjay176 committed Sep 5, 2023
1 parent f8300ca commit dd723f7
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 131 deletions.
10 changes: 6 additions & 4 deletions bindings/rust/benches/kzg_benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let blobs: Vec<Blob> = (0..max_count)
.map(|_| generate_random_blob(&mut rng))
.collect();
let commitments: Vec<KzgCommitment> = blobs
let commitments: Vec<Bytes48> = blobs
.iter()
.map(|blob| {
KzgCommitment::blob_to_kzg_commitment(blob, &kzg_settings)
.unwrap()
.to_bytes()
})
.collect();
let proofs: Vec<KzgProof> = blobs
let proofs: Vec<Bytes48> = blobs
.iter()
.zip(commitments.iter())
.map(|(blob, commitment)| {
KzgProof::compute_blob_kzg_proof(blob, commitment, &kzg_settings)
.unwrap()
.to_bytes()
})
.collect();
let fields: Vec<Bytes32> = (0..max_count)
Expand Down Expand Up @@ -93,12 +95,12 @@ pub fn criterion_benchmark(c: &mut Criterion) {
.clone()
.into_iter()
.take(count)
.collect::<Vec<KzgCommitment>>();
.collect::<Vec<Bytes48>>();
let proofs_subset = proofs
.clone()
.into_iter()
.take(count)
.collect::<Vec<KzgProof>>();
.collect::<Vec<Bytes48>>();

(blobs_subset, commitments_subset, proofs_subset)
},
Expand Down
Loading

0 comments on commit dd723f7

Please sign in to comment.