returnnil,BlockInsertPrestateErr,fmt.Errorf("pre-block-creation forkchoice update was inconsistent with engine, need reset to resolve: %w",inputErr.Unwrap())
returneth.PayloadID{},BlockInsertPrestateErr,fmt.Errorf("pre-block-creation forkchoice update was inconsistent with engine, need reset to resolve: %w",inputErr.Unwrap())
caseeth.InvalidPayloadAttributes:
caseeth.InvalidPayloadAttributes:
returnnil,BlockInsertPayloadErr,fmt.Errorf("payload attributes are not valid, cannot build block: %w",inputErr.Unwrap())
returneth.PayloadID{},BlockInsertPayloadErr,fmt.Errorf("payload attributes are not valid, cannot build block: %w",inputErr.Unwrap())
default:
default:
returnnil,BlockInsertPrestateErr,fmt.Errorf("unexpected error code in forkchoice-updated response: %w",err)
returneth.PayloadID{},BlockInsertPrestateErr,fmt.Errorf("unexpected error code in forkchoice-updated response: %w",err)
}
}
}else{
}else{
returnnil,BlockInsertTemporaryErr,fmt.Errorf("failed to create new block via forkchoice: %w",err)
returneth.PayloadID{},BlockInsertTemporaryErr,fmt.Errorf("failed to create new block via forkchoice: %w",err)
}
}
}
}
switchfcRes.PayloadStatus.Status{
switchfcRes.PayloadStatus.Status{
// TODO(proto): snap sync - specify explicit different error type if node is syncing
// TODO(proto): snap sync - specify explicit different error type if node is syncing
// even if it is an input-error (unknown payload ID), it is temporary, since we will re-attempt the full payload building, not just the retrieval of the payload.
// even if it is an input-error (unknown payload ID), it is temporary, since we will re-attempt the full payload building, not just the retrieval of the payload.
returnnil,BlockInsertTemporaryErr,fmt.Errorf("failed to get execution payload: %w",err)
returnnil,BlockInsertTemporaryErr,fmt.Errorf("failed to get execution payload: %w",err)
...
@@ -134,7 +155,7 @@ func InsertHeadBlock(ctx context.Context, log log.Logger, eng Engine, fc eth.For
...
@@ -134,7 +155,7 @@ func InsertHeadBlock(ctx context.Context, log log.Logger, eng Engine, fc eth.For