chore: v6 l1 updates integration branch - #25401
Draft
alexghr wants to merge 7 commits into
Draft
Conversation
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`
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.
.