Skip to content

chore: v6 l1 updates integration branch - #25401

Draft
alexghr wants to merge 7 commits into
nextfrom
project/v6-l1-updates
Draft

chore: v6 l1 updates integration branch#25401
alexghr wants to merge 7 commits into
nextfrom
project/v6-l1-updates

Conversation

@alexghr

@alexghr alexghr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

.

aminsammara and others added 7 commits August 28, 2026 09:42
Adds a governance-set margin `mu` on the mana base fee. The fee becomes
`cost * (1 + mu) * congestionMultiplier`: operators still receive exactly
`cost` from the fee waterfall plus the unchanged block reward, and the markup
above cost goes to a governance-set `protocolFeeRecipient`, which defaults to
the current burn address.

- `mu` is a uint16 bps field packed into bits 224-239 of `CompressedFeeConfig`
  and deploys at 0, so the rollup is bit-identical to today.
- `setProtocolFeeMargin` is governance-only and rate-limited to x3/2 on the fee
  multiplier per 30-day window, matching `setProvingCostPerMana`. Decreases are
  immediate and unrestricted; setting the current value is a no-op.
- The `(1 + mu)` scaling is applied only to the `fakeExponential` factor in
  `congestionMultiplier`. The `mulDiv` divisor stays
  `MINIMUM_CONGESTION_MULTIPLIER` -- scaling both sites cancels the margin.
- The fee header's uint64 `congestionCost` field becomes `protocolFee` and
  carries `summedMinFee - sequencerCost - proverCost` as a single subtraction
  clamped at 0, so `fee - protocolFee = cost * manaUsed` holds to the wei.
- `RewardLib.BURN_ADDRESS` becomes the deploy-time default for a stored
  `protocolFeeRecipient`; `getBurnAddress()` is replaced by
  `getProtocolFeeRecipient()`.
- The TypeScript fee mirror is updated to match bit-exactly, with `mu` threaded
  through the L1 config read into the fee predictor.
## Summary

- reuse the current epoch already computed during proof acceptance
- cache the packed chain tips for full-proof detection and proven-tip
advancement
- read the known-existing next checkpoint slot directly instead of
repeating checkpoint-number validation
- update the gas benchmark results; this saves 1,053 gas per proof
submission versus the parent PR implementation, leaving roughly 3,729
gas of net overhead versus the pre-PR baseline

## Tests

- `forge fmt --check`
- `forge test --offline --match-contract MultiProofTest`
- `forge test --offline --match-contract HandleRewardsTest`
- `python3 scripts/gas_benchmarks.py`
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.

4 participants