Skip to content

Commit 255ea2f

Browse files
authored
Return optimistic response only when handling blinded blocks (#15925)
* Return optimistic response only when handling blinded blocks in proposer * Remove blind condition
1 parent 46bc81b commit 255ea2f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,14 @@ func (vs *Server) ProposeBeaconBlock(ctx context.Context, req *ethpb.GenericSign
312312
rob, err := blocks.NewROBlockWithRoot(block, root)
313313
if block.IsBlinded() {
314314
block, blobSidecars, err = vs.handleBlindedBlock(ctx, block)
315+
if errors.Is(err, builderapi.ErrBadGateway) {
316+
log.WithError(err).Info("Optimistically proposed block - builder relay temporarily unavailable, block may arrive over P2P")
317+
return &ethpb.ProposeResponse{BlockRoot: root[:]}, nil
318+
}
315319
} else if block.Version() >= version.Deneb {
316320
blobSidecars, dataColumnSidecars, err = vs.handleUnblindedBlock(rob, req)
317321
}
318322
if err != nil {
319-
if errors.Is(err, builderapi.ErrBadGateway) && block.IsBlinded() {
320-
log.WithError(err).Info("Optimistically proposed block - builder relay temporarily unavailable, block may arrive over P2P")
321-
return &ethpb.ProposeResponse{BlockRoot: root[:]}, nil
322-
}
323323
return nil, status.Errorf(codes.Internal, "%s: %v", "handle block failed", err)
324324
}
325325

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Ignored
2+
3+
- Return optimistic response only when handling blinded blocks in proposer

0 commit comments

Comments
 (0)