feat: abstract over Evm::Error (#14085)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Arsenii Kulikov
2025-01-30 17:02:20 +04:00
committed by GitHub
parent 6b13409812
commit 98a021ee7d
40 changed files with 298 additions and 247 deletions

View File

@@ -19,7 +19,6 @@ reth-prune-types.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-eips.workspace = true
revm-primitives.workspace = true
nybbles.workspace = true
thiserror.workspace = true
@@ -30,7 +29,6 @@ std = [
"reth-consensus/std",
"alloy-eips/std",
"alloy-primitives/std",
"revm-primitives/std",
"alloy-rlp/std",
"thiserror/std",
"nybbles/std",

View File

@@ -20,14 +20,13 @@ use alloy_primitives::B256;
use reth_consensus::ConsensusError;
use reth_prune_types::PruneSegmentError;
use reth_storage_errors::provider::ProviderError;
use revm_primitives::EVMError;
use thiserror::Error;
pub mod trie;
pub use trie::*;
/// Transaction validation errors
#[derive(Error, Clone, Debug)]
#[derive(Error, Debug)]
pub enum BlockValidationError {
/// EVM error with transaction hash and message
#[error("EVM reported invalid transaction ({hash}): {error}")]
@@ -35,7 +34,7 @@ pub enum BlockValidationError {
/// The hash of the transaction
hash: B256,
/// The EVM error.
error: Box<EVMError<ProviderError>>,
error: Box<dyn core::error::Error + Send + Sync>,
},
/// Error when recovering the sender for a transaction
#[error("failed to recover sender for transaction")]