op-deployer: Revert on game config mismatches instead of promoting them to Super Games - #22128
Draft
0xiamflux wants to merge 3 commits into
Draft
op-deployer: Revert on game config mismatches instead of promoting them to Super Games#221280xiamflux wants to merge 3 commits into
0xiamflux wants to merge 3 commits into
Conversation
…sioned when flag is enabled
These are the minimal changes just so other packages do not fail their tests, otherwise passing the Permissioned Cannon to a DeployOPChain that has Super Roots Migration dev flag enabled by default would throw an error.
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.
Context
DeployOPChain#_initialDeployGameSelectionsilently promotedPERMISSIONED_CANNONtoSUPER_PERMISSIONEDwhen the OPCM hadSUPER_ROOT_GAMES_MIGRATIONenabled, so a deployment could install a respected game type the caller never asked for.Since
DevFeatures.isDevFeatureEnabledreturns true for that flag regardless of the bitmap (TODO #21662, mirrored inop-core/devfeatures), super mode is always on today. Every deploy was therefore being promoted, including op deployer's defaultrespectedGameType = 1, which is why the Go side is part of this change.Changes
Contracts:
_initialDeployGameSelectionnow rejects a type from the other family with"DeployOPChain: dispute game type does not match OPCM super root mode"and returns the requested type unchanged.SUPER_PERMISSIONEDjoinsPERMISSIONED_CANNONas a supported permissioned selector; the unsupported-type message is untouched.op-deployer:
standard.DisputeGameTypegoes from 1 to 5 (SUPER_PERMISSIONED).ResolveInitialDeployRequirementsacceptsSUPER_PERMISSIONED.CannonAbsolutePrestatezero.No on-chain behavior change:
SUPER_PERMISSIONEDis already what gets deployed. An intent that setsrespectedGameType = 1now fails with a clear message instead of being promoted.Tests
DeployOPChain.t.sol: the default input resolves through a new_permissionedGameType()helper. Addedtest_run_permissionedCannonGameTypeWithSuperRoot_reverts(the no-promotion regression) andtest_run_superPermissionedGameTypeWithoutSuperRoot_reverts, renamedtest_run_faultDisputeGamePermissionedCannon_succeedstotest_run_faultDisputeGamePermissioned_succeeds.TestResolveInitialDeployRequirements, and updated the default-derived assertions (zero fallback prestate,standard.DisputeGameType,prepared SUPER_PERMISSIONED (5)).Closes #22132