mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user