From 37309794ae1b8b14f03c16628cd38b5ee5ba4511 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 23 Apr 2026 12:46:50 +0200 Subject: [PATCH] crypto/kzg4844: explain it better --- crypto/kzg4844/kzg4844.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/kzg4844/kzg4844.go b/crypto/kzg4844/kzg4844.go index cb46eb7391..9aed0e952c 100644 --- a/crypto/kzg4844/kzg4844.go +++ b/crypto/kzg4844/kzg4844.go @@ -215,8 +215,9 @@ func IsValidVersionedHash(h []byte) bool { // For each blob being proven, the cells slice must contain at least 64 items. // // The `cellIndices` specify which of the 128 cells of each blob are given. -// Thus, `len(cellIndices)` must be >= 64 and <= 128 to be valid. -// `len(cells)` must be a multiple of `len(cellIndices)`. +// Note the list of indices is shared among all blobs, i.e. for a given list of indices +// [1, 2, 13], the cells slice must contain cells [1, 2, 13] of each blob. +// Thus, `len(cells)` must be a multiple of `len(cellIndices)`. // // One proof must be given for each cell. As such, `len(proofs)` must equal `len(cells)`. func VerifyCells(cells []Cell, commitments []Commitment, proofs []Proof, cellIndices []uint64) error {