feat(validator): add VALIDATOR_ env vars for independent block limits (backport #21060)#21109
Closed
feat(validator): add VALIDATOR_ env vars for independent block limits (backport #21060)#21109
Conversation
…#21060) - Adds `VALIDATOR_MAX_L2_BLOCK_GAS`, `VALIDATOR_MAX_DA_BLOCK_GAS`, `VALIDATOR_MAX_TX_PER_BLOCK`, and `VALIDATOR_MAX_TX_PER_CHECKPOINT` env vars so operators can tune validation limits independently from `SEQ_` proposer limits - When a `VALIDATOR_` var is not set, no per-block limit is enforced for that dimension (checkpoint-level protocol limits still apply) - P2P gossip validation uses `VALIDATOR_MAX_TX_PER_BLOCK` when set, falling back to the sequencer's `maxTxsPerBlock` - [x] `yarn build` passes - [x] `yarn format` and `yarn lint` clean - [x] `yarn workspace @aztec/validator-client test` — 158 passed - [x] `yarn workspace @aztec/stdlib test src/checkpoint/validate.test.ts` — 20 passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
spalladino
pushed a commit
that referenced
this pull request
Mar 4, 2026
… (backport #21060) (#21132) ## Summary Backport of #21060 to v4. Redone from scratch on current v4 tip (after #21115 landed). - Adds `VALIDATOR_MAX_L2_BLOCK_GAS`, `VALIDATOR_MAX_DA_BLOCK_GAS`, `VALIDATOR_MAX_TX_PER_BLOCK`, and `VALIDATOR_MAX_TX_PER_CHECKPOINT` env vars so operators can tune validation limits independently from `SEQ_` proposer limits - When a `VALIDATOR_` var is not set, no per-block limit is enforced for that dimension (checkpoint-level protocol limits still apply) - P2P gossip validation uses `VALIDATOR_MAX_TX_PER_BLOCK` when set, falling back to the sequencer's `maxTxsPerBlock` - Validators can now pass per-block gas limits and tx limits to `buildBlock` during re-execution and `validateCheckpoint` for final validation ### Changes from previous attempt (#21109) The previous backport (#21109, now closed) was done before other PRs landed on v4 and became unmergeable. This is a clean redo on top of the current v4 tip where all prerequisites (`validateCheckpoint`, `computeDAGasUsed`, `maxTxsPerCheckpoint`) already exist. Build verified clean: http://ci.aztec-labs.com/80f4d462d5b81f2f ClaudeBox log: http://ci.aztec-labs.com/5215aa10b97d3ffe-1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #21060 to v4.
VALIDATOR_MAX_L2_BLOCK_GAS,VALIDATOR_MAX_DA_BLOCK_GAS,VALIDATOR_MAX_TX_PER_BLOCK, andVALIDATOR_MAX_TX_PER_CHECKPOINTenv vars so operators can tune validation limits independently fromSEQ_proposer limitsVALIDATOR_var is not set, no per-block limit is enforced for that dimension (checkpoint-level protocol limits still apply)VALIDATOR_MAX_TX_PER_BLOCKwhen set, falling back to the sequencer'smaxTxsPerBlockConflict resolution notes
The automatic cherry-pick failed with conflicts in 6 files. Resolution:
rollupManaLimitin the builder config, so themaxTxsPerCheckpointoverride was removed (validation still happens viavalidateCheckpoint)proposalValidatorOptspattern withvalidateMaxTxsPerBlocktxPublicSetupAllowListnaming (vs next'stxPublicSetupAllowListExtend), removedmaxTxsPerBlockfrom PickvalidateCheckpointcall withoutrollupManaLimit(not available in v4's builder config)stdlib/src/checkpoint/validate.tsand addedL2Block.computeDAGasUsed()method (prerequisites that exist on next but not v4)ClaudeBox log: http://ci.aztec-labs.com/59a8d31f82bf9b46-1