Compare commits

...

1 Commits

Author SHA1 Message Date
Arsenii Kulikov
506cc7f2a6 chore: patch alloy 2026-04-09 19:49:42 +04:00
4 changed files with 10 additions and 16 deletions

3
Cargo.lock generated
View File

@@ -290,8 +290,7 @@ dependencies = [
[[package]]
name = "alloy-evm"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13146597a586a4166ac31b192883e08c044272d6b8c43de231ee1f43dd9a115"
source = "git+https://github.com/alloy-rs/evm?rev=f6bda38#f6bda38ce8167027c52e825a75a3949ecaf05f71"
dependencies = [
"alloy-consensus",
"alloy-eips",

View File

@@ -737,6 +737,6 @@ ipnet = "2.11"
# jsonrpsee-http-client = { git = "https://github.com/paradigmxyz/jsonrpsee", branch = "matt/make-rpc-service-pub" }
# jsonrpsee-types = { git = "https://github.com/paradigmxyz/jsonrpsee", branch = "matt/make-rpc-service-pub" }
# alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "9bc2dba" }
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "f6bda38" }
# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "3020ea8" }

View File

@@ -21,10 +21,7 @@ use reth_primitives_traits::{
use reth_storage_api::StateProvider;
pub use reth_storage_errors::provider::ProviderError;
use reth_trie_common::{updates::TrieUpdates, HashedPostState};
use revm::{
context::result::ExecutionResult,
database::{states::bundle_state::BundleRetention, BundleState, State},
};
use revm::database::{states::bundle_state::BundleRetention, BundleState, State};
/// A type that knows how to execute a block. It is assumed to operate on a
/// [`crate::Evm`] internally and use [`State`] as database.
@@ -329,9 +326,7 @@ pub trait BlockBuilder {
fn execute_transaction_with_commit_condition(
&mut self,
tx: impl ExecutorTx<Self::Executor>,
f: impl FnOnce(
&ExecutionResult<<<Self::Executor as BlockExecutor>::Evm as Evm>::HaltReason>,
) -> CommitChanges,
f: impl FnOnce(&<Self::Executor as BlockExecutor>::Result) -> CommitChanges,
) -> Result<Option<u64>, BlockExecutionError>;
/// Invokes [`BlockExecutor::execute_transaction_with_result_closure`] and saves the
@@ -339,7 +334,7 @@ pub trait BlockBuilder {
fn execute_transaction_with_result_closure(
&mut self,
tx: impl ExecutorTx<Self::Executor>,
f: impl FnOnce(&ExecutionResult<<<Self::Executor as BlockExecutor>::Evm as Evm>::HaltReason>),
f: impl FnOnce(&<Self::Executor as BlockExecutor>::Result),
) -> Result<u64, BlockExecutionError> {
self.execute_transaction_with_commit_condition(tx, |res| {
f(res);
@@ -464,9 +459,7 @@ where
fn execute_transaction_with_commit_condition(
&mut self,
tx: impl ExecutorTx<Self::Executor>,
f: impl FnOnce(
&ExecutionResult<<<Self::Executor as BlockExecutor>::Evm as Evm>::HaltReason>,
) -> CommitChanges,
f: impl FnOnce(&<Self::Executor as BlockExecutor>::Result) -> CommitChanges,
) -> Result<Option<u64>, BlockExecutionError> {
let (tx_env, tx) = tx.into_parts();
if let Some(gas_used) =

View File

@@ -15,6 +15,7 @@ use alloy_rpc_types_eth::{
};
use jsonrpsee_types::ErrorObject;
use reth_evm::{
block::TxResult,
execute::{BlockBuilder, BlockBuilderOutcome, BlockExecutor},
Evm, HaltReasonFor,
};
@@ -198,8 +199,9 @@ where
// The effect for a layer-2 execution client is that it does not charge L1 cost.
let tx = WithEncoded::new(Default::default(), tx);
builder
.execute_transaction_with_result_closure(tx, |result| results.push(result.clone()))?;
builder.execute_transaction_with_result_closure(tx, |result| {
results.push(result.result().result.clone())
})?;
}
// Pass noop provider to skip state root calculations.