From cb08ea963802005dfb4966fc795a01a945cc1269 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 8 Oct 2024 13:09:10 +0200 Subject: [PATCH] eth/catalyst: remove requests in GetPayloadBodies --- beacon/engine/types.go | 1 - eth/catalyst/api.go | 21 ++------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/beacon/engine/types.go b/beacon/engine/types.go index 50eccfd2a8..4ef15c37f1 100644 --- a/beacon/engine/types.go +++ b/beacon/engine/types.go @@ -338,7 +338,6 @@ func BlockToExecutableData(block *types.Block, fees *big.Int, sidecars []*types. type ExecutionPayloadBody struct { TransactionData []hexutil.Bytes `json:"transactions"` Withdrawals []*types.Withdrawal `json:"withdrawals"` - Requests []hexutil.Bytes `json:"requests"` } // Client identifiers to support ClientVersionV1. diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index ef4534e943..cf75269ff6 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -1185,13 +1185,7 @@ func (api *ConsensusAPI) GetPayloadBodiesByHashV1(hashes []common.Hash) []*engin bodies := make([]*engine.ExecutionPayloadBody, len(hashes)) for i, hash := range hashes { block := api.eth.BlockChain().GetBlockByHash(hash) - body := getBody(block) - if body != nil { - // Nil out the V2 values, clients should know to not request V1 objects - // after Prague. - body.Requests = nil - } - bodies[i] = body + bodies[i] = getBody(block) } return bodies } @@ -1210,18 +1204,7 @@ func (api *ConsensusAPI) GetPayloadBodiesByHashV2(hashes []common.Hash) []*engin // GetPayloadBodiesByRangeV1 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range // of block bodies by the engine api. func (api *ConsensusAPI) GetPayloadBodiesByRangeV1(start, count hexutil.Uint64) ([]*engine.ExecutionPayloadBody, error) { - bodies, err := api.getBodiesByRange(start, count) - if err != nil { - return nil, err - } - // Nil out the V2 values, clients should know to not request V1 objects - // after Prague. - for i := range bodies { - if bodies[i] != nil { - bodies[i].Requests = nil - } - } - return bodies, nil + return api.getBodiesByRange(start, count) } // GetPayloadBodiesByRangeV2 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range