Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions crates/stateless/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_consensus::{Consensus, HeaderValidator};
use reth_errors::ConsensusError;
use reth_ethereum_consensus::{validate_block_post_execution, EthBeaconConsensus};
use reth_ethereum_primitives::{Block, EthPrimitives};
use reth_evm::{execute::Executor, ConfigureEvm};
use reth_ethereum_primitives::{Block, EthPrimitives, EthereumReceipt};
use reth_evm::{
execute::{BlockExecutionOutput, Executor},
ConfigureEvm,
};
use reth_primitives_traits::{RecoveredBlock, SealedHeader};
use reth_trie_common::{HashedPostState, KeccakKeyHasher};

Expand Down Expand Up @@ -144,7 +147,7 @@ pub fn stateless_validation<ChainSpec, E>(
witness: ExecutionWitness,
chain_spec: Arc<ChainSpec>,
evm_config: E,
) -> Result<B256, StatelessValidationError>
) -> Result<(B256, BlockExecutionOutput<EthereumReceipt>), StatelessValidationError>
where
ChainSpec: Send + Sync + EthChainSpec<Header = Header> + EthereumHardforks + Debug,
E: ConfigureEvm<Primitives = EthPrimitives> + Clone + 'static,
Expand All @@ -170,7 +173,7 @@ pub fn stateless_validation_with_trie<T, ChainSpec, E>(
witness: ExecutionWitness,
chain_spec: Arc<ChainSpec>,
evm_config: E,
) -> Result<B256, StatelessValidationError>
) -> Result<(B256, BlockExecutionOutput<EthereumReceipt>), StatelessValidationError>
where
T: StatelessTrie,
ChainSpec: Send + Sync + EthChainSpec<Header = Header> + EthereumHardforks + Debug,
Expand Down Expand Up @@ -242,7 +245,7 @@ where
}

// Return block hash
Ok(current_block.hash_slow())
Ok((current_block.hash_slow(), output))
}

/// Performs consensus validation checks on a block without execution or state validation.
Expand Down
Loading