Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
defd0e8
Bump revm to staging and fix breaking changes
rakita Jan 26, 2026
5d9a43f
Merge remote-tracking branch 'origin/main' into staging
rakita Jan 26, 2026
57d7c98
chore: merge main and update alloy-evm staging patch
rakita Jan 26, 2026
a51e03f
fix(net): FetchFullBlockRangeFuture can get stuck forever after parti…
akolishchak Jan 26, 2026
b03a704
fix(engine): only warn for critical capability mismatches (#21398)
mattsse Jan 26, 2026
ce08b6f
fix(rpc): cap simulate_v1 default gas limit to RPC gas cap (#21402)
mattsse Jan 26, 2026
93adbf8
fix(rpc): set prevrandao to zero for eth_simulateV1 simulated blocks …
mattsse Jan 26, 2026
0a77c2a
feat(rpc): implement movePrecompileToAddress for eth_simulateV1 (#21414)
mattsse Jan 26, 2026
a49991c
feat(cli): make stopping on invalid block the default for reth import…
mattsse Jan 26, 2026
70ceb75
fix(rpc): populate block_hash in eth_simulateV1 logs (#21413)
mattsse Jan 26, 2026
59d1137
fix(rpc): add block number validation in eth_simulateV1 (#21396)
mattsse Jan 26, 2026
dcd9e50
fix(rpc): use correct error codes for eth_simulateV1 reverts and halt…
mattsse Jan 26, 2026
dd0ee07
fix(rpc): add block timestamp validation in eth_simulateV1 (#21397)
mattsse Jan 26, 2026
29f51ab
feat(rpc): add transaction hash caching to EthStateCache (#21180)
figtracer Jan 26, 2026
cab4cbf
feat: configurable EVM execution limits (#21088)
rezzmah Jan 26, 2026
be1f657
perf: use shared channel for prewarm workers (#21429)
klkvr Jan 26, 2026
04d9a33
refactor(trie): always use ParallelSparseTrie, deprecate config flags…
mediocregopher Jan 26, 2026
da6e6af
chore(metrics): add a gas_last metric similar to new_payload_last (#2…
Rjected Jan 26, 2026
7dcd77d
fix(pruner): prune account and storage changeset static files (#21346)
Rjected Jan 26, 2026
2fd0a70
fix(stages): retain RocksDB TempDir in TestStageDB to prevent prematu…
ethfanWilliam Jan 26, 2026
73c3927
chore: remove unused docker from makefile (#21445)
DaniPopes Jan 26, 2026
beb0c5e
chore: reduce number of nightly builds (#21446)
DaniPopes Jan 26, 2026
33d61c3
chore: update revm, revm-inspectors, alloy-evm to staging
rakita Jan 26, 2026
345fc9c
Merge branch 'main' into staging
rakita Jan 26, 2026
dbc5313
Merge origin/main into staging - update patches
rakita Jan 28, 2026
211d3d2
fix: adapt to revm hasher type changes
rakita Jan 28, 2026
f4075f5
Merge remote staging
rakita Jan 28, 2026
a364989
Merge origin/main into staging
rakita Feb 3, 2026
953a1b3
chore: update revm, revm-inspectors, alloy-evm to staging
rakita Feb 3, 2026
3d02124
Merge origin/main into staging
rakita Feb 3, 2026
61341a1
Merge remote-tracking branch 'origin/main' into staging
rakita Feb 12, 2026
df8ba50
chore: update revm/inspectors/alloy-evm patches and fix Bytecode flatten
rakita Feb 12, 2026
0f09a92
fix: update gas_used/gas_refunded to ResultGas API
rakita Feb 12, 2026
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
245 changes: 118 additions & 127 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,28 @@ vergen-git2 = "9.1.0"
ipnet = "2.11"

[patch.crates-io]
# revm staging patches
revm = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
op-revm = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-bytecode = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-context = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-database = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-handler = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-precompile = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }
revm-state = { git = "https://github.com/bluealloy/revm", rev = "33330a285e621b9170c30a21cfea9ab32e2a2169" }

# revm-inspectors staging patch
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "e80e2eab72dfa18011e6a99abd37027290a46e83" }

# alloy-evm staging patches
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "742dc14749ea0279c03ca27b1c26f26ac19fbefb" }
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", rev = "742dc14749ea0279c03ca27b1c26f26ac19fbefb" }

# alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
Expand Down
1 change: 1 addition & 0 deletions crates/ethereum/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ where
gas_limit: payload.payload.gas_limit(),
basefee: payload.payload.saturated_base_fee_per_gas(),
blob_excess_gas_and_price,
slot_num: 0,
};

Ok(EvmEnv { cfg_env, block_env })
Expand Down
3 changes: 1 addition & 2 deletions crates/ethereum/evm/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ impl<'a, DB: Database, I: Inspector<EthEvmContext<&'a mut State<DB>>>> BlockExec
result: ResultAndState::new(
ExecutionResult::Success {
reason: SuccessReason::Return,
gas_used: 0,
gas_refunded: 0,
gas: Default::default(),
logs: vec![],
output: Output::Call(Bytes::from(vec![])),
},
Expand Down
36 changes: 15 additions & 21 deletions crates/primitives-traits/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloy_genesis::GenesisAccount;
use alloy_primitives::{keccak256, Bytes, B256, U256};
use alloy_trie::TrieAccount;
use derive_more::Deref;
use revm_bytecode::{Bytecode as RevmBytecode, BytecodeDecodeError};
use revm_bytecode::{Bytecode as RevmBytecode, BytecodeDecodeError, BytecodeKind};
use revm_state::AccountInfo;

#[cfg(any(test, feature = "reth-codec"))]
Expand All @@ -16,10 +16,10 @@ pub mod compact_ids {
/// Identifier for removed bytecode variant.
pub const REMOVED_BYTECODE_ID: u8 = 1;

/// Identifier for [`LegacyAnalyzed`](revm_bytecode::Bytecode::LegacyAnalyzed).
/// Identifier for [`LegacyAnalyzed`](revm_bytecode::BytecodeKind::LegacyAnalyzed).
pub const LEGACY_ANALYZED_BYTECODE_ID: u8 = 2;

/// Identifier for [`Eip7702`](revm_bytecode::Bytecode::Eip7702).
/// Identifier for [`Eip7702`](revm_bytecode::BytecodeKind::Eip7702).
pub const EIP7702_BYTECODE_ID: u8 = 4;
}

Expand Down Expand Up @@ -137,22 +137,19 @@ impl reth_codecs::Compact for Bytecode {
{
use compact_ids::{EIP7702_BYTECODE_ID, LEGACY_ANALYZED_BYTECODE_ID};

let bytecode = match &self.0 {
RevmBytecode::LegacyAnalyzed(analyzed) => analyzed.bytecode(),
RevmBytecode::Eip7702(eip7702) => eip7702.raw(),
};
let bytecode = self.0.bytecode();
buf.put_u32(bytecode.len() as u32);
buf.put_slice(bytecode.as_ref());
let len = match &self.0 {
let len = match self.0.kind() {
// [`REMOVED_BYTECODE_ID`] has been removed.
RevmBytecode::LegacyAnalyzed(analyzed) => {
BytecodeKind::LegacyAnalyzed => {
buf.put_u8(LEGACY_ANALYZED_BYTECODE_ID);
buf.put_u64(analyzed.original_len() as u64);
let map = analyzed.jump_table().as_slice();
buf.put_u64(self.0.len() as u64);
let map = self.0.legacy_jump_table().unwrap().as_slice();
buf.put_slice(map);
1 + 8 + map.len()
}
RevmBytecode::Eip7702(_) => {
BytecodeKind::Eip7702 => {
buf.put_u8(EIP7702_BYTECODE_ID);
1
}
Expand Down Expand Up @@ -251,12 +248,10 @@ impl From<Account> for AccountInfo {

#[cfg(test)]
mod tests {
use std::sync::Arc;

use super::*;
use alloy_primitives::{hex_literal::hex, B256, U256};
use reth_codecs::Compact;
use revm_bytecode::{JumpTable, LegacyAnalyzedBytecode};
use revm_bytecode::JumpTable;

#[test]
fn test_account() {
Expand Down Expand Up @@ -313,12 +308,11 @@ mod tests {
assert_eq!(len, 17);

let mut buf = vec![];
let bytecode =
Bytecode(RevmBytecode::LegacyAnalyzed(Arc::new(LegacyAnalyzedBytecode::new(
Bytes::from(&hex!("ff00")),
2,
JumpTable::from_slice(&[0], 2),
))));
let bytecode = Bytecode(RevmBytecode::new_analyzed(
Bytes::from(&hex!("ff00")),
2,
JumpTable::from_slice(&[0], 2),
));
let len = bytecode.to_compact(&mut buf);
assert_eq!(len, 16);

Expand Down
4 changes: 2 additions & 2 deletions crates/revm/src/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ impl ExecutionWitnessRecord {
}
}
}
// BTreeMap keys are ordered, so the first key is the smallest
self.lowest_block_number = statedb.block_hashes.keys().next().copied()
// Get the lowest block number from the cache
self.lowest_block_number = statedb.block_hashes.lowest().map(|(n, _)| n)
}

/// Creates the record from the state after execution.
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-eth-api/src/helpers/estimate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub trait EstimateCall: Call {
};

let gas_refund = match res.result {
ExecutionResult::Success { gas_refunded, .. } => gas_refunded,
ExecutionResult::Success { gas, .. } => gas.inner_refunded(),
ExecutionResult::Halt { reason, .. } => {
// here we don't check for invalid opcode because already executed with highest gas
// limit
Expand Down
4 changes: 1 addition & 3 deletions crates/rpc/rpc-eth-types/src/error/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ pub trait FromEvmError<Evm: ConfigureEvm>:
match result {
ExecutionResult::Success { output, .. } => Ok(output.into_data()),
ExecutionResult::Revert { output, .. } => Err(Self::from_revert(output)),
ExecutionResult::Halt { reason, gas_used } => {
Err(Self::from_evm_halt(reason, gas_used))
}
ExecutionResult::Halt { reason, gas } => Err(Self::from_evm_halt(reason, gas.used())),
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions crates/rpc/rpc-eth-types/src/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ where
let mut log_index = 0;
for (index, (result, tx)) in results.into_iter().zip(block.body().transactions()).enumerate() {
let call = match result {
ExecutionResult::Halt { reason, gas_used } => {
ExecutionResult::Halt { reason, gas } => {
let error = Err::from_evm_halt(reason, tx.gas_limit());
#[allow(clippy::needless_update)]
SimCallResult {
Expand All @@ -362,12 +362,12 @@ where
code: SIMULATE_VM_ERROR_CODE,
..SimulateError::invalid_params()
}),
gas_used,
gas_used: gas.used(),
logs: Vec::new(),
status: false,
}
}
ExecutionResult::Revert { output, gas_used } => {
ExecutionResult::Revert { output, gas } => {
let error = Err::from_revert(output.clone());
#[allow(clippy::needless_update)]
SimCallResult {
Expand All @@ -377,15 +377,15 @@ where
code: SIMULATE_REVERT_CODE,
..SimulateError::invalid_params()
}),
gas_used,
gas_used: gas.used(),
status: false,
logs: Vec::new(),
}
}
ExecutionResult::Success { output, gas_used, logs, .. } => SimCallResult {
ExecutionResult::Success { output, gas, logs, .. } => SimCallResult {
return_data: output.into_data(),
error: None,
gas_used,
gas_used: gas.used(),
logs: logs
.into_iter()
.map(|log| {
Expand Down
4 changes: 4 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ target "_base_profiling" {
inherits = ["_base"]
platforms = ["linux/amd64"]
}
target "_base_profiling" {
inherits = ["_base"]
platforms = ["linux/amd64"]
}

// Ethereum (reth)
target "ethereum" {
Expand Down
Loading