-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Use MAX_BLOB_COMMITMENTS_PER_BLOCK
as max length for BlindedBlobsBundle SSZ lists
#87
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_BLOCK
was introduced and used in the SSZ specification forblob_kzg_commitments
in the deneb beacon block:blob_kzg_commitments
size limit to MAX_BLOB_COMMITMENTS_PER_BLOCK (4096) consensus-specs#3338The SSZ representation of KZG blobs commitments are currently different in
BeaconBlockBody
andBlindedBlobBundle
:BeaconBlockBody
:BlindedBlobsBundle
:I'm interested in hearing people's thought about whether
MAX_BLOBS_PER_BLOCK
orMAX_BLOB_COMMITMENTS_PER_BLOCK
should be used in theBlindedBlobsBundle
SSZ 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_BLOCK
for 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_BLOCK
means it's probably more consistent with the rest of the API specs -maxItems: 6
is specified for all blob related lists, includingblobs_sidecars
.I don't have a strong opinion here, keen to hear people's thoughts!