mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: block executor provider and ethereum + op impl (#7594)
Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
@ -18,6 +18,7 @@ reth-interfaces.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-consensus-common.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-trie = { workspace = true, optional = true }
|
||||
|
||||
# revm
|
||||
revm.workspace = true
|
||||
@ -30,6 +31,7 @@ tracing.workspace = true
|
||||
reth-trie.workspace = true
|
||||
|
||||
[features]
|
||||
test-utils = ["dep:reth-trie"]
|
||||
optimism = [
|
||||
"revm/optimism",
|
||||
"reth-primitives/optimism",
|
||||
|
||||
@ -38,7 +38,7 @@ pub mod stack;
|
||||
pub mod optimism;
|
||||
|
||||
/// Common test helpers
|
||||
#[cfg(test)]
|
||||
#[cfg(any(test, feature = "test-utils"))]
|
||||
pub mod test_utils;
|
||||
|
||||
// Convenience re-exports.
|
||||
|
||||
@ -460,20 +460,16 @@ pub fn compare_receipts_root_and_logs_bloom(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::collections::HashMap;
|
||||
|
||||
use revm::{Database, TransitionState};
|
||||
|
||||
use super::*;
|
||||
use crate::test_utils::{StateProviderTest, TestEvmConfig};
|
||||
use reth_primitives::{
|
||||
bytes,
|
||||
constants::{BEACON_ROOTS_ADDRESS, EIP1559_INITIAL_BASE_FEE, SYSTEM_ADDRESS},
|
||||
keccak256, Account, Bytes, ChainSpecBuilder, ForkCondition, Signature, Transaction,
|
||||
TransactionKind, TxEip1559, MAINNET,
|
||||
};
|
||||
|
||||
use crate::test_utils::{StateProviderTest, TestEvmConfig};
|
||||
|
||||
use super::*;
|
||||
use revm::{Database, TransitionState};
|
||||
use std::collections::HashMap;
|
||||
|
||||
static BEACON_ROOT_CONTRACT_CODE: Bytes = bytes!("3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500");
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ use {
|
||||
},
|
||||
};
|
||||
|
||||
/// Mock state for testing
|
||||
#[derive(Debug, Default, Clone, Eq, PartialEq)]
|
||||
pub struct StateProviderTest {
|
||||
accounts: HashMap<Address, (HashMap<StorageKey, U256>, Account)>,
|
||||
|
||||
Reference in New Issue
Block a user