core: surface database errors in parallel block execution (#35461)

This commit is contained in:
0xSHKWON 2026-08-05 15:02:24 +09:00 committed by GitHub
parent 9b702a9955
commit 476ecbc571
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -164,6 +164,9 @@ func (p *StateProcessor) processParallel(ctx context.Context, block *types.Block
}
blockAccessList.Merge(PreExecution(ctx, block.BeaconRoot(), parent, config, preEVM, header.Number, header.Time))
preEVM.Release()
if err := preState.Error(); err != nil {
return nil, fmt.Errorf("database error in pre-execution system calls: %w", err)
}
systemExec += time.Since(preStart)
// Execute the transactions concurrently. Each transaction runs against its
@ -224,6 +227,9 @@ func (p *StateProcessor) processParallel(ctx context.Context, block *types.Block
}
blockAccessList.Merge(postBAL)
p.chain.Engine().Finalize(p.chain, header, postState, block.Body(), postIndex, blockAccessList)
if err := postState.Error(); err != nil {
return nil, fmt.Errorf("database error in post-execution system calls: %w", err)
}
systemExec += time.Since(postStart)
// Join the concurrent root computation.
@ -320,6 +326,9 @@ func (p *StateProcessor) executeTransactionsParallel(block *types.Block, parentR
if err != nil {
return fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
}
if dbErr := sdb.Error(); dbErr != nil {
return fmt.Errorf("database error while applying tx %d [%v]: %w", i, tx.Hash().Hex(), dbErr)
}
results[i] = txExecResult{
receipt: receipt,
accessList: accessList,