feat: add fork-tested in-place upgrade scripts for the deployed proxies - #281
Open
sphamjoli wants to merge 5 commits into
Open
feat: add fork-tested in-place upgrade scripts for the deployed proxies#281sphamjoli wants to merge 5 commits into
sphamjoli wants to merge 5 commits into
Conversation
Contributor
CI Summary
Per-section details omitted: combined body exceeded the 65000-char comment limit. Follow the View Report links above for each section's full output. |
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.
Description
Adds the in-place upgrade path for the deployed Paseo Asset Hub proxies. Each upgraded proxy gets an
Upgrade<Name>.s.solscript that drives the swap throughUpgrades.upgradeProxy(a beacon rotation for the stores) with a mandatory storage-layout diff against a committed<Name>Old.solsnapshot and no unsafe overrides, paired one-to-one with atest/fork/Upgrade<Name>.t.solthat forks Paseo through the ETH-RPC adapter, upgrades the live proxy, and re-runs that contract's P0 paths.Covered proxies:
DotnsRegistrar,DotnsRegistrarController,DotnsPopController,PopRules,DotnsNameWhitelist, and theLabelStorebeacon.The storage layout is corrected on the contracts whose in-place upgrade the fail-closed diff rejected:
DotnsRegistrar,DotnsPopController: the newly added mapping consumes one reserved slot, so__gapholds 49.DotnsNameWhitelist,DotnsRegistrarController: theAccessControlERC-7201 namespace is retained as an unused annotated struct so the layout stays truthful afterDotnsRoleManageris dropped.DotnsRegistrarController: the removedwhiteListslot is retained as a placeholder soprotocolRegistrykeeps its slot.Also adds
bun run test:fork(start the adapter, clean build, runtest/fork/**) and gives the fork tests their own CI shard so their outcome shows as a row in the CI Summary.Type
Scope
Related Issues
Fixes
A storage-layout incompatibility that would brick an in-place upgrade of
DotnsRegistrarController: removingwhiteListshiftedprotocolRegistryup one slot, so the upgraded implementation would read it asaddress(0).Checklist
Code
forge buildpassesforge testpassesTesting
Security
selfdestructordelegatecallDocumentation
Breaking Changes
How to test
Notes
The
Upgrade*.s.solscripts,*Old.solsnapshots, andtest/fork/**are PR-scoped and deleted before merge per CONTRIBUTING.md. The storage-layout fixes on the contracts are permanent.