diff --git a/crates/blockchain-tree/src/chain.rs b/crates/blockchain-tree/src/chain.rs index 7dfdce6967..d7d2595326 100644 --- a/crates/blockchain-tree/src/chain.rs +++ b/crates/blockchain-tree/src/chain.rs @@ -214,13 +214,18 @@ impl AppendableChain { let block = block.unseal(); let state = executor.execute((&block, U256::MAX, ancestor_blocks).into())?; - let BlockExecutionOutput { state, receipts, requests, .. } = state; + let BlockExecutionOutput { state, receipts, requests, gas_used: _, snapshot } = state; externals .consensus .validate_block_post_execution(&block, PostExecutionInput::new(&receipts, &requests))?; - let initial_execution_outcome = - ExecutionOutcome::new(state, receipts.into(), block.number, vec![requests.into()]); + let initial_execution_outcome = ExecutionOutcome::new_with_snapshots( + state, + receipts.into(), + block.number, + vec![requests.into()], + vec![snapshot.unwrap_or_default()], + ); // check state root if the block extends the canonical chain __and__ if state root // validation was requested. diff --git a/crates/bsc/evm/src/execute.rs b/crates/bsc/evm/src/execute.rs index 121193135b..927f44ae38 100644 --- a/crates/bsc/evm/src/execute.rs +++ b/crates/bsc/evm/src/execute.rs @@ -928,9 +928,10 @@ where self.parlia.chain_spec().is_bohr_active_at_timestamp(header.timestamp), ) .ok_or_else(|| BscBlockExecutionError::ApplySnapshotFailed)?; + + cache.put(snap.block_hash, snap.clone()); } - cache.put(snap.block_hash, snap.clone()); Ok(snap) } diff --git a/crates/cli/commands/src/stage/drop.rs b/crates/cli/commands/src/stage/drop.rs index ec7a91b6dd..e5e6e581e0 100644 --- a/crates/cli/commands/src/stage/drop.rs +++ b/crates/cli/commands/src/stage/drop.rs @@ -97,6 +97,7 @@ impl Command { tx.clear::()?; tx.clear::()?; tx.clear::()?; + tx.clear::()?; tx.put::( StageId::Execution.to_string(), Default::default(),