feat(l1): add V5 upgrade payload and deploy script#23752
Open
just-mitch wants to merge 1 commit into
Open
Conversation
b95375d to
3af4bf1
Compare
Adds the V5UpgradePayload governance contract that swaps canonical rollup status to the v5 rollup and drains the old reward distributor, the DeployRollupForUpgradeV5 forge script and its deploy_aztec_l1_contracts.ts wrapper, the AZIP-5 reward-booster retune, and a deployment runbook with tests.
3af4bf1 to
04afbd4
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.
Summary
Adds the V5 rollup upgrade tooling: a single governance payload that swaps the canonical rollup to v5 and migrates the reward distributor, plus the forge deploy script, its TypeScript wrapper, and the v5 network parameters.
The v5 rollup binds its reward distributor immutably at construction (AZIP-2), so changing the distributor requires deploying a new rollup and completing the swap through governance.
V5UpgradePayloadperforms that swap atomically.What's included
V5UpgradePayload.sol— governance payload with four actions, executed in order:RewardDistributor's canonical pool into the new distributor (legacyrecover(asset,to,amount)selector; sized tobalance - aggregateDebtso earmarked funds stay claimable in v4).Registry.addRollup(v5)— makes v5 canonical.Registry.updateRewardDistributor(new)— repoints the registry.GSE.addRollup(v5)— registers v5 so attesters follow without redepositing.DeployRollupForUpgradeV5.s.sol— deploys the v5 reward distributor, the v5 rollup wired to it, and the payload; emits a single JSON line with all addresses.deployRollupForUpgradeV5indeploy_aztec_l1_contracts.ts— wrapper with optional Etherscan verification on mainnet/sepolia. The shared forge-invocation logic is factored intorunRollupUpgradeForgeScript, whichdeployRollupForUpgradenow also uses.RollupConfiguration.sol; v5 slashing schedule and halved proving-cost-per-mana innetwork-defaults.yml.V5_UPGRADE_RUNBOOK.md— sepolia deploy, mainnet fork dry-run, and production deploy procedures.Testing
test/periphery/V5UpgradePayload.t.sol— 5 tests covering constructor capture, action encoding/targets, end-to-end drain + promotion, the no-earmarked-funds case, and the not-governance revert path.forge buildand the existingDeployRollupForUpgrade.t.solpass.tscandeslintclean for theethereumpackage.