mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: avoid zstd dependency in reth-evm, reth-evm-ethereum and reth-optimism-evm (#14356)
This commit is contained in:
@ -15,10 +15,10 @@ workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-ethereum-forks.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-primitives = { workspace = true, features = ["reth-codec"] }
|
||||
reth-revm.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-ethereum-consensus.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
revm.workspace = true
|
||||
|
||||
# Ethereum
|
||||
revm-primitives.workspace = true
|
||||
@ -53,6 +53,7 @@ std = [
|
||||
"alloy-eips/std",
|
||||
"alloy-genesis/std",
|
||||
"alloy-primitives/std",
|
||||
"revm/std",
|
||||
"revm-primitives/std",
|
||||
"secp256k1/std",
|
||||
"reth-ethereum-forks/std",
|
||||
|
||||
@ -21,7 +21,7 @@ use reth_evm::{
|
||||
};
|
||||
use reth_primitives::{EthPrimitives, Receipt, RecoveredBlock};
|
||||
use reth_primitives_traits::{BlockBody, SignedTransaction};
|
||||
use reth_revm::db::State;
|
||||
use revm::db::State;
|
||||
use revm_primitives::{db::DatabaseCommit, ResultAndState};
|
||||
|
||||
/// Factory for [`EthExecutionStrategy`].
|
||||
|
||||
@ -25,7 +25,7 @@ use reth_chainspec::{ChainSpec, EthChainSpec, MAINNET};
|
||||
use reth_evm::{env::EvmEnv, ConfigureEvm, ConfigureEvmEnv, Database, Evm, NextBlockEnvAttributes};
|
||||
use reth_primitives::TransactionSigned;
|
||||
use reth_primitives_traits::transaction::execute::FillTxEnv;
|
||||
use reth_revm::{inspector_handle_register, EvmBuilder};
|
||||
use revm::{inspector_handle_register, EvmBuilder};
|
||||
use revm_primitives::{
|
||||
AnalysisKind, BlobExcessGasAndPrice, BlockEnv, Bytes, CfgEnv, CfgEnvWithHandlerCfg, EVMError,
|
||||
HaltReason, HandlerCfg, ResultAndState, SpecId, TxEnv, TxKind,
|
||||
@ -47,7 +47,7 @@ pub mod eip6110;
|
||||
/// Ethereum EVM implementation.
|
||||
#[derive(derive_more::Debug, derive_more::Deref, derive_more::DerefMut, derive_more::From)]
|
||||
#[debug(bound(DB::Error: Debug))]
|
||||
pub struct EthEvm<'a, EXT, DB: Database>(reth_revm::Evm<'a, EXT, DB>);
|
||||
pub struct EthEvm<'a, EXT, DB: Database>(revm::Evm<'a, EXT, DB>);
|
||||
|
||||
impl<EXT, DB: Database> Evm for EthEvm<'_, EXT, DB> {
|
||||
type DB = DB;
|
||||
@ -267,7 +267,7 @@ impl ConfigureEvm for EthEvmConfig {
|
||||
) -> Self::Evm<'_, DB, I>
|
||||
where
|
||||
DB: Database,
|
||||
I: reth_revm::GetInspector<DB>,
|
||||
I: revm::GetInspector<DB>,
|
||||
{
|
||||
let cfg_env_with_handler_cfg = CfgEnvWithHandlerCfg {
|
||||
cfg_env: evm_env.cfg_env,
|
||||
@ -293,7 +293,7 @@ mod tests {
|
||||
use alloy_primitives::U256;
|
||||
use reth_chainspec::{Chain, ChainSpec, MAINNET};
|
||||
use reth_evm::{env::EvmEnv, execute::ProviderError};
|
||||
use reth_revm::{
|
||||
use revm::{
|
||||
db::{CacheDB, EmptyDBTyped},
|
||||
inspectors::NoOpInspector,
|
||||
primitives::{BlockEnv, CfgEnv, SpecId},
|
||||
|
||||
@ -19,8 +19,8 @@ reth-execution-errors.workspace = true
|
||||
reth-execution-types.workspace = true
|
||||
reth-metrics = { workspace = true, optional = true }
|
||||
reth-primitives.workspace = true
|
||||
reth-ethereum-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-revm.workspace = true
|
||||
reth-storage-errors.workspace = true
|
||||
|
||||
revm.workspace = true
|
||||
@ -50,13 +50,13 @@ std = [
|
||||
"reth-consensus/std",
|
||||
"reth-primitives/std",
|
||||
"reth-primitives-traits/std",
|
||||
"reth-revm/std",
|
||||
"alloy-eips/std",
|
||||
"alloy-primitives/std",
|
||||
"alloy-consensus/std",
|
||||
"revm-primitives/std",
|
||||
"revm/std",
|
||||
"reth-ethereum-forks/std",
|
||||
"reth-ethereum-primitives/std",
|
||||
"reth-chainspec/std",
|
||||
"reth-consensus-common/std",
|
||||
]
|
||||
@ -64,8 +64,8 @@ test-utils = [
|
||||
"dep:parking_lot",
|
||||
"reth-chainspec/test-utils",
|
||||
"reth-consensus/test-utils",
|
||||
"reth-ethereum-primitives/test-utils",
|
||||
"reth-primitives/test-utils",
|
||||
"reth-primitives-traits/test-utils",
|
||||
"reth-revm/test-utils",
|
||||
"revm/test-utils",
|
||||
]
|
||||
|
||||
@ -8,7 +8,7 @@ pub use reth_execution_errors::{
|
||||
pub use reth_execution_types::{BlockExecutionOutput, ExecutionOutcome};
|
||||
pub use reth_storage_errors::provider::ProviderError;
|
||||
|
||||
use crate::{system_calls::OnStateHook, Database};
|
||||
use crate::{batch::BlockBatchRecord, system_calls::OnStateHook, Database};
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_primitives::{
|
||||
@ -17,7 +17,6 @@ use alloy_primitives::{
|
||||
};
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_primitives::{NodePrimitives, Receipt, RecoveredBlock};
|
||||
use reth_revm::batch::BlockBatchRecord;
|
||||
use revm::{
|
||||
db::{states::bundle_state::BundleRetention, BundleState},
|
||||
State,
|
||||
|
||||
@ -25,6 +25,7 @@ use reth_primitives_traits::{BlockHeader, SignedTransaction};
|
||||
use revm::{DatabaseCommit, GetInspector};
|
||||
use revm_primitives::{BlockEnv, ResultAndState, TxEnv, TxKind};
|
||||
|
||||
pub mod batch;
|
||||
pub mod either;
|
||||
/// EVM environment configuration.
|
||||
pub mod env;
|
||||
|
||||
@ -17,7 +17,6 @@ reth-ethereum-forks.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-revm.workspace = true
|
||||
reth-execution-errors.workspace = true
|
||||
reth-execution-types.workspace = true
|
||||
reth-prune-types.workspace = true
|
||||
|
||||
@ -24,7 +24,7 @@ use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::{transaction::signed::OpTransaction, DepositReceipt, OpPrimitives};
|
||||
use reth_primitives::{NodePrimitives, RecoveredBlock};
|
||||
use reth_primitives_traits::{BlockBody, SignedTransaction};
|
||||
use reth_revm::State;
|
||||
use revm::State;
|
||||
use revm_primitives::{db::DatabaseCommit, ResultAndState};
|
||||
use tracing::trace;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ use reth_optimism_consensus::next_block_base_fee;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::OpTransactionSigned;
|
||||
use reth_primitives_traits::FillTxEnv;
|
||||
use reth_revm::{
|
||||
use revm::{
|
||||
inspector_handle_register,
|
||||
primitives::{AnalysisKind, CfgEnvWithHandlerCfg, TxEnv},
|
||||
EvmBuilder, GetInspector,
|
||||
@ -49,7 +49,7 @@ use revm_primitives::{
|
||||
/// OP EVM implementation.
|
||||
#[derive(derive_more::Debug, derive_more::Deref, derive_more::DerefMut, derive_more::From)]
|
||||
#[debug(bound(DB::Error: Debug))]
|
||||
pub struct OpEvm<'a, EXT, DB: Database>(reth_revm::Evm<'a, EXT, DB>);
|
||||
pub struct OpEvm<'a, EXT, DB: Database>(revm::Evm<'a, EXT, DB>);
|
||||
|
||||
impl<EXT, DB: Database> Evm for OpEvm<'_, EXT, DB> {
|
||||
type DB = DB;
|
||||
@ -297,7 +297,7 @@ mod tests {
|
||||
use reth_optimism_chainspec::BASE_MAINNET;
|
||||
use reth_optimism_primitives::{OpBlock, OpPrimitives, OpReceipt};
|
||||
use reth_primitives::{Account, Log, RecoveredBlock};
|
||||
use reth_revm::{
|
||||
use revm::{
|
||||
db::{BundleState, CacheDB, EmptyDBTyped},
|
||||
inspectors::NoOpInspector,
|
||||
primitives::{AccountInfo, BlockEnv, CfgEnv, SpecId},
|
||||
|
||||
@ -14,13 +14,11 @@ workspace = true
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-ethereum-primitives.workspace = true
|
||||
reth-storage-errors.workspace = true
|
||||
reth-storage-api.workspace = true
|
||||
reth-trie = { workspace = true, optional = true }
|
||||
|
||||
# alloy
|
||||
alloy-eips.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# revm
|
||||
@ -38,10 +36,8 @@ std = [
|
||||
"reth-primitives-traits/std",
|
||||
"alloy-primitives/std",
|
||||
"revm/std",
|
||||
"alloy-eips/std",
|
||||
"alloy-consensus/std",
|
||||
"reth-ethereum-forks/std",
|
||||
"reth-ethereum-primitives/std",
|
||||
]
|
||||
witness = ["dep:reth-trie"]
|
||||
test-utils = [
|
||||
@ -49,11 +45,9 @@ test-utils = [
|
||||
"reth-primitives-traits/test-utils",
|
||||
"reth-trie?/test-utils",
|
||||
"revm/test-utils",
|
||||
"reth-ethereum-primitives/test-utils",
|
||||
]
|
||||
serde = [
|
||||
"revm/serde",
|
||||
"alloy-eips/serde",
|
||||
"alloy-primitives/serde",
|
||||
"alloy-consensus/serde",
|
||||
"reth-trie?/serde",
|
||||
|
||||
@ -11,8 +11,6 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod batch;
|
||||
|
||||
/// Cache database that reads from an underlying [`DatabaseRef`].
|
||||
/// Database adapters for payload building.
|
||||
pub mod cached;
|
||||
|
||||
Reference in New Issue
Block a user