diff --git a/evm/Cargo.toml b/evm/Cargo.toml index 0c1e651e..6db81902 100644 --- a/evm/Cargo.toml +++ b/evm/Cargo.toml @@ -7,11 +7,11 @@ edition = "2021" [dependencies] plonky2 = { path = "../plonky2", default-features = false, features = ["rand", "timing"] } plonky2_util = { path = "../util" } -eth-trie-utils = { git = "https://github.com/mir-protocol/eth-trie-utils.git", rev = "c52a04c9f349ac812b886f383a7306b27c8b96dc" } +eth-trie-utils = { git = "https://github.com/mir-protocol/eth-trie-utils.git", rev = "dd3595b4ba7923f8d465450d210f17a2b4e20f96" } maybe_rayon = { path = "../maybe_rayon" } anyhow = "1.0.40" env_logger = "0.9.0" -ethereum-types = "0.13.1" +ethereum-types = "0.14.0" hex = { version = "0.4.3", optional = true } hex-literal = "0.3.4" itertools = "0.10.3" diff --git a/evm/src/cpu/kernel/interpreter.rs b/evm/src/cpu/kernel/interpreter.rs index 7577b974..877e24ab 100644 --- a/evm/src/cpu/kernel/interpreter.rs +++ b/evm/src/cpu/kernel/interpreter.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use anyhow::{anyhow, bail, ensure}; -use ethereum_types::{BigEndianHash, U256, U512}; +use ethereum_types::{U256, U512}; use keccak_hash::keccak; use plonky2::field::goldilocks_field::GoldilocksField; @@ -444,7 +444,7 @@ impl<'a> Interpreter<'a> { }) .collect::>(); let hash = keccak(bytes); - self.push(hash.into_uint()); + self.push(U256::from_big_endian(hash.as_bytes())); } fn run_prover_input(&mut self) -> anyhow::Result<()> { diff --git a/evm/src/generation/mpt.rs b/evm/src/generation/mpt.rs index f689b613..0bdfede4 100644 --- a/evm/src/generation/mpt.rs +++ b/evm/src/generation/mpt.rs @@ -52,7 +52,7 @@ pub(crate) fn mpt_prover_inputs( prover_inputs.push((PartialTrieType::of(trie) as u32).into()); match trie { PartialTrie::Empty => {} - PartialTrie::Hash(h) => prover_inputs.push(*h), + PartialTrie::Hash(h) => prover_inputs.push(U256::from_big_endian(h.as_bytes())), PartialTrie::Branch { children, value } => { for child in children { mpt_prover_inputs(child, prover_inputs, parse_leaf);