diff --git a/p2p/sentry/sentry_multi_client/sentry_multi_client.go b/p2p/sentry/sentry_multi_client/sentry_multi_client.go index c15a91a2889..b0c6a3b2776 100644 --- a/p2p/sentry/sentry_multi_client/sentry_multi_client.go +++ b/p2p/sentry/sentry_multi_client/sentry_multi_client.go @@ -475,7 +475,7 @@ func (cs *MultiClient) blockBodies66(ctx context.Context, inreq *proto_sentry.In // No point processing empty response return nil } - cs.Bd.DeliverBodies(txs, uncles, withdrawals, nil, uint64(len(inreq.Data)), sentry.ConvertH512ToPeerID(inreq.PeerId)) + cs.Bd.DeliverBodies(txs, uncles, withdrawals, uint64(len(inreq.Data)), sentry.ConvertH512ToPeerID(inreq.PeerId)) return nil } diff --git a/turbo/stages/bodydownload/body_algos.go b/turbo/stages/bodydownload/body_algos.go index eac4c1388a3..509af2bc67b 100644 --- a/turbo/stages/bodydownload/body_algos.go +++ b/turbo/stages/bodydownload/body_algos.go @@ -164,8 +164,7 @@ func (bd *BodyDownload) RequestMoreBodies(tx kv.RwTx, blockReader services.FullB } if request { if header.UncleHash == types.EmptyUncleHash && header.TxHash == types.EmptyRootHash && - (header.WithdrawalsHash == nil || *header.WithdrawalsHash == types.EmptyRootHash) && - (header.RequestsHash == nil || *header.RequestsHash == types.EmptyRequestsHash) { + (header.WithdrawalsHash == nil || *header.WithdrawalsHash == types.EmptyRootHash) { // Empty block body body := &types.RawBody{} if header.WithdrawalsHash != nil { @@ -192,14 +191,11 @@ func (bd *BodyDownload) RequestMoreBodies(tx kv.RwTx, blockReader services.FullB if header.WithdrawalsHash != nil { copy(bodyHashes[2*length.Hash:], header.WithdrawalsHash.Bytes()) } - if header.RequestsHash != nil { - copy(bodyHashes[3*length.Hash:], header.RequestsHash.Bytes()) - } bd.requestedMap[bodyHashes] = blockNum blockNums = append(blockNums, blockNum) hashes = append(hashes, hash) } else { - // uncleHash, txHash, withdrawalsHash, and requestsHash are all empty (or block is prefetched), no need to request + // uncleHash, txHash, and withdrawalsHash are all empty (or block is prefetched), no need to request bd.delivered.Add(blockNum) } } @@ -253,7 +249,7 @@ func (bd *BodyDownload) RequestSent(bodyReq *BodyRequest, timeWithTimeout uint64 // DeliverBodies takes the block body received from a peer and adds it to the various data structures func (bd *BodyDownload) DeliverBodies(txs [][][]byte, uncles [][]*types.Header, withdrawals []types.Withdrawals, - requests []types.FlatRequests, lenOfP2PMsg uint64, peerID [64]byte, + lenOfP2PMsg uint64, peerID [64]byte, ) { bd.deliveryCh <- Delivery{txs: txs, uncles: uncles, withdrawals: withdrawals, lenOfP2PMessage: lenOfP2PMsg, peerID: peerID} diff --git a/turbo/stages/bodydownload/body_data_struct.go b/turbo/stages/bodydownload/body_data_struct.go index 71cf5d2e991..9d233ed1700 100644 --- a/turbo/stages/bodydownload/body_data_struct.go +++ b/turbo/stages/bodydownload/body_data_struct.go @@ -29,8 +29,8 @@ import ( "github.com/erigontech/erigon/core/types" ) -// BodyHashes is to be used for the mapping between TxHash, UncleHash, WithdrawalsHash, and RequestRoot to the block header -type BodyHashes [4 * length.Hash]byte +// BodyHashes is to be used for the mapping between TxHash, UncleHash, and WithdrawalsHash to the block header +type BodyHashes [3 * length.Hash]byte const MaxBodiesInRequest = 1024 @@ -39,7 +39,6 @@ type Delivery struct { txs [][][]byte uncles [][]*types.Header withdrawals []types.Withdrawals - requests []types.FlatRequests lenOfP2PMessage uint64 }