feat(op): Ecotone reject blob txs (#6480)

Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
This commit is contained in:
clabby
2024-02-07 21:51:07 -05:00
committed by GitHub
parent d05504f996
commit d08d72e5c3
5 changed files with 25 additions and 3 deletions

View File

@ -3,7 +3,9 @@ use reth_interfaces::executor::{
BlockExecutionError, BlockValidationError, OptimismBlockExecutionError,
};
use reth_node_api::ConfigureEvmEnv;
use reth_primitives::{revm_primitives::ResultAndState, BlockWithSenders, Hardfork, Receipt, U256};
use reth_primitives::{
revm_primitives::ResultAndState, BlockWithSenders, Hardfork, Receipt, TxType, U256,
};
use reth_provider::{BlockExecutor, BlockExecutorStats, BundleStateWithReceipts};
use revm::DatabaseCommit;
use std::time::Instant;
@ -95,6 +97,13 @@ where
.into())
}
// An optimism block should never contain blob transactions.
if matches!(transaction.tx_type(), TxType::EIP4844) {
return Err(BlockExecutionError::OptimismBlockExecution(
OptimismBlockExecutionError::BlobTransactionRejected,
))
}
// Cache the depositor account prior to the state transition for the deposit nonce.
//
// Note that this *only* needs to be done post-regolith hardfork, as deposit nonces