From 2f9a6938af174878f4194607fa2702e3e994454c Mon Sep 17 00:00:00 2001 From: Fraser Hutchison <190532+Fraser999@users.noreply.github.com> Date: Fri, 22 May 2026 15:56:24 +0100 Subject: [PATCH] remove revm/portable from default feature set --- Cargo.toml | 7 +++---- src/evm/has_tx.rs | 4 +++- src/evm/need_tx.rs | 7 +++---- src/evm/ready.rs | 10 +++++----- src/evm/transacted.rs | 6 +++--- src/fill/fillers.rs | 10 ++++++++-- 6 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6cd9b01..302367a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trevm" -version = "0.34.2" +version = "0.34.3" rust-version = "1.83.0" edition = "2021" authors = ["init4"] @@ -48,7 +48,7 @@ revm = { version = "34", default-features = false } revm-inspectors = { version = "0.34", optional = true } dashmap = { version = "6.1.0", optional = true } -tracing = { version = "0.1.41", optional = true } +tracing = "0.1.41" thiserror = "2.0.11" tokio = { version = "1.44", optional = true } @@ -74,7 +74,6 @@ default = [ "revm/std", "revm/c-kzg", "revm/blst", - "revm/portable", "revm/secp256k1", ] @@ -85,7 +84,7 @@ call = ["optional_eip3607", "optional_no_base_fee"] concurrent-db = ["dep:dashmap"] -estimate_gas = ["optional_eip3607", "optional_no_base_fee", "dep:tracing"] +estimate_gas = ["optional_eip3607", "optional_no_base_fee"] test-utils = ["revm/std", "revm/serde-json", "revm/alloydb", "alloy/signers", "alloy/signer-local"] diff --git a/src/evm/has_tx.rs b/src/evm/has_tx.rs index 70d17d4..9465a29 100644 --- a/src/evm/has_tx.rs +++ b/src/evm/has_tx.rs @@ -1,4 +1,6 @@ -use crate::{helpers::Ctx, EvmErrored, HasBlock, HasCfg, HasTx, Trevm, Tx}; +use crate::{helpers::Ctx, EvmErrored, HasTx, Trevm, Tx}; +#[cfg(feature = "call")] +use crate::{HasBlock, HasCfg}; use alloy::{ eips::eip7825::MAX_TX_GAS_LIMIT_OSAKA, primitives::{Address, Bytes, U256}, diff --git a/src/evm/need_tx.rs b/src/evm/need_tx.rs index b242748..5542a19 100644 --- a/src/evm/need_tx.rs +++ b/src/evm/need_tx.rs @@ -5,10 +5,9 @@ use crate::{ EvmTransacted, Tx, }; use alloy::rpc::types::BlockOverrides; -use revm::{ - context::{result::ExecutionResult, ContextTr}, - Database, DatabaseCommit, Inspector, -}; +#[cfg(feature = "call")] +use revm::context::result::ExecutionResult; +use revm::{context::ContextTr, Database, DatabaseCommit, Inspector}; impl EvmNeedsTx where diff --git a/src/evm/ready.rs b/src/evm/ready.rs index 80627b6..9ee21bc 100644 --- a/src/evm/ready.rs +++ b/src/evm/ready.rs @@ -2,11 +2,11 @@ use crate::{ helpers::Ctx, ErroredState, EvmErrored, EvmNeedsTx, EvmReady, EvmTransacted, TransactedState, Trevm, }; -use revm::{ - context::result::{EVMError, ExecutionResult}, - interpreter::gas::calculate_initial_tx_gas_for_tx, - Database, InspectEvm, Inspector, -}; +#[cfg(feature = "estimate_gas")] +use revm::context::result::EVMError; +#[cfg(feature = "call")] +use revm::context::result::ExecutionResult; +use revm::{interpreter::gas::calculate_initial_tx_gas_for_tx, Database, InspectEvm, Inspector}; impl EvmReady where diff --git a/src/evm/transacted.rs b/src/evm/transacted.rs index 82ee8a1..807e9aa 100644 --- a/src/evm/transacted.rs +++ b/src/evm/transacted.rs @@ -1,6 +1,6 @@ -use crate::{ - helpers::Ctx, EvmErrored, EvmNeedsTx, EvmReady, EvmTransacted, NeedsTx, TransactedState, Trevm, -}; +#[cfg(feature = "estimate_gas")] +use crate::EvmReady; +use crate::{helpers::Ctx, EvmErrored, EvmNeedsTx, EvmTransacted, NeedsTx, TransactedState, Trevm}; use alloy::primitives::Bytes; use revm::{ context::{ diff --git a/src/fill/fillers.rs b/src/fill/fillers.rs index 42ea8fe..714e94f 100644 --- a/src/fill/fillers.rs +++ b/src/fill/fillers.rs @@ -1,5 +1,11 @@ -use crate::fill::traits::{Cfg, Tx}; -use revm::context::{BlockEnv, CfgEnv, TxEnv}; +use crate::fill::traits::Cfg; +#[cfg(any(feature = "estimate_gas", feature = "call"))] +use crate::fill::traits::Tx; +#[cfg(feature = "call")] +use revm::context::BlockEnv; +use revm::context::CfgEnv; +#[cfg(any(feature = "estimate_gas", feature = "call"))] +use revm::context::TxEnv; /// A [`Cfg`] that disables gas-related checks and payment of the /// beneficiary reward, while leaving other cfg options unchanged.