chore: remove StateRoot variant from BlockValidationError (#14858)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Arsenii Kulikov
2025-03-06 11:23:26 +04:00
committed by GitHub
parent e5720e6d0d
commit b8fa08f452
5 changed files with 6 additions and 23 deletions

View File

@@ -19,8 +19,6 @@ alloy-primitives.workspace = true
alloy-rlp.workspace = true
nybbles.workspace = true
revm-database-interface.workspace = true
thiserror.workspace = true
[features]
@@ -30,7 +28,6 @@ std = [
"alloy-rlp/std",
"thiserror/std",
"nybbles/std",
"revm-database-interface/std",
"reth-storage-errors/std",
"alloy-evm/std",
]

View File

@@ -37,9 +37,6 @@ pub enum BlockValidationError {
/// Error when incrementing balance in post execution
#[error("incrementing balance in post execution failed")]
IncrementBalanceFailed,
/// Error when the state root does not match the expected value.
#[error(transparent)]
StateRoot(#[from] StateRootError),
/// Error when transaction gas limit exceeds available block gas
#[error(
"transaction gas limit {transaction_gas_limit} is more than blocks available gas {block_available_gas}"
@@ -137,11 +134,6 @@ impl BlockExecutionError {
}
}
/// Returns `true` if the error is a state root error.
pub const fn is_state_root_error(&self) -> bool {
matches!(self, Self::Validation(BlockValidationError::StateRoot(_)))
}
/// Handles an EVM error occurred when executing a transaction.
///
/// If an error matches [`EvmError::InvalidTransaction`], it will be wrapped into
@@ -164,8 +156,6 @@ impl From<ProviderError> for BlockExecutionError {
}
}
impl revm_database_interface::DBErrorMarker for BlockExecutionError {}
/// Internal (i.e., not validation or consensus related) `BlockExecutor` Errors
#[derive(Error, Debug)]
pub enum InternalBlockExecutionError {