From 15016555f5f44763c8f8fc6f026261832e167776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kapka?= Date: Wed, 22 Feb 2023 18:06:52 +0100 Subject: [PATCH] Remove `SubmitBlindedBlockCapella` (#12030) Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- api/client/builder/client.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/api/client/builder/client.go b/api/client/builder/client.go index 4e37cc8b9e..33c4d91c7e 100644 --- a/api/client/builder/client.go +++ b/api/client/builder/client.go @@ -21,7 +21,6 @@ import ( "github.com/prysmaticlabs/prysm/v3/monitoring/tracing" "github.com/prysmaticlabs/prysm/v3/network" "github.com/prysmaticlabs/prysm/v3/network/authorization" - v1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v3/runtime/version" log "github.com/sirupsen/logrus" @@ -342,29 +341,6 @@ func (c *Client) SubmitBlindedBlock(ctx context.Context, sb interfaces.ReadOnlyS } } -// SubmitBlindedBlockCapella calls the builder API endpoint that binds the validator to the builder and submits the block. -// The response is the full ExecutionPayloadCapella used to create the blinded block. -func (c *Client) SubmitBlindedBlockCapella(ctx context.Context, sb *ethpb.SignedBlindedBeaconBlockCapella) (*v1.ExecutionPayloadCapella, error) { - v := &SignedBlindedBeaconBlockCapella{SignedBlindedBeaconBlockCapella: sb} - body, err := json.Marshal(v) - if err != nil { - return nil, errors.Wrap(err, "error encoding the SignedBlindedBeaconBlockCapella value body in SubmitBlindedBlockCapella") - } - - ctx, cancel := context.WithTimeout(ctx, submitBlindedBlockTimeout) - defer cancel() - rb, err := c.do(ctx, http.MethodPost, postBlindedBeaconBlockPath, bytes.NewBuffer(body)) - - if err != nil { - return nil, errors.Wrap(err, "error posting the SignedBlindedBeaconBlockBellatrix to the builder api") - } - ep := &ExecPayloadResponseCapella{} - if err := json.Unmarshal(rb, ep); err != nil { - return nil, errors.Wrap(err, "error unmarshaling the builder SubmitBlindedBlockCapella response") - } - return ep.ToProto() -} - // Status asks the remote builder server for a health check. A response of 200 with an empty body is the success/healthy // response, and an error response may have an error message. This method will return a nil value for error in the // happy path, and an error with information about the server response body for a non-200 response.