mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 07:23:46 +00:00
core: surface database errors in parallel block execution (#35461)
This commit is contained in:
parent
9b702a9955
commit
476ecbc571
1 changed files with 9 additions and 0 deletions
|
|
@ -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))
|
blockAccessList.Merge(PreExecution(ctx, block.BeaconRoot(), parent, config, preEVM, header.Number, header.Time))
|
||||||
preEVM.Release()
|
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)
|
systemExec += time.Since(preStart)
|
||||||
|
|
||||||
// Execute the transactions concurrently. Each transaction runs against its
|
// 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)
|
blockAccessList.Merge(postBAL)
|
||||||
p.chain.Engine().Finalize(p.chain, header, postState, block.Body(), postIndex, blockAccessList)
|
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)
|
systemExec += time.Since(postStart)
|
||||||
|
|
||||||
// Join the concurrent root computation.
|
// Join the concurrent root computation.
|
||||||
|
|
@ -320,6 +326,9 @@ func (p *StateProcessor) executeTransactionsParallel(block *types.Block, parentR
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
|
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{
|
results[i] = txExecResult{
|
||||||
receipt: receipt,
|
receipt: receipt,
|
||||||
accessList: accessList,
|
accessList: accessList,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue