From 3f1a3e8ea851c55eafcdc252051f5d73a6e1fbc5 Mon Sep 17 00:00:00 2001 From: qu0b Date: Thu, 12 Mar 2026 12:19:07 +0000 Subject: [PATCH] ethapi: encode slotNumber as hex in RPCMarshalHeader The slotNumber field was being passed as a raw *uint64 to the JSON marshaler, which serializes it as a plain decimal integer (e.g. 159). All Ethereum JSON-RPC quantity fields must be hex-encoded per spec. Wrap with hexutil.Uint64 to match the encoding of other numeric header fields like blobGasUsed and excessBlobGas. --- internal/ethapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index ca388b69e7..04444111e8 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -970,7 +970,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} { result["requestsHash"] = head.RequestsHash } if head.SlotNumber != nil { - result["slotNumber"] = head.SlotNumber + result["slotNumber"] = hexutil.Uint64(*head.SlotNumber) } return result }