diff --git a/leader/src/mpt.rs b/leader/src/mpt.rs index aaccda8..c888204 100644 --- a/leader/src/mpt.rs +++ b/leader/src/mpt.rs @@ -275,7 +275,7 @@ pub fn apply_diffs( mpt.insert( address2nibbles(*addr), __ethers_for_compat::utils::rlp::encode(&account).to_vec(), - ) // TODO(aatifsyed): make the required change to evm_arithmetization + ) .unwrap(); } else { let old = mpt @@ -375,6 +375,9 @@ pub fn trim( } fn into_uint(hash: B256) -> U256 { - U256::from_be_bytes(*hash) // TODO(aatifsyed): is this - // right? + // TODO(aatifsyed): unclear if this is correct. + #[cfg(target_endian = "little")] + return U256::from_le_bytes(*hash); + #[cfg(target_endian = "big")] + return U256::from_be_bytes(*hash); } diff --git a/leader/src/utils.rs b/leader/src/utils.rs index d81dfa1..dd884a7 100644 --- a/leader/src/utils.rs +++ b/leader/src/utils.rs @@ -27,7 +27,9 @@ pub fn has_storage_deletion(trace: &GethTrace) -> bool { false } /// This crate wants to use [`alloy`], but [`evm_arithmetization`] uses -/// [`ethers`] etc. Migrating our dependencies is tracked by TODO(aatifsyed) +/// [`ethers`](__ethers_for_compat) etc. +/// +/// Migrating our dependencies is tracked by [zk_evm#226](https://github.com/0xPolygonZero/zk_evm/issues/229) pub mod compat { use std::array;