Skip to content

Commit fb3fbd0

Browse files
authored
feat: upgrade all reth dependencies from v1.11.3 to v2.0.0 (#207)
* chore(deps): bump all reth dependencies from v1.11.3 to v2.0.0 * fix(deps): use crates.io for reth-codecs and reth-primitives-traits These crates were extracted from the reth monorepo in v2.0.0 and published to crates.io as version 0.1.0. Update workspace dependencies to reference crates.io instead of the git repository. * fix(ev-primitives): adapt to reth v2.0.0 API changes - Remove serde-bincode-compat feature (removed from reth-primitives-traits) - Remove RlpBincode impl (trait no longer exists) - Remove explicit SignedTransaction impls (now blanket-implemented) - Update Decompress::decompress to return DecompressError instead of DatabaseError - Update imports accordingly * fix(ev-precompiles): adapt to reth v2.0.0 API changes - Remove unused reth-primitives dependency (crate removed in v2.0.0) - Remove is_pure method from Precompile impl (removed from trait in revm 36) * fix(ev-revm): adapt to revm 36 / alloy-evm 0.30 API changes * fix(evolve): adapt consensus to reth v2.0.0, migrate reth-primitives imports * fix(node): adapt to reth v2.0.0 breaking changes - Remove reth-primitives dependency (deleted upstream) - Remove PayloadBuilderAttributes trait (merged into PayloadAttributes) - Refactor EvolveEnginePayloadBuilderAttributes to impl PayloadAttributes - Change PayloadBuilder::Attributes to EvolveEnginePayloadAttributes - Migrate PayloadConfig to include payload_id field - Migrate BuildArguments to include execution_cache and trie_handle - Rename TransactionEnv to TransactionEnvMut (alloy-evm) - Update TryIntoTxEnv to new 3-generic-param signature - Add consensus_ref to PoolTransaction impl - Fix build_with_tasks generic args (3 → 2) - Add slot_num field to BlockEnv initializers - Remove set_state_clear_flag (handled by EVM spec) - Update BlockBuilder::finish to accept precomputed state root - Fix receipt conversion (replace into_rpc with map_logs) - Fix Withdrawals/Cow type mismatches - Rename extra_data_bytes to extra_data - Fix reth_primitives imports to alloy_consensus/reth_primitives_traits - Update BlockExecutorFactory::create_executor to use StateDB bound - Also remove reth-primitives from tests/Cargo.toml * fix(tests): adapt e2e and unit tests to reth v2.0.0 - Migrate reth_primitives::{Header, Transaction} to alloy_consensus::Header and reth_ethereum_primitives::Transaction - Remove with_disable_proof_v2() from TreeConfig (method removed in v2.0.0) * fix: resolve clippy warnings after reth v2.0.0 upgrade Add missing const fn annotations and remove useless .into() conversion. * refactor: remove dead EvolveEnginePayloadBuilderAttributes type * refactor: remove unused EvEvm::new constructor * refactor: log undecodable tx warnings and extract fee recipient helper * docs: clarify why slot_num is hardcoded to 0 in BlockEnv * test: verify payload builder drops invalid raw transactions gracefully * style: apply cargo fmt after reth v2.0.0 upgrade * style: apply nightly cargo fmt for imports_granularity
1 parent f6647b6 commit fb3fbd0

File tree

26 files changed

+1150
-1220
lines changed

26 files changed

+1150
-1220
lines changed

Cargo.lock

Lines changed: 800 additions & 829 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 56 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,86 +16,84 @@ members = [
1616
[workspace.package]
1717
version = "0.1.0"
1818
edition = "2021"
19-
rust-version = "1.82"
19+
rust-version = "1.93"
2020
license = "MIT OR Apache-2.0"
2121
homepage = "https://github.com/evstack/ev-reth"
2222
repository = "https://github.com/evstack/ev-reth"
2323
authors = ["Evolve Stack Contributors"]
2424

2525
[workspace.dependencies]
26-
# Reth dependencies - Using v1.11.3 stable
27-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
28-
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
29-
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
30-
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
31-
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
32-
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
33-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
34-
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
35-
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
36-
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
37-
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
38-
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
39-
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
40-
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
41-
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
42-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
43-
reth-network = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
44-
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
45-
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
46-
reth-db-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
47-
reth-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
48-
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
49-
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
50-
reth-engine-local = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
51-
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
52-
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
53-
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", features = ["serde", "serde-bincode-compat", "reth-codec"] }
54-
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
55-
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v1.11.3" }
56-
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v1.11.3" }
57-
reth-execution-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
58-
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
59-
reth-node-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
60-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
61-
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
62-
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
63-
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v1.11.3" }
64-
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
65-
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v1.11.3" }
66-
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
67-
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
68-
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
69-
reth-rpc = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
70-
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
71-
reth-codecs = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3" }
26+
# Reth dependencies - Using v2.0.0 stable
27+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
28+
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
29+
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
30+
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
31+
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
32+
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
33+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
34+
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
35+
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
36+
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
37+
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
38+
reth-primitives-traits = { version = "0.1.0", default-features = false }
39+
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
40+
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
41+
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
42+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
43+
reth-network = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
44+
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
45+
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
46+
reth-db-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
47+
reth-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
48+
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
49+
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
50+
reth-engine-local = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
51+
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
52+
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
53+
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", features = ["serde", "reth-codec"] }
54+
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
55+
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v2.0.0" }
56+
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v2.0.0" }
57+
reth-execution-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
58+
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
59+
reth-node-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
60+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
61+
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
62+
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
63+
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
64+
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", default-features = false, tag = "v2.0.0" }
65+
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
66+
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
67+
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
68+
reth-rpc = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
69+
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0" }
70+
reth-codecs = { version = "0.1.0", default-features = false }
7271

7372
ev-revm = { path = "crates/ev-revm" }
7473
ev-primitives = { path = "crates/ev-primitives" }
7574

7675

7776
# Consensus dependencies
78-
reth-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
79-
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
80-
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
77+
reth-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
78+
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
79+
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
8180

8281
# Test dependencies
83-
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
84-
reth-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
85-
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.11.3", default-features = false }
82+
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
83+
reth-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
84+
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v2.0.0", default-features = false }
8685

87-
revm = { version = "34.0.0", default-features = false }
88-
revm-context-interface = { version = "14.0.0", default-features = false }
86+
revm = { version = "36.0.0", default-features = false }
8987

90-
# Alloy dependencies (aligned to reth v1.11.3)
88+
# Alloy dependencies (aligned to reth v2.0.0)
9189
alloy = { version = "1.8.3", features = [
9290
"contract",
9391
"providers",
9492
"provider-http",
9593
"signers",
9694
"reqwest-rustls-tls",
9795
], default-features = false }
98-
alloy-evm = { version = "0.27.2", default-features = false }
96+
alloy-evm = { version = "0.30.0", default-features = false }
9997
alloy-eips = { version = "1.8.3", default-features = false }
10098
alloy-network = { version = "1.8.3", default-features = false }
10199
alloy-provider = { version = "1.8.3", default-features = false }
@@ -118,8 +116,7 @@ alloy-sol-types = { version = "1.5.6", default-features = false }
118116
# Utility dependencies
119117
bytes = "1.10.1"
120118

121-
revm-inspector = "15.0.0"
122-
revm-inspectors = "0.34.2"
119+
revm-inspectors = "0.36.0"
123120

124121
# force newer nybbles for const push_unchecked (needed for Rust 1.92+)
125122
nybbles = "0.4.8"

crates/ev-precompiles/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ license = "MIT"
77

88
[dependencies]
99
# Reth
10-
reth-primitives = { workspace = true }
1110
reth-ethereum = { workspace = true }
1211
reth-revm = { workspace = true }
1312

crates/ev-precompiles/src/mint.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,6 @@ impl Precompile for MintPrecompile {
251251
}
252252
}
253253
}
254-
255-
fn is_pure(&self) -> bool {
256-
false
257-
}
258254
}
259255

