remove skiping state validation in parallel executions

This commit is contained in:
idotalk 2026-07-15 19:13:33 +03:00
parent bb50c67454
commit ff5b9a27b5

View file

@ -130,16 +130,10 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD
header := block.Header()
// When ParallelTxGroupingByStorageOverlap is enabled, Process may still differ
// from the block builder in edge cases; skip strict gas equality in that mode.
if !ParallelTxGroupingByStorageOverlap {
if block.GasUsed() != res.GasUsed {
return fmt.Errorf("invalid gas used (remote: %d local: %d)", block.GasUsed(), res.GasUsed)
}
} else {
// print warning without returning an error
if block.GasUsed() != res.GasUsed {
fmt.Printf("expected error: invalid gas used (remote: %d local: %d)\n", block.GasUsed(), res.GasUsed)
}
if block.GasUsed() != res.GasUsed {
return fmt.Errorf("invalid gas used (remote: %d local: %d)", block.GasUsed(), res.GasUsed)
}
// Validate the received block's bloom with the one derived from the generated receipts.
// For valid blocks this should always validate to true.
//