Skip to content

Commit 23b81da

Browse files
authored
Merge branch 'main' into evalir/migrate-to-latest-reth
2 parents 4f57ecd + b8251ff commit 23b81da

File tree

7 files changed

+22
-24
lines changed

7 files changed

+22
-24
lines changed

crates/evm/src/driver.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
BlockResult, EvmNeedsTx, EvmTransacted, RunTxResult, SignetLayered, ToRethPrimitive, BASE_GAS,
55
};
66
use alloy::{
7-
consensus::{ReceiptEnvelope, Transaction as _},
7+
consensus::{Header, ReceiptEnvelope, Transaction as _, TxType},
88
eips::eip1559::{BaseFeeParams, INITIAL_BASE_FEE as EIP1559_INITIAL_BASE_FEE},
99
primitives::{Address, Bloom, U256},
1010
};
@@ -14,11 +14,6 @@ use reth::{
1414
Block, BlockBody, Header, Receipt, RecoveredBlock, SealedHeader, TransactionSigned, TxType,
1515
},
1616
providers::ExecutionOutcome,
17-
revm::{
18-
context::{ContextTr, TransactTo},
19-
context_interface::block::BlobExcessGasAndPrice,
20-
Inspector,
21-
},
2217
};
2318
use signet_extract::{ExtractedEvent, Extracts};
2419
use signet_types::{constants::SignetSystemConstants, AggregateFills, MarketError};
@@ -31,10 +26,11 @@ use trevm::{
3126
revm::{
3227
context::{
3328
result::{EVMError, ExecutionResult},
34-
BlockEnv, CfgEnv, TxEnv,
29+
BlockEnv, CfgEnv, ContextTr, TransactTo, TxEnv,
3530
},
31+
context_interface::block::BlobExcessGasAndPrice,
3632
database::State,
37-
Database, DatabaseCommit,
33+
Database, DatabaseCommit, Inspector,
3834
},
3935
trevm_try, BlockDriver, BlockOutput, Tx,
4036
};

crates/evm/src/journal/coder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use crate::{AcctDiff, BundleStateIndex, HostJournal, InfoOutcome};
22
use alloy::primitives::{Address, Bytes, B256, U256};
33
use alloy::rlp::{Buf, BufMut};
44
use eyre::Result;
5-
use reth::revm::{
5+
use signet_zenith::Zenith;
6+
use std::{borrow::Cow, collections::BTreeMap, fmt::Debug, sync::Arc};
7+
use trevm::revm::{
68
db::{states::StorageSlot, BundleState},
79
primitives::{AccountInfo, Bytecode, Eof},
810
};
9-
use std::{borrow::Cow, collections::BTreeMap, fmt::Debug, sync::Arc};
10-
use signet_zenith::Zenith;
1111

1212
const TAG_ACCT_CREATED: u8 = 0;
1313
const TAG_ACCT_DIFF: u8 = 1;

crates/evm/src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ mod sys_log;
4343

4444
pub(crate) const BASE_GAS: usize = 21_000;
4545

46-
/// Type alias for EVMs using a [`StateProviderBox`] as the `DB` type for
47-
/// trevm.
48-
///
49-
/// [`StateProviderBox`]: reth::providers::StateProviderBox
50-
pub type RuRevmState = reth::revm::db::State<
51-
reth::revm::database::StateProviderDatabase<reth::providers::StateProviderBox>,
52-
>;
53-
5446
/// Create a new EVM with the given database.
5547
pub fn signet_evm<Db: Database + DatabaseCommit>(
5648
db: Db,

crates/evm/src/orders/inspector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ use alloy::{
33
primitives::{Address, Log, U256},
44
sol_types::SolEvent,
55
};
6-
use reth::revm::interpreter::InterpreterTypes;
76
use signet_types::{constants::SignetSystemConstants, AggregateFills, AggregateOrders};
87
use signet_zenith::RollupOrders;
98
use trevm::{
109
helpers::Ctx,
1110
revm::{
1211
interpreter::{
1312
CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs, Interpreter,
13+
InterpreterTypes,
1414
},
1515
Database, Inspector,
1616
},

crates/evm/src/orders/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ pub use framed::{Framed, FramedFilleds, FramedOrders};
44
mod inspector;
55
pub use inspector::OrderDetector;
66

7-
use reth::revm::interpreter::{interpreter::EthInterpreter, InterpreterTypes};
87
use trevm::{
98
helpers::Ctx,
109
inspectors::Layered,
11-
revm::{Database, Inspector},
10+
revm::{
11+
interpreter::{interpreter::EthInterpreter, InterpreterTypes},
12+
Database, Inspector,
13+
},
1214
};
1315

1416
/// Inspector containing an accessible [`OrderDetector`].

crates/rpc/src/ctx.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use reth::{
4040
use reth_chainspec::{BaseFeeParams, ChainSpec, ChainSpecProvider};
4141
use reth_node_api::{BlockBody, FullNodeComponents};
4242
use reth_rpc_eth_api::{RpcBlock, RpcReceipt, RpcTransaction};
43-
use signet_evm::{EvmNeedsTx, RuRevmState};
43+
use signet_evm::EvmNeedsTx;
4444
use signet_tx_cache::client::TxCache;
4545
use signet_types::{constants::SignetSystemConstants, MagicSig};
4646
use std::{marker::PhantomData, sync::Arc};
@@ -50,6 +50,14 @@ use trevm::{
5050
Cfg,
5151
};
5252

53+
/// Type alias for EVMs using a [`StateProviderBox`] as the `DB` type for
54+
/// trevm.
55+
///
56+
/// [`StateProviderBox`]: reth::providers::StateProviderBox
57+
pub type RuRevmState = trevm::revm::database::State<
58+
reth::revm::database::StateProviderDatabase<reth::providers::StateProviderBox>,
59+
>;
60+
5361
/// The maximum number of headers we read at once when handling a range filter.
5462
const MAX_HEADERS_RANGE: u64 = 1_000; // with ~530bytes per header this is ~500kb
5563

crates/rpc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ mod config;
5252
pub use config::{RpcServerGuard, ServeConfig};
5353

5454
mod ctx;
55-
pub use ctx::RpcCtx;
55+
pub use ctx::{RpcCtx, RuRevmState};
5656

5757
mod eth;
5858
pub use eth::{eth, CallErrorData, EthError};

0 commit comments

Comments
 (0)