diff --git a/trace_decoder/src/typed_mpt.rs b/trace_decoder/src/typed_mpt.rs index 34b1b9312..dc56d54a1 100644 --- a/trace_decoder/src/typed_mpt.rs +++ b/trace_decoder/src/typed_mpt.rs @@ -129,7 +129,7 @@ impl TrieKey { pub fn from_slot_position(pos: U256) -> Self { let mut bytes = [0; 32]; pos.to_big_endian(&mut bytes); - Self::from_hash(keccak_hash::keccak(bytes)) + Self::from_hash(keccak_hash::keccak(H256::from_slice(&bytes))) } pub fn from_hash(H256(bytes): H256) -> Self { Self::new(AsNibbles(bytes)).expect("32 bytes is 64 nibbles, which fits") diff --git a/zero/src/rpc/native/state.rs b/zero/src/rpc/native/state.rs index e2d64e4df..833bb9070 100644 --- a/zero/src/rpc/native/state.rs +++ b/zero/src/rpc/native/state.rs @@ -107,7 +107,7 @@ fn insert_beacon_roots_update( (timestamp % chunk).into(), // timestamp_idx ((timestamp % chunk) + chunk).into(), // root_idx ]); - state_access.insert(BEACON_ROOTS_CONTRACT_ADDRESS.0.into(), keys); + state_access.insert(BEACON_ROOTS_CONTRACT_ADDRESS.as_fixed_bytes().into(), keys); Ok(()) }