reth
reth copied to clipboard
Move post-execution block validation from `EthBlockExecutor` to `Consensus` trait
Describe the feature
Currently, we do post-execution block validations such as receipts root inside the EthBlockExecutor::execute_and_verify https://github.com/paradigmxyz/reth/blob/4b2d5eb83b7732ea61ad2f96a2a4fbf940a8126f/crates/ethereum/evm/src/execute.rs#L283-L296 while pre-execution is done inside the Consensus::validate_block https://github.com/paradigmxyz/reth/blob/4b2d5eb83b7732ea61ad2f96a2a4fbf940a8126f/crates/consensus/consensus/src/lib.rs#L77-L86
We should move the post-execution block validation inside the Consensus trait. It includes the validation against the header of:
- Receipts root
- Gas usage
- EIP-7865 requests root
Additional context
No response
supportive, I like the separation, we could still integrate these validation in a separate trait fn, but execute should really just execute and leave validation up to the caller