attestantio / go-eth2-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect `ssz-max` limits for BlockContents

jtraglia opened this issue · comments

Hi there, I was reviewing the Deneb structures and noticed that *BlockContents limits the number of KZG proofs and blobs to 6 (MAX_BLOBS_PER_BLOCK) rather than 4096 (MAX_BLOB_COMMITMENTS_PER_BLOCK) like I think it should.

type BlockContents struct {
Block *deneb.BeaconBlock
KZGProofs []deneb.KZGProof `ssz-max:"6" ssz-size:"?,48"`
Blobs []deneb.Blob `ssz-max:"6" ssz-size:"?,131072"`
}

type SignedBlockContents struct {
SignedBlock *deneb.SignedBeaconBlock
KZGProofs []deneb.KZGProof `ssz-max:"6" ssz-size:"?,48"`
Blobs []deneb.Blob `ssz-max:"6" ssz-size:"?,131072"`
}

For reference, see the definition of BlockContents in the Beacon-APIs repo:

https://github.com/ethereum/beacon-APIs/blob/3b6928b1dedc1cb1850975cc86a6cd58dc4b4861/types/deneb/block_contents.yaml#L2-L14

yes I think we had some issue publishing ssz encoded blocks to lighthouse, this might be the issue

Thanks; I'll address this.

@avalonche this is unlikely to be the cause of publishing SSZ blocks as it only changes bounds checks. I have successfully published SSZ-encoded deneb blocks to lighthouse 5.0.0.