Skip to content

Commit

Permalink
cleanup dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Aug 10, 2024
1 parent e3a1314 commit ed1b7ab
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"

[workspace.dependencies]
blake2 = "0.10.6"
blake3 = "1.5.0"
educe = "0.5.0"
hex = "0.4.3"
itertools = "0.12.0"
Expand Down
2 changes: 0 additions & 2 deletions crates/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ small_blowup = []
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
blake2.workspace = true
blake3.workspace = true
bytemuck = { workspace = true, features = ["derive"] }
cfg-if = "1.0.0"
downcast-rs = "1.2"
Expand Down
10 changes: 5 additions & 5 deletions crates/prover/benches/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const LOG_N_ROWS: u32 = 16;

const LOG_N_COLS: u32 = 8;

fn bench_blake2s_merkle<B: MerkleOps<BWSSha256MerkleHasher>>(c: &mut Criterion, id: &str) {
fn bench_sha256_merkle<B: MerkleOps<BWSSha256MerkleHasher>>(c: &mut Criterion, id: &str) {
let col: Col<B, BaseField> = (0..1 << LOG_N_ROWS).map(|_| BaseField::zero()).collect();
let cols = (0..1 << LOG_N_COLS).map(|_| col.clone()).collect_vec();
let col_refs = cols.iter().collect_vec();
Expand All @@ -26,13 +26,13 @@ fn bench_blake2s_merkle<B: MerkleOps<BWSSha256MerkleHasher>>(c: &mut Criterion,
});
}

fn blake2s_merkle_benches(c: &mut Criterion) {
bench_blake2s_merkle::<SimdBackend>(c, "simd");
bench_blake2s_merkle::<CpuBackend>(c, "cpu");
fn sha256_merkle_benches(c: &mut Criterion) {
bench_sha256_merkle::<SimdBackend>(c, "simd");
bench_sha256_merkle::<CpuBackend>(c, "cpu");
}

criterion_group!(
name = benches;
config = Criterion::default().sample_size(10);
targets = blake2s_merkle_benches);
targets = sha256_merkle_benches);
criterion_main!(benches);
2 changes: 1 addition & 1 deletion crates/prover/src/core/vcs/bws_sha256_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl BWSSha256Hasher {
}

pub fn update(&mut self, data: &[u8]) {
blake2::Digest::update(&mut self.state, data);
self.state.update(data);
}

pub fn finalize(self) -> BWSSha256Hash {
Expand Down

0 comments on commit ed1b7ab

Please sign in to comment.