refactor(consensus, evm): move post-execution validation to consensus (#8321)

This commit is contained in:
Alexey Shekhirin
2024-05-22 18:20:14 +01:00
committed by GitHub
parent 90713300bf
commit f45ca74772
52 changed files with 424 additions and 346 deletions

View File

@ -298,7 +298,7 @@ impl Command {
consensus.validate_header_with_total_difficulty(block, U256::MAX)?;
consensus.validate_header(block)?;
consensus.validate_block(block)?;
consensus.validate_block_pre_execution(block)?;
let senders = block.senders().expect("sender recovery failed");
let block_with_senders =

View File

@ -197,7 +197,7 @@ impl Command {
)),
PruneModes::none(),
);
executor.execute_one((&sealed_block.clone().unseal(), td).into())?;
executor.execute_and_verify_one((&sealed_block.clone().unseal(), td).into())?;
let BatchBlockExecutionOutput { bundle, receipts, first_block } = executor.finalize();
BundleStateWithReceipts::new(bundle, receipts, first_block).write_to_storage(
provider_rw.tx_ref(),