Skip to content

fix: Do not assemble a block larger than blobs allowance#17130

Merged
spalladino merged 1 commit intonextfrom
palla/blob-limit-in-block-building
Sep 18, 2025
Merged

fix: Do not assemble a block larger than blobs allowance#17130
spalladino merged 1 commit intonextfrom
palla/blob-limit-in-block-building

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Sep 17, 2025

The sequencer publisher enforces a max size for a block, depending on the size it takes up in blobs. If the block exceeds that size, it's rejected by the publisher.

toBlobFields() {
let flattened: Fr[] = [];
this.txEffects.forEach((effect: TxEffect) => {
flattened = flattened.concat(effect.toBlobFields());
});
if (flattened.length > BLOBS_PER_BLOCK * FIELDS_PER_BLOB) {
throw new Error(
`Attempted to overfill block's blobs with ${flattened.length} elements. The maximum is ${
BLOBS_PER_BLOCK * FIELDS_PER_BLOB
}`,
);
}
return flattened;
}

This PR adds a check during block building to ensure that we don't go past that limit.

The sequencer publisher enforces a max size for a block, depending on
the size it takes up in blobs. If the block exceeds that size, it's
rejected by the publisher.

This PR adds a check during block building to ensure that we don't go
past that limit.
@spalladino spalladino added this pull request to the merge queue Sep 18, 2025
Merged via the queue into next with commit 639d124 Sep 18, 2025
15 checks passed
@spalladino spalladino deleted the palla/blob-limit-in-block-building branch September 18, 2025 14:58
spalladino added a commit that referenced this pull request Sep 25, 2025
The sequencer publisher enforces a max size for a block, depending on
the size it takes up in blobs. If the block exceeds that size, it's
rejected by the publisher.

https://github.com/AztecProtocol/aztec-packages/blob/bb87ea4a58a63771e61d551d105d8b52ba2014e6/yarn-project/stdlib/src/block/body.ts#L56-L70

This PR adds a check during block building to ensure that we don't go
past that limit.
PhilWindle added a commit that referenced this pull request Sep 29, 2025
This PR is a backport of the following into V2.

#17169
#17176 
#17186 
#17178 
#17177
#17130
#17039 
#17230
#17245 
#17273
#17186
#17192
#17194 
#17225 
#17285 
#17312 
#17326

---------

Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: Santiago Palladino <spalladino@gmail.com>
Co-authored-by: alexghr <3816165+alexghr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants