diff --git a/beacon/engine/types.go b/beacon/engine/types.go index 1d0cfd7364..05924631b1 100644 --- a/beacon/engine/types.go +++ b/beacon/engine/types.go @@ -260,7 +260,7 @@ func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.H // Compute requestsHash if any requests are non-nil. var requestsHash *common.Hash if data.Requests != nil { - h := types.CalcRequestHash(data.Requests) + h := types.CalcRequestsHash(data.Requests) requestsHash = &h } header := &types.Header{ diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 63cd0f8036..40a90e4a1b 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -390,7 +390,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig, return nil, nil, nil, NewError(ErrorEVM, fmt.Errorf("could not parse requests logs: %v", err)) } // Calculate the requests root - h := types.CalcRequestHash(requests) + h := types.CalcRequestsHash(requests) execRs.RequestsHash = &h execRs.Requests = requests } diff --git a/core/block_validator.go b/core/block_validator.go index 04102a5efb..35a815b6a1 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -145,7 +145,7 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD } // Validate the parsed requests match the expected header value. if header.RequestsHash != nil { - reqhash := types.CalcRequestHash(res.Requests) + reqhash := types.CalcRequestsHash(res.Requests) if reqhash != *header.RequestsHash { return fmt.Errorf("invalid deposit root hash (remote: %x local: %x)", *header.RequestsHash, reqhash) } diff --git a/core/types/block.go b/core/types/block.go index e6cbc65887..6defe1e066 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -294,7 +294,7 @@ func NewBlock(header *Header, body *Body, receipts []*Receipt, hasher TrieHasher b.header.RequestsHash = &EmptyRequestsHash b.requests = [][]byte{} } else { - h := CalcRequestHash(requests) + h := CalcRequestsHash(requests) b.header.RequestsHash = &h b.requests = slices.Clone(requests) } @@ -474,7 +474,7 @@ func CalcUncleHash(uncles []*Header) common.Hash { return rlpHash(uncles) } -func CalcRequestHash(requests [][]byte) common.Hash { +func CalcRequestsHash(requests [][]byte) common.Hash { if len(requests) == 0 { return EmptyRequestsHash } diff --git a/eth/protocols/eth/handlers.go b/eth/protocols/eth/handlers.go index b1465e6f8a..6a2a348707 100644 --- a/eth/protocols/eth/handlers.go +++ b/eth/protocols/eth/handlers.go @@ -326,7 +326,7 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error { withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher) } if body.Requests != nil { - requestsHashes[i] = types.CalcRequestHash(body.Requests) + requestsHashes[i] = types.CalcRequestsHash(body.Requests) } } return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes, requestsHashes}