feat(l1): add checkpoint reward overrides - #25461
Open
spalladino wants to merge 4 commits into
Open
spalladino wants to merge 4 commits into
spalladino wants to merge 4 commits into
Conversation
spalladino
force-pushed
the
project/v6-l1-updates
branch
from
September 10, 2026 16:57
af732b3 to
c751592
Compare
spalladino
requested review from
iAmMichaelConnor and
koenmtb1
as code owners
September 10, 2026 16:57
spalladino
force-pushed
the
project/v6-checkpoint-reward-overrides
branch
from
September 10, 2026 16:57
bc6611f to
00cd70b
Compare
…5426) Registry reward overrides never applied to ATP-backed validators, because the lookup probed the wrong contract. ATP stakers (the `ATPWithdrawableAndClaimableStaker` family in ignition-contracts) register themselves as the GSE withdrawer when they deposit, both on the direct path and through the `StakingRegistry` provider path. The staker only exposes `getATP()`; `getRegistry()` lives on the ATP. `RewardLib` called `getRegistry()` on the withdrawer directly, so on the deployed stakers the probe reverted and every ATP-backed proposer silently fell back to the default sequencer reward. - `RewardLib.tryGetRegistry` now resolves `withdrawer.getATP()` and then `atp.getRegistry()`, through a shared defensive probe (`tryGetAddress`) that keeps the fixed gas cap, exact 32-byte return and clean-address checks per hop. A withdrawer that answers `getRegistry()` itself no longer matches, since no deployed staker does. - Unit tests and the partial-epoch-proof gas benchmark now model the real shape (staker → ATP → registry) with shared mocks in `test/mock/ATPMocks.sol`. The two-hop lookup adds ~3.2k gas for one checkpoint and ~23k for a full 32-checkpoint epoch with two overrides. - New `test/fork/MainnetATPRewardOverride.t.sol` checks the lookup against real mainnet ATP stakers: v1 and v2 staker implementations, the auction and genesis-sale ATP registries, and both the direct and the `StakingRegistry` provider staking paths. It asserts the attester is validating on the canonical rollup, that the GSE withdrawer is the staker, that the staker does not answer `getRegistry()`, that the two-hop lookup resolves the registry, and that `handleRewardsAndFees` applies the override. Against the pre-fix code the last two assertions fail (default 50e18 paid instead of the 10e18 override). - The fork test runs offline in CI. `setUp` loads a state snapshot (`test/fixtures/mainnet_atp_reward_override.json`) produced by `vm.dumpState` from a mainnet fork at block 25934884; the dump only contains the accounts and slots the test touches (13 accounts, ~190KB). Set `MAINNET_ATP_FIXTURE_RPC_URL` to a mainnet RPC to refresh the snapshot; regeneration is deterministic. - Fixes the solhint `imports-order` errors in `RewardLib.sol` that were failing CI on the stack.
spalladino
force-pushed
the
project/v6-l1-updates
branch
from
September 10, 2026 17:23
c751592 to
6dce8ee
Compare
spalladino
force-pushed
the
project/v6-checkpoint-reward-overrides
branch
from
September 10, 2026 17:23
00cd70b to
4d048ba
Compare
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.
Adds configurable per-registry sequencer checkpoint rewards on top of the v6 L1 integration branch.
Context
The rollup needs to override the default sequencer checkpoint reward for validators associated with selected ATP registries. ATP-backed validators register their staker as the GSE withdrawer, so resolving the registry requires following the staker to its ATP and then the ATP to its registry.
Approach
project/v6-l1-updates.Fixes A-1800