mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
feat: bump alloy and alloy-evm (#21337)
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
use alloy_eips::eip4895::Withdrawal;
|
||||
use alloy_evm::{
|
||||
block::{BlockExecutorFactory, BlockExecutorFor, ExecutableTx},
|
||||
eth::{EthBlockExecutionCtx, EthBlockExecutor},
|
||||
eth::{EthBlockExecutionCtx, EthBlockExecutor, EthTxResult},
|
||||
precompiles::PrecompilesMap,
|
||||
revm::context::{result::ResultAndState, Block as _},
|
||||
revm::context::Block as _,
|
||||
EthEvm, EthEvmFactory,
|
||||
};
|
||||
use alloy_sol_macro::sol;
|
||||
@@ -39,7 +39,7 @@ use reth_ethereum::{
|
||||
primitives::{Header, SealedBlock, SealedHeader},
|
||||
provider::BlockExecutionResult,
|
||||
rpc::types::engine::ExecutionData,
|
||||
Block, EthPrimitives, Receipt, TransactionSigned,
|
||||
Block, EthPrimitives, Receipt, TransactionSigned, TxType,
|
||||
};
|
||||
use std::{fmt::Display, sync::Arc};
|
||||
|
||||
@@ -196,6 +196,7 @@ where
|
||||
type Transaction = TransactionSigned;
|
||||
type Receipt = Receipt;
|
||||
type Evm = E;
|
||||
type Result = EthTxResult<E::HaltReason, TxType>;
|
||||
|
||||
fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> {
|
||||
self.inner.apply_pre_execution_changes()
|
||||
@@ -208,16 +209,12 @@ where
|
||||
fn execute_transaction_without_commit(
|
||||
&mut self,
|
||||
tx: impl ExecutableTx<Self>,
|
||||
) -> Result<ResultAndState<<Self::Evm as Evm>::HaltReason>, BlockExecutionError> {
|
||||
) -> Result<Self::Result, BlockExecutionError> {
|
||||
self.inner.execute_transaction_without_commit(tx)
|
||||
}
|
||||
|
||||
fn commit_transaction(
|
||||
&mut self,
|
||||
output: ResultAndState<<Self::Evm as Evm>::HaltReason>,
|
||||
tx: impl ExecutableTx<Self>,
|
||||
) -> Result<u64, BlockExecutionError> {
|
||||
self.inner.commit_transaction(output, tx)
|
||||
fn commit_transaction(&mut self, output: Self::Result) -> Result<u64, BlockExecutionError> {
|
||||
self.inner.commit_transaction(output)
|
||||
}
|
||||
|
||||
fn finish(mut self) -> Result<(Self::Evm, BlockExecutionResult<Receipt>), BlockExecutionError> {
|
||||
|
||||
@@ -12,12 +12,12 @@ use alloy_evm::{
|
||||
BlockExecutorFor, ExecutableTx, OnStateHook,
|
||||
},
|
||||
precompiles::PrecompilesMap,
|
||||
Database, Evm,
|
||||
Database, Evm, RecoveredTx,
|
||||
};
|
||||
use alloy_op_evm::{OpBlockExecutionCtx, OpBlockExecutor};
|
||||
use alloy_op_evm::{block::OpTxResult, OpBlockExecutionCtx, OpBlockExecutor};
|
||||
use reth_ethereum::evm::primitives::InspectorFor;
|
||||
use reth_op::{chainspec::OpChainSpec, node::OpRethReceiptBuilder, OpReceipt};
|
||||
use revm::{context::result::ResultAndState, database::State};
|
||||
use reth_op::{chainspec::OpChainSpec, node::OpRethReceiptBuilder, OpReceipt, OpTxType};
|
||||
use revm::database::State;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct CustomBlockExecutor<Evm> {
|
||||
@@ -32,6 +32,7 @@ where
|
||||
type Transaction = CustomTransaction;
|
||||
type Receipt = OpReceipt;
|
||||
type Evm = E;
|
||||
type Result = OpTxResult<E::HaltReason, OpTxType>;
|
||||
|
||||
fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> {
|
||||
self.inner.apply_pre_execution_changes()
|
||||
@@ -44,7 +45,8 @@ where
|
||||
fn execute_transaction_without_commit(
|
||||
&mut self,
|
||||
tx: impl ExecutableTx<Self>,
|
||||
) -> Result<ResultAndState<<Self::Evm as Evm>::HaltReason>, BlockExecutionError> {
|
||||
) -> Result<Self::Result, BlockExecutionError> {
|
||||
let tx = tx.into_parts().1;
|
||||
match tx.tx() {
|
||||
CustomTransaction::Op(op_tx) => self
|
||||
.inner
|
||||
@@ -53,17 +55,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
fn commit_transaction(
|
||||
&mut self,
|
||||
output: ResultAndState<<Self::Evm as Evm>::HaltReason>,
|
||||
tx: impl ExecutableTx<Self>,
|
||||
) -> Result<u64, BlockExecutionError> {
|
||||
match tx.tx() {
|
||||
CustomTransaction::Op(op_tx) => {
|
||||
self.inner.commit_transaction(output, Recovered::new_unchecked(op_tx, *tx.signer()))
|
||||
}
|
||||
CustomTransaction::Payment(..) => todo!(),
|
||||
}
|
||||
fn commit_transaction(&mut self, output: Self::Result) -> Result<u64, BlockExecutionError> {
|
||||
self.inner.commit_transaction(output)
|
||||
}
|
||||
|
||||
fn finish(self) -> Result<(Self::Evm, BlockExecutionResult<OpReceipt>), BlockExecutionError> {
|
||||
|
||||
Reference in New Issue
Block a user