Skip to content

Commit 5f62ad1

Browse files
committed
remove direct sha3 dependency
zkevm_opcode_defs selects it properly.
1 parent 4aac514 commit 5f62ad1

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ resolver = "2"
1010
# franklin-crypto = {path = "../franklin-crypto", features = ["plonk", "multicore"]}
1111
franklin-crypto = {git = "https://github.com/matter-labs/franklin-crypto", branch = "dev", features = ["multicore"]}
1212
sha2 = "0.10"
13-
sha3 = "0.10"
1413
hex = "*"
1514
once_cell = "*"
1615
derivative = "*"

src/glue/pubdata_hasher/variable_length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use super::input::*;
44
use crate::glue::optimizable_queue::FixedWidthEncodingGenericQueue;
55
use crate::glue::pubdata_hasher::storage_write_data::ByteSerializable;
66
use franklin_crypto::plonk::circuit::hashes_with_tables::keccak::gadgets::*;
7+
use zkevm_opcode_defs::sha3::{self, Digest};
78

89
pub fn hash_pubdata_entry_point_variable_length<
910
E: Engine,
@@ -124,7 +125,6 @@ pub fn hash_pubdata_inner<
124125
// we can precompute special case, which is empty input queue,
125126
// so we will hash 4x0 bytes
126127

127-
use sha3::Digest;
128128
let empty_input_hash = sha3::Keccak256::digest(&[0u8; 4]);
129129
let mut byte_array = [0u8; 32];
130130
byte_array.copy_from_slice(empty_input_hash.as_slice());

src/precompiles/keccak256.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ use franklin_crypto::plonk::circuit::hashes_with_tables::keccak::gadgets::{
8585
Keccak256Gadget, KeccakState,
8686
};
8787

88-
use sha3::Digest;
88+
use zkevm_opcode_defs::sha3::{self, Digest};
8989

9090
type Keccak256InnerState = [u64; 25];
9191

0 commit comments

Comments
 (0)