RFC: Use MAX_BLOB_COMMITMENTS_PER_BLOCK as max length for BlindedBlobsBundle SSZ lists#87
Conversation
|
To me it makes sense to use |
|
I'm convinced to use |
ralexstokes
left a comment
There was a problem hiding this comment.
makes sense!
one thing is that the limit of the List type does not influence the serialization or the hash tree root, it is only used when serializing or deserializing to understand if the data violates the type's size
that being said, I do think using this constant over the MAX_BLOBS_PER_BLOCK is more forward-compatible and will require less maintenance over time
|
This does end up impacting the hash tree root of which is passed to so in this case if |
interesting @realbigsean , there may be a discrepancy in the specs, as I was referencing this: https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#merkleization |
|
I think it's consistent cause
|
Context
In the below consensus PR,
MAX_BLOB_COMMITMENTS_PER_BLOCKwas introduced and used in the SSZ specification forblob_kzg_commitmentsin the deneb beacon block:blob_kzg_commitmentssize limit to MAX_BLOB_COMMITMENTS_PER_BLOCK (4096) consensus-specs#3338The SSZ representation of KZG blobs commitments are currently different in
BeaconBlockBodyandBlindedBlobBundle:BeaconBlockBody:BlindedBlobsBundle:I'm interested in hearing people's thought about whether
MAX_BLOBS_PER_BLOCKorMAX_BLOB_COMMITMENTS_PER_BLOCKshould be used in theBlindedBlobsBundleSSZ specification. AFAIK this has no impact on serialisation or deserialisation, but will be used in computing the signing root for theBuilderBid.I think we'd be okay either way, as this tree hash root isn't stored anywhere and only used for bid signatures, which means it's short lived. Using
MAX_BLOB_COMMITMENTS_PER_BLOCKfor max length gives us consistency with the beacon block representation, which means in some languages we could reuse the same type. On the other hand, usingMAX_BLOBS_PER_BLOCKmeans it's probably more consistent with the rest of the API specs -maxItems: 6is specified for all blob related lists, includingblobs_sidecars.I don't have a strong opinion here, keen to hear people's thoughts!