Skip to content

Commit

Permalink
remove direct sha3 dependency
Browse files Browse the repository at this point in the history
zkevm_opcode_defs selects it properly.
  • Loading branch information
joonazan committed Dec 4, 2023
1 parent 4aac514 commit 5f62ad1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ resolver = "2"
# franklin-crypto = {path = "../franklin-crypto", features = ["plonk", "multicore"]}
franklin-crypto = {git = "https://github.com/matter-labs/franklin-crypto", branch = "dev", features = ["multicore"]}
sha2 = "0.10"
sha3 = "0.10"
hex = "*"
once_cell = "*"
derivative = "*"
Expand Down
2 changes: 1 addition & 1 deletion src/glue/pubdata_hasher/variable_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use super::input::*;
use crate::glue::optimizable_queue::FixedWidthEncodingGenericQueue;
use crate::glue::pubdata_hasher::storage_write_data::ByteSerializable;
use franklin_crypto::plonk::circuit::hashes_with_tables::keccak::gadgets::*;
use zkevm_opcode_defs::sha3::{self, Digest};

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

use sha3::Digest;
let empty_input_hash = sha3::Keccak256::digest(&[0u8; 4]);
let mut byte_array = [0u8; 32];
byte_array.copy_from_slice(empty_input_hash.as_slice());
Expand Down
2 changes: 1 addition & 1 deletion src/precompiles/keccak256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ use franklin_crypto::plonk::circuit::hashes_with_tables::keccak::gadgets::{
Keccak256Gadget, KeccakState,
};

use sha3::Digest;
use zkevm_opcode_defs::sha3::{self, Digest};

type Keccak256InnerState = [u64; 25];

Expand Down

0 comments on commit 5f62ad1

Please sign in to comment.