core/txpool: proof length verification in velidateCellsOsaka

This commit is contained in:
healthykim 2026-07-13 15:39:10 +02:00
parent 41e966c2b5
commit 0e1160c1c8

View file

@ -210,6 +210,9 @@ func ValidateCells(sidecar *types.BlobTxCellSidecar) error {
if blobCount != len(sidecar.Commitments) { if blobCount != len(sidecar.Commitments) {
return fmt.Errorf("invalid number of %d blobs compared to %d commitments", blobCount, len(sidecar.Commitments)) return fmt.Errorf("invalid number of %d blobs compared to %d commitments", blobCount, len(sidecar.Commitments))
} }
if len(sidecar.Proofs) != len(sidecar.Commitments)*kzg4844.CellProofsPerBlob {
return fmt.Errorf("invalid number of %d proofs compared to %d commitments", len(sidecar.Proofs), len(sidecar.Commitments))
}
if sidecar.Version != types.BlobSidecarVersion1 { if sidecar.Version != types.BlobSidecarVersion1 {
return fmt.Errorf("unexpected sidecar version, want: %d, got: %d", types.BlobSidecarVersion1, sidecar.Version) return fmt.Errorf("unexpected sidecar version, want: %d, got: %d", types.BlobSidecarVersion1, sidecar.Version)
} }