feat(sequencer): add SEQ_MAX_TX_PER_CHECKPOINT config (backport #21016)#21115
Merged
spalladino merged 1 commit intov4from Mar 4, 2026
Merged
feat(sequencer): add SEQ_MAX_TX_PER_CHECKPOINT config (backport #21016)#21115spalladino merged 1 commit intov4from
spalladino merged 1 commit intov4from
Conversation
Backport of #21016 to v4. Adds a `SEQ_MAX_TX_PER_CHECKPOINT` configuration option that limits the total number of transactions across all blocks in a checkpoint. Per-block TX limits are derived from the checkpoint limit using the same ceil(limit/maxBlocks*multiplier) pattern used for gas limits. Key changes: - Extract `computeBlockLimits` as a free function from SequencerClient - Add `validateCheckpointStructure` for structural validation of checkpoints - Extend `capLimitsByCheckpointBudgets` with TX count capping - Add `maxTxsPerCheckpoint` to SequencerConfig and block builder config - Fix Checkpoint.random to properly align global variables between header and blocks - Add tests for computeBlockLimits, validateCheckpointStructure, and TX budget capping
spalladino
approved these changes
Mar 4, 2026
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
This was referenced Mar 4, 2026
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
Manual backport of #21016 to v4. Replaces #21078 which had too many merge conflicts.
SEQ_MAX_TX_PER_CHECKPOINTconfig to limit total transactions across all blocks in a checkpointcomputeBlockLimitsas a free function fromSequencerClientfor deriving per-block limits from checkpoint limitsvalidateCheckpointStructurefor structural validation of checkpoints (block count, slot matching, archive chaining)capLimitsByCheckpointBudgetswith TX count cappingCheckpoint.randomto properly align global variables between header and blockscomputeBlockLimits,validateCheckpointStructure, and TX budget cappingAdapted for v4 naming conventions (e.g.
txPublicSetupAllowListvstxPublicSetupAllowListExtend).Test plan
private_kernel_reset_dimensions.jsonare unrelated)computeBlockLimits,validateCheckpointStructure, checkpoint TX budget capping,maxTxsPerBlockproposal validationClaudeBox log: http://ci.aztec-labs.com/53d7ba930fa50e5d-1