Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/block-processor/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use reth::revm::primitives::hardfork::SpecId;
use reth_chainspec::EthereumHardforks;
use trevm::revm::primitives::hardfork::SpecId;

/// Equivalent to [`reth_evm_ethereum::revm_spec`], however, always starts at
/// [`SpecId::PRAGUE`] and transitions to [`SpecId::OSAKA`].
Expand Down
10 changes: 6 additions & 4 deletions crates/db/src/aliases.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use reth::providers::DatabaseProviderRW;
use reth::{
providers::{DatabaseProviderRW, StateProviderBox},
revm::database::StateProviderDatabase,
};
use signet_node_types::SignetNodeTypes;
use trevm::revm::database::State;

/// A Convenience alias for a [`DatabaseProviderRW`] using [`SignetNodeTypes`].
pub type SignetDbRw<Db> = DatabaseProviderRW<Db, SignetNodeTypes<Db>>;
Expand All @@ -8,6 +12,4 @@ pub type SignetDbRw<Db> = DatabaseProviderRW<Db, SignetNodeTypes<Db>>;
/// trevm.
///
/// [`StateProviderBox`]: reth::providers::StateProviderBox
pub type RuRevmState = trevm::revm::database::State<
reth::revm::database::StateProviderDatabase<reth::providers::StateProviderBox>,
>;
pub type RuRevmState = State<StateProviderDatabase<StateProviderBox>>;
7 changes: 5 additions & 2 deletions crates/rpc/src/ctx/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use signet_tx_cache::client::TxCache;
use signet_types::constants::SignetSystemConstants;
use std::sync::Arc;
use tokio::sync::{AcquireError, OwnedSemaphorePermit, Semaphore};
use trevm::{helpers::Ctx, revm::Inspector};
use trevm::{
helpers::Ctx,
revm::{Inspector, inspector::NoOpInspector},
};

/// State location when instantiating an EVM instance.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down Expand Up @@ -248,7 +251,7 @@ where
state: LoadState,
header: &Header,
) -> Result<EvmNeedsTx<RuRevmState>, EthApiError> {
self.trevm_with_inspector(state, header, trevm::revm::inspector::NoOpInspector)
self.trevm_with_inspector(state, header, NoOpInspector)
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/src/ctx/signet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use reth::{
ProviderError, ProviderResult, ReceiptProvider, StateProviderFactory, TransactionsProvider,
providers::BlockchainProvider,
},
revm::{database::StateProviderDatabase, primitives::hardfork::SpecId},
revm::database::StateProviderDatabase,
rpc::{
eth::{filter::EthFilterError, helpers::types::EthRpcConverter},
server_types::eth::{
Expand All @@ -48,7 +48,7 @@ use std::{marker::PhantomData, sync::Arc};
use tracing::{Level, instrument, trace};
use trevm::{
Cfg,
revm::{context::CfgEnv, database::StateBuilder},
revm::{context::CfgEnv, database::StateBuilder, primitives::hardfork::SpecId},
};

/// The maximum number of headers we read at once when handling a range filter.
Expand Down
19 changes: 8 additions & 11 deletions crates/rpc/src/debug/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
//! In particular the `debug_trace_call` function.

use crate::DebugError;
use reth::{
revm::{DatabaseRef, context::ContextTr},
rpc::{
server_types::eth::EthApiError,
types::{
TransactionInfo,
trace::geth::{
FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerConfig,
GethDebugTracerType, GethDebugTracingOptions, GethTrace, NoopFrame,
},
use reth::rpc::{
server_types::eth::EthApiError,
types::{
TransactionInfo,
trace::geth::{
FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerConfig, GethDebugTracerType,
GethDebugTracingOptions, GethTrace, NoopFrame,
},
},
};
Expand All @@ -23,7 +20,7 @@ use signet_evm::{EvmNeedsTx, EvmReady};
use tracing::instrument;
use trevm::{
helpers::Ctx,
revm::{Database, DatabaseCommit, Inspector},
revm::{Database, DatabaseCommit, DatabaseRef, Inspector, context::ContextTr},
};

/// Trace a transaction using the provided EVM and tracing options.
Expand Down
12 changes: 5 additions & 7 deletions crates/rpc/src/eth/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use signet_evm::EvmErrored;
use signet_node_types::Pnt;
use std::borrow::Cow;
use tracing::{Instrument, debug, trace_span};
use trevm::revm::context::result::ExecutionResult;
use trevm::{EstimationResult, MIN_TRANSACTION_GAS, revm::context::result::ExecutionResult};

/// Args for `eth_estimateGas` and `eth_call`.
#[derive(Debug, Deserialize)]
Expand Down Expand Up @@ -407,7 +407,7 @@ where
/// - Otherwise, do nothing
const fn normalize_gas_stateless(request: &mut TransactionRequest, max_gas: u64) {
match request.gas {
Some(..trevm::MIN_TRANSACTION_GAS) => request.gas = None,
Some(..MIN_TRANSACTION_GAS) => request.gas = None,
Some(val) if val > max_gas => request.gas = Some(max_gas),
_ => {}
}
Expand Down Expand Up @@ -568,16 +568,14 @@ where
let (estimate, _) = response_tri!(trevm.estimate_gas().map_err(EvmErrored::into_error));

match estimate {
trevm::EstimationResult::Success { limit, .. } => {
ResponsePayload::Success(U64::from(limit))
}
trevm::EstimationResult::Revert { reason, .. } => {
EstimationResult::Success { limit, .. } => ResponsePayload::Success(U64::from(limit)),
EstimationResult::Revert { reason, .. } => {
ResponsePayload::internal_error_with_message_and_obj(
"execution reverted".into(),
reason.clone().into(),
)
}
trevm::EstimationResult::Halt { reason, .. } => {
EstimationResult::Halt { reason, .. } => {
ResponsePayload::internal_error_with_message_and_obj(
"execution halted".into(),
format!("{reason:?}").into(),
Expand Down
Loading