From f5c62d0552e089634e2146fb0f532fdd028821b4 Mon Sep 17 00:00:00 2001 From: cui Date: Fri, 5 Jun 2026 01:17:46 +0800 Subject: [PATCH] core/types: BlobHashes should iterate Commitments (#35109) Previously was iterating Blobs, but that could cause panic if the sidecar is malformed. --- core/types/tx_blob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/tx_blob.go b/core/types/tx_blob.go index 31aadb5419..90603341e6 100644 --- a/core/types/tx_blob.go +++ b/core/types/tx_blob.go @@ -89,7 +89,7 @@ func NewBlobTxSidecar(version byte, blobs []kzg4844.Blob, commitments []kzg4844. func (sc *BlobTxSidecar) BlobHashes() []common.Hash { hasher := sha256.New() h := make([]common.Hash, len(sc.Commitments)) - for i := range sc.Blobs { + for i := range sc.Commitments { h[i] = kzg4844.CalcBlobHashV1(hasher, &sc.Commitments[i]) } return h