260256
#[cfg(test)]

crates/ev-primitives/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,5 @@ bytes = { workspace = true }
1515
reth-codecs = { workspace = true }
1616
reth-db-api = { workspace = true }
1717
reth-ethereum-primitives = { workspace = true }
18-
reth-primitives-traits = { workspace = true, features = ["serde-bincode-compat"] }
18+
reth-primitives-traits = { workspace = true }
1919
serde = { workspace = true, features = ["derive"] }
20-
21-
[features]
22-
serde-bincode-compat = ["reth-primitives-traits/serde-bincode-compat"]

crates/ev-primitives/src/pool.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
//! - [`InMemorySize`]: Memory accounting for pool size limits
99
//! - [`SignerRecoverable`]: Sender address recovery for validation
1010
//! - [`TxHashRef`]: Transaction hash access for deduplication
11-
//! - [`SignedTransaction`]: Marker trait for signed transaction types
1211
1312
use alloy_consensus::{
1413
error::ValueError,
1514
transaction::{SignerRecoverable, TxHashRef},
1615
TransactionEnvelope,
1716
};
1817
use alloy_primitives::{Address, B256};
19-
use reth_primitives_traits::{InMemorySize, SignedTransaction};
18+
use reth_primitives_traits::InMemorySize;
2019

2120
use crate::tx::{EvNodeSignedTx, EvTxEnvelope};
2221

@@ -85,5 +84,3 @@ impl From<EvPooledTxEnvelope> for EvTxEnvelope {
8584
}
8685
}
8786
}
88-
89-
impl SignedTransaction for EvPooledTxEnvelope {}

crates/ev-primitives/src/tx.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ use alloy_rlp::{bytes::Buf, BufMut, Decodable, Encodable, Header, RlpDecodable,
1010
use reth_codecs::{
1111
alloy::transaction::{CompactEnvelope, Envelope, FromTxCompact, ToTxCompact},
1212
txtype::COMPACT_EXTENDED_IDENTIFIER_FLAG,
13-
Compact,
13+
Compact, DecompressError,
1414
};
15-
use reth_db_api::{
16-
table::{Compress, Decompress},
17-
DatabaseError,
18-
};
19-
use reth_primitives_traits::{InMemorySize, SignedTransaction};
15+
use reth_db_api::table::{Compress, Decompress};
16+
use reth_primitives_traits::InMemorySize;
2017
use std::vec::Vec;
2118

2219
/// EIP-2718 transaction type for EvNode batch + sponsorship.
@@ -523,10 +520,6 @@ impl Compact for EvTxEnvelope {
523520
}
524521
}
525522

526-
impl SignedTransaction for EvTxEnvelope {}
527-
528-
impl reth_primitives_traits::serde_bincode_compat::RlpBincode for EvTxEnvelope {}
529-
530523
impl Compress for EvTxEnvelope {
531524
type Compressed = Vec<u8>;
532525

@@ -536,7 +529,7 @@ impl Compress for EvTxEnvelope {
536529
}
537530

538531
impl Decompress for EvTxEnvelope {
539-
fn decompress(value: &[u8]) -> Result<Self, DatabaseError> {
532+
fn decompress(value: &[u8]) -> Result<Self, DecompressError> {
540533
let (obj, _) = Compact::from_compact(value, value.len());
541534
Ok(obj)
542535
}

crates/ev-revm/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ alloy-evm.workspace = true
1313
alloy-primitives.workspace = true
1414
reth-revm.workspace = true
1515
reth-evm.workspace = true
16-
reth-primitives.workspace = true
1716
reth-evm-ethereum.workspace = true
18-
revm-inspector.workspace = true
1917
revm-inspectors.workspace = true
20-
revm-context-interface.workspace = true
2118
thiserror.workspace = true
2219
ev-precompiles = { path = "../ev-precompiles" }
2320
ev-primitives = { path = "../ev-primitives" }

crates/ev-revm/src/evm.rs

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ use reth_revm::{
1414
instructions::EthInstructions, EthFrame, EthPrecompiles, EvmTr, FrameInitOrResult,
1515
FrameTr, ItemOrResult, PrecompileProvider,
1616
},
17-
inspector::{InspectEvm, InspectSystemCallEvm, Inspector, InspectorEvmTr},
17+
inspector::{InspectEvm, InspectSystemCallEvm, Inspector, InspectorEvmTr, JournalExt},
1818
interpreter::{interpreter::EthInterpreter, InterpreterResult},
1919
primitives::hardfork::SpecId,
2020
state::EvmState,
2121
ExecuteEvm, SystemCallEvm,
2222
},
2323
Context,
2424
};
25-
use revm_inspector::JournalExt;
2625
use std::ops::{Deref, DerefMut};
2726

2827
/// Convenience alias matching the stock mainnet EVM signature.
@@ -37,28 +36,6 @@ pub struct EvEvm<CTX, INSP, PRECOMP = EthPrecompiles> {
3736
inspect: bool,
3837
}
3938

40-
impl<CTX, INSP, P> EvEvm<CTX, INSP, P>
41-
where
42-
CTX: ContextTr + ContextSetters,
43-
P: Default,
44-
{
45-
/// Creates a new wrapper configured with the provided redirect policy.
46-
pub fn new(ctx: CTX, inspector: INSP, redirect: Option<BaseFeeRedirect>) -> Self {
47-
Self {
48-
inner: Evm {
49-
ctx,
50-
inspector,
51-
instruction: EthInstructions::new_mainnet(),
52-
precompiles: P::default(),
53-
frame_stack: FrameStack::new(),
54-
},
55-
redirect,
56-
deploy_allowlist: None,
57-
inspect: false,
58-
}
59-
}
60-
}
61-
6239
impl<CTX, INSP, P> EvEvm<CTX, INSP, P> {
6340
/// Wraps an existing EVM instance with the redirect policy.
6441
pub fn from_inner<T>(
@@ -116,7 +93,7 @@ impl<CTX, INSP, P> EvEvm<CTX, INSP, P> {
11693
}
11794

11895
/// Exposes a mutable reference to the wrapped `Evm`.
119-
pub(crate) fn inner_mut(
96+
pub(crate) const fn inner_mut(
12097
&mut self,
12198
) -> &mut Evm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, P, EthFrame<EthInterpreter>>
12299
{

crates/ev-revm/src/factory.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,12 @@ impl EvTxEvmFactory {
319319
env: EvmEnv<SpecId>,
320320
inspector: I,
321321
) -> EvRevmEvm<DB, I> {
322-
let precompiles = PrecompilesMap::from_static(Precompiles::new(
323-
PrecompileSpecId::from_spec_id(env.cfg_env.spec),
324-
));
322+
let spec = env.cfg_env.spec;
323+
let precompiles =
324+
PrecompilesMap::from_static(Precompiles::new(PrecompileSpecId::from_spec_id(spec)));
325325

326326
let mut journaled_state = reth_revm::revm::Journal::new(db);
327-
journaled_state.set_spec_id(env.cfg_env.spec);
327+
journaled_state.set_spec_id(spec);
328328

329329
let ctx = Context {
330330
block: env.block_env,
@@ -339,7 +339,7 @@ impl EvTxEvmFactory {
339339
RevmEvm {
340340
ctx,
341341
inspector,
342-
instruction: EthInstructions::new_mainnet(),
342+
instruction: EthInstructions::new_mainnet_with_spec(spec),
343343
precompiles,
344344
frame_stack: FrameStack::new(),
345345
}
@@ -531,9 +531,10 @@ mod tests {
531531
.transact_raw(tx)
532532
.expect("transaction executes without error");
533533

534-
let ExecutionResult::Success { gas_used, .. } = result_and_state.result else {
534+
let ExecutionResult::Success { gas, .. } = result_and_state.result else {
535535
panic!("expected successful execution");
536536
};
537+
let gas_used = gas.used();
537538

538539
let state: EvmState = result_and_state.state;
539540
let sink_account = state

0 commit comments

Comments
 (0)