mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: alloy-evm and new revm integration (#14021)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: rakita <rakita@users.noreply.github.com>
This commit is contained in:
@ -29,7 +29,7 @@ itertools = { workspace = true, features = ["use_alloc"] }
|
||||
nybbles = { workspace = true, features = ["rlp"] }
|
||||
|
||||
# reth
|
||||
revm.workspace = true
|
||||
revm-database.workspace = true
|
||||
|
||||
# `serde` feature
|
||||
serde = { workspace = true, optional = true }
|
||||
@ -62,6 +62,7 @@ bincode.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde_with.workspace = true
|
||||
revm-state.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@ -80,7 +81,8 @@ std = [
|
||||
"serde?/std",
|
||||
"serde_with?/std",
|
||||
"serde_json/std",
|
||||
"revm/std",
|
||||
"revm-database/std",
|
||||
"revm-state/std",
|
||||
]
|
||||
eip1186 = [
|
||||
"alloy-rpc-types-eth/serde",
|
||||
@ -96,7 +98,8 @@ serde = [
|
||||
"alloy-rpc-types-eth?/serde",
|
||||
"reth-primitives-traits/serde",
|
||||
"reth-codecs?/serde",
|
||||
"revm/serde",
|
||||
"revm-database/serde",
|
||||
"revm-state/serde",
|
||||
]
|
||||
reth-codec = [
|
||||
"dep:reth-codecs",
|
||||
@ -114,7 +117,6 @@ test-utils = [
|
||||
"arbitrary",
|
||||
"reth-primitives-traits/test-utils",
|
||||
"reth-codecs/test-utils",
|
||||
"revm/test-utils",
|
||||
]
|
||||
arbitrary = [
|
||||
"std",
|
||||
@ -128,7 +130,6 @@ arbitrary = [
|
||||
"nybbles/arbitrary",
|
||||
"reth-codecs/arbitrary",
|
||||
"alloy-rpc-types-eth?/arbitrary",
|
||||
"revm/arbitrary",
|
||||
]
|
||||
rayon = ["dep:rayon"]
|
||||
|
||||
|
||||
@ -9,15 +9,15 @@ use alloy_primitives::{
|
||||
Address, B256, U256,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use reth_primitives_traits::Account;
|
||||
use revm::db::{AccountStatus, BundleAccount};
|
||||
|
||||
#[cfg(feature = "rayon")]
|
||||
pub use rayon::*;
|
||||
use reth_primitives_traits::Account;
|
||||
|
||||
#[cfg(feature = "rayon")]
|
||||
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
|
||||
|
||||
use revm_database::{AccountStatus, BundleAccount};
|
||||
|
||||
/// Representation of in-memory hashed state.
|
||||
#[derive(PartialEq, Eq, Clone, Default, Debug)]
|
||||
pub struct HashedPostState {
|
||||
@ -381,10 +381,8 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::KeccakKeyHasher;
|
||||
use alloy_primitives::Bytes;
|
||||
use revm::{
|
||||
db::{states::StorageSlot, StorageWithOriginalValues},
|
||||
primitives::{AccountInfo, Bytecode},
|
||||
};
|
||||
use revm_database::{states::StorageSlot, StorageWithOriginalValues};
|
||||
use revm_state::{AccountInfo, Bytecode};
|
||||
|
||||
#[test]
|
||||
fn hashed_state_wiped_extension() {
|
||||
@ -470,7 +468,7 @@ mod tests {
|
||||
balance: U256::from(123),
|
||||
nonce: 42,
|
||||
code_hash: B256::random(),
|
||||
code: Some(Bytecode::LegacyRaw(Bytes::from(vec![1, 2]))),
|
||||
code: Some(Bytecode::new_raw(Bytes::from(vec![1, 2]))),
|
||||
};
|
||||
|
||||
let mut storage = StorageWithOriginalValues::default();
|
||||
|
||||
Reference in New Issue
Block a user