Fix BlobsBundleV2 proofs limit (#15530)

* Assign max_cell_proofs_length the correct value

* Add changelog fragment

* Run update-go-pbs.sh

* Run update-go-ssz.sh

---------

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
Justin Traglia
2025-08-05 16:33:45 -05:00
committed by GitHub
parent 9c6ccd67c1
commit 2a09c9f681
7 changed files with 125 additions and 121 deletions

View File

@@ -3387,8 +3387,8 @@ func (b *BlobsBundleV2) MarshalSSZTo(buf []byte) (dst []byte, err error) {
}
// Field (1) 'Proofs'
if size := len(b.Proofs); size > 524288 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 524288)
if size := len(b.Proofs); size > 33554432 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 33554432)
return
}
for ii := 0; ii < len(b.Proofs); ii++ {
@@ -3464,7 +3464,7 @@ func (b *BlobsBundleV2) UnmarshalSSZ(buf []byte) error {
// Field (1) 'Proofs'
{
buf = tail[o1:o2]
num, err := ssz.DivideInt2(len(buf), 48, 524288)
num, err := ssz.DivideInt2(len(buf), 48, 33554432)
if err != nil {
return err
}
@@ -3541,8 +3541,8 @@ func (b *BlobsBundleV2) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (1) 'Proofs'
{
if size := len(b.Proofs); size > 524288 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 524288)
if size := len(b.Proofs); size > 33554432 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 33554432)
return
}
subIndx := hh.Index()
@@ -3555,7 +3555,7 @@ func (b *BlobsBundleV2) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
numItems := uint64(len(b.Proofs))
hh.MerkleizeWithMixin(subIndx, numItems, 524288)
hh.MerkleizeWithMixin(subIndx, numItems, 33554432)
}
// Field (2) 'Blobs'