refactor: remove PostExecutionInput (#14464)

This commit is contained in:
Arsenii Kulikov
2025-02-13 14:24:00 +04:00
committed by GitHub
parent f425a4dbcd
commit 46462ae0a6
18 changed files with 78 additions and 88 deletions

View File

@ -13,6 +13,7 @@ workspace = true
[dependencies]
# reth
reth-execution-types.workspace = true
reth-chainspec.workspace = true
reth-consensus-common.workspace = true
reth-consensus.workspace = true
@ -54,5 +55,9 @@ std = [
"alloy-consensus/std",
"alloy-trie/std",
"op-alloy-consensus/std",
"reth-execution-types/std",
]
optimism = [
"reth-optimism-primitives/optimism",
"reth-execution-types/optimism",
]
optimism = ["reth-optimism-primitives/optimism"]

View File

@ -18,15 +18,14 @@ use alloc::sync::Arc;
use alloy_consensus::{BlockHeader as _, EMPTY_OMMER_ROOT_HASH};
use alloy_primitives::{B64, U256};
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_consensus::{
Consensus, ConsensusError, FullConsensus, HeaderValidator, PostExecutionInput,
};
use reth_consensus::{Consensus, ConsensusError, FullConsensus, HeaderValidator};
use reth_consensus_common::validation::{
validate_against_parent_4844, validate_against_parent_eip1559_base_fee,
validate_against_parent_hash_number, validate_against_parent_timestamp,
validate_body_against_header, validate_cancun_gas, validate_header_base_fee,
validate_header_extra_data, validate_header_gas, validate_shanghai_withdrawals,
};
use reth_execution_types::BlockExecutionResult;
use reth_optimism_forks::OpHardforks;
use reth_optimism_primitives::DepositReceipt;
use reth_primitives::{GotExpected, NodePrimitives, RecoveredBlock, SealedHeader};
@ -62,9 +61,9 @@ impl<ChainSpec: EthChainSpec + OpHardforks, N: NodePrimitives<Receipt: DepositRe
fn validate_block_post_execution(
&self,
block: &RecoveredBlock<N::Block>,
input: PostExecutionInput<'_, N::Receipt>,
result: &BlockExecutionResult<N::Receipt>,
) -> Result<(), ConsensusError> {
validate_block_post_execution(block.header(), &self.chain_spec, input.receipts)
validate_block_post_execution(block.header(), &self.chain_spec, &result.receipts)
}
}

View File

@ -434,7 +434,7 @@ mod tests {
))
.unwrap();
let receipts = output.receipts;
let receipts = &output.receipts;
let tx_receipt = &receipts[0];
let deposit_receipt = &receipts[1];
@ -510,7 +510,7 @@ mod tests {
))
.expect("Executing a block while canyon is active should not fail");
let receipts = output.receipts;
let receipts = &output.receipts;
let tx_receipt = &receipts[0];
let deposit_receipt = &receipts[1];