feat: validate inputs in OptimismPortal2.migrateToSharedDisputeGame#20928
Open
stevennevins wants to merge 3 commits into
Open
feat: validate inputs in OptimismPortal2.migrateToSharedDisputeGame#20928stevennevins wants to merge 3 commits into
stevennevins wants to merge 3 commits into
Conversation
Reject zero-address lockbox/registry and require the new lockbox to have already authorized this portal. Defense-in-depth against operator footguns when the ProxyAdmin owner calls the portal entrypoint directly, bypassing the OPCM migrator.
Replace vm.mockCall scaffolding with freshly-deployed ETHLockbox and AnchorStateRegistry proxies that go through the real initialize path. Mirrors the wiring OPContractsManagerMigrator performs before calling migrateToSharedDisputeGame, so the portal's validation checks are exercised end-to-end against actual contracts.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #20928 +/- ##
==========================================
- Coverage 76.3% 76.0% -0.4%
==========================================
Files 185 130 -55
Lines 10698 6667 -4031
==========================================
- Hits 8166 5067 -3099
+ Misses 2388 1600 -788
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
Add sanity checks to
OptimismPortal2.migrateToSharedDisputeGamefor zero-address and unauthorized lockbox.This is a defense-in-depth addition. The conventional
OPContractsManagerMigrator.migratepath already calls_newLockbox.authorizePortal(portal)beforemigrateToSharedDisputeGameand prevents these input errorsfixes #20881