Repository navigation
feat: update L1 gas constants for Glamsterdam - #25609
Merged
Merged
Conversation
Replace the benchmark-derived placeholders for L1_GAS_PER_CHECKPOINT_PROPOSED (500k -> 520k) and L1_GAS_PER_EPOCH_VERIFIED (4M -> 2.5M) with values measured on Sepolia after Glamsterdam. Recompute fee_data_points.json for the new constants and carry the matching TypeScript port bump as labs patch 0011.
spalladino
marked this pull request as ready for review
October 7, 2026 14:16
spalladino
requested review from
iAmMichaelConnor,
just-mitch and
koenmtb1
as code owners
October 7, 2026 14:16
AztecBot
pushed a commit
that referenced
this pull request
Oct 7, 2026
## What changed `FeeLib.sol` prices the L1 work a sequencer and a prover must recover with two constants. They were placeholders taken from a forge benchmark run under `--evm-version amsterdam`. This PR replaces them with values measured on Sepolia after Glamsterdam: | Constant | Old | New | |---|---|---| | `L1_GAS_PER_CHECKPOINT_PROPOSED` | 500,000 | 520,000 | | `L1_GAS_PER_EPOCH_VERIFIED` | 4,000,000 | 2,500,000 | Sepolia measurements: - **Propose** (through Multicall3 `aggregate3`): median 487k; ~514k per checkpoint on average once the `setupEpoch` folded into each epoch's first checkpoint is counted; the most expensive regular propose was 520k. - **Epoch proof** (first proof submitted for an epoch): median 2.36M, max 2.51M. The governance proposal is at AztecProtocol/governance#68. ## Mirrors updated - `l1-contracts/test/fixtures/fee_data_points.json` is recomputed for the new constants. Only the sequencer, prover and protocol fee components change. The congestion multiplier and the L1 fee inputs stay the same. The recompute script reproduces the current fixture exactly with the old constants (0 of 672 points differ), so the only thing that moves is the constants. - `labs-patches/0011` makes the same change to the TypeScript port (`yarn-project/stdlib/src/gas/fee_math.ts`), updates the constants table in the stdlib gas README, and updates the epoch constant hardcoded in the single-node `fees_test.ts` e2e. The patch stays in the series until the aztec-node PR lands. Nothing else in the tree mirrors these values: they are not in the constants codegen, and no docs state them. ## Testing - `forge test` in `l1-contracts` (excluding the verifier-dependent scripts, `shouting.t.sol` and `UniswapPortalTest`): 1370 passed, 0 failed. The fee suites under `test/fees/` (43 tests) pass both before and after the change. - In aztec-node, `stdlib/src/gas` and `stdlib/src/tx`, the sequencer-client `global_variable_builder` tests and the aztec-node `next_block` tests all pass. `fee_predictor.test.ts` deploys the rollup to anvil and checks the TypeScript predictions against `getManaMinFeeAt`. It fails when only the TypeScript side is updated (`625010100000 != 598135100000`). It passes once the L1 contracts carry the new constants too. (cherry picked from commit 828486f)
4 tasks done
AztecBot
pushed a commit
that referenced
this pull request
Oct 8, 2026
## What changed `FeeLib.sol` prices the L1 work a sequencer and a prover must recover with two constants. They were placeholders taken from a forge benchmark run under `--evm-version amsterdam`. This PR replaces them with values measured on Sepolia after Glamsterdam: | Constant | Old | New | |---|---|---| | `L1_GAS_PER_CHECKPOINT_PROPOSED` | 500,000 | 520,000 | | `L1_GAS_PER_EPOCH_VERIFIED` | 4,000,000 | 2,500,000 | Sepolia measurements: - **Propose** (through Multicall3 `aggregate3`): median 487k; ~514k per checkpoint on average once the `setupEpoch` folded into each epoch's first checkpoint is counted; the most expensive regular propose was 520k. - **Epoch proof** (first proof submitted for an epoch): median 2.36M, max 2.51M. The governance proposal is at AztecProtocol/governance#68. ## Mirrors updated - `l1-contracts/test/fixtures/fee_data_points.json` is recomputed for the new constants. Only the sequencer, prover and protocol fee components change. The congestion multiplier and the L1 fee inputs stay the same. The recompute script reproduces the current fixture exactly with the old constants (0 of 672 points differ), so the only thing that moves is the constants. - `labs-patches/0011` makes the same change to the TypeScript port (`yarn-project/stdlib/src/gas/fee_math.ts`), updates the constants table in the stdlib gas README, and updates the epoch constant hardcoded in the single-node `fees_test.ts` e2e. The patch stays in the series until the aztec-node PR lands. Nothing else in the tree mirrors these values: they are not in the constants codegen, and no docs state them. ## Testing - `forge test` in `l1-contracts` (excluding the verifier-dependent scripts, `shouting.t.sol` and `UniswapPortalTest`): 1370 passed, 0 failed. The fee suites under `test/fees/` (43 tests) pass both before and after the change. - In aztec-node, `stdlib/src/gas` and `stdlib/src/tx`, the sequencer-client `global_variable_builder` tests and the aztec-node `next_block` tests all pass. `fee_predictor.test.ts` deploys the rollup to anvil and checks the TypeScript predictions against `getManaMinFeeAt`. It fails when only the TypeScript side is updated (`625010100000 != 598135100000`). It passes once the L1 contracts carry the new constants too. (cherry picked from commit 828486f)
IlyasRidhuan
pushed a commit
that referenced
this pull request
Oct 8, 2026
Rolling integration PR carrying merged `port-to-v6` PRs from `next` onto `v6`. One commit per source PR (plus a `fix(port):` commit after any conflicted pick). ## Ported - [x] [#25596](#25596) chore: remove ledwards2225 from CODEOWNERS — clean pick - [x] [#25609](#25609) feat: update L1 gas constants for Glamsterdam — clean pick. It adds `labs-patches/0011-…` to v6's otherwise empty patch queue. The patch's pre-image blobs match v6's labs pin `ee1312cf`, so it applies there unchanged. - [x] [#25600](#25600) test(l1-contracts): measure BN254 proof-of-possession gas against the GSE cap — clean pick. The sources and fixtures it imports (`BN254Lib.sol`, `Bn254LibWrapper.sol`, `BN254Fixtures.t.sol`, `bn254_constants.json`) are identical on v6 and next. - [x] [#25619](#25619) fix(l1): escape hatch, staking flush and rollup registration payload fixes — clean pick. All 34 touched files match next byte-for-byte afterwards. --- *Created by [claudebox](https://claudebox.work/v2/sessions/9666bbcd1ae659f5/jobs/1) · group: `slackbot` · [Slack thread](https://aztecprotocol.slack.com/archives/C0AGN2WT3CP/p1791216786568079?thread_ts=1791216786.568079&cid=C0AGN2WT3CP)* --------- Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
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.
What changed
FeeLib.solprices the L1 work a sequencer and a prover must recover with two constants. They were placeholders taken from a forge benchmark run under--evm-version amsterdam. This PR replaces them with values measured on Sepolia after Glamsterdam:L1_GAS_PER_CHECKPOINT_PROPOSEDL1_GAS_PER_EPOCH_VERIFIEDSepolia measurements:
aggregate3): median 487k; ~514k per checkpoint on average once thesetupEpochfolded into each epoch's first checkpoint is counted; the most expensive regular propose was 520k.The governance proposal is at AztecProtocol/governance#68.
Mirrors updated
l1-contracts/test/fixtures/fee_data_points.jsonis recomputed for the new constants. Only the sequencer, prover and protocol fee components change. The congestion multiplier and the L1 fee inputs stay the same. The recompute script reproduces the current fixture exactly with the old constants (0 of 672 points differ), so the only thing that moves is the constants.labs-patches/0011makes the same change to the TypeScript port (yarn-project/stdlib/src/gas/fee_math.ts), updates the constants table in the stdlib gas README, and updates the epoch constant hardcoded in the single-nodefees_test.tse2e. The patch stays in the series until the aztec-node PR lands.Nothing else in the tree mirrors these values: they are not in the constants codegen, and no docs state them.
Testing
forge testinl1-contracts(excluding the verifier-dependent scripts,shouting.t.solandUniswapPortalTest): 1370 passed, 0 failed. The fee suites undertest/fees/(43 tests) pass both before and after the change.stdlib/src/gasandstdlib/src/tx, the sequencer-clientglobal_variable_buildertests and the aztec-nodenext_blocktests all pass.fee_predictor.test.tsdeploys the rollup to anvil and checks the TypeScript predictions againstgetManaMinFeeAt. It fails when only the TypeScript side is updated (625010100000 != 598135100000). It passes once the L1 contracts carry the new constants too.