Skip to content

op-deployer: Revert on game config mismatches instead of promoting them to Super Games - #22128

Draft
0xiamflux wants to merge 3 commits into
developfrom
refactor/pcd-games-not-super-promoted
Draft

op-deployer: Revert on game config mismatches instead of promoting them to Super Games#22128
0xiamflux wants to merge 3 commits into
developfrom
refactor/pcd-games-not-super-promoted

Conversation

@0xiamflux

@0xiamflux 0xiamflux commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Context

DeployOPChain#_initialDeployGameSelection silently promoted PERMISSIONED_CANNON to SUPER_PERMISSIONED when the OPCM had SUPER_ROOT_GAMES_MIGRATION enabled, so a deployment could install a respected game type the caller never asked for.

Since DevFeatures.isDevFeatureEnabled returns true for that flag regardless of the bitmap (TODO #21662, mirrored in op-core/devfeatures), super mode is always on today. Every deploy was therefore being promoted, including op deployer's default respectedGameType = 1, which is why the Go side is part of this change.

Changes

Contracts:

  • _initialDeployGameSelection now 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_PERMISSIONED joins PERMISSIONED_CANNON as a supported permissioned selector; the unsupported-type message is untouched.

op-deployer:

  • standard.DisputeGameType goes from 1 to 5 (SUPER_PERMISSIONED).
  • ResolveInitialDeployRequirements accepts SUPER_PERMISSIONED.
  • Super game types explicitly leave CannonAbsolutePrestate zero.

No on-chain behavior change: SUPER_PERMISSIONED is already what gets deployed. An intent that sets respectedGameType = 1 now fails with a clear message instead of being promoted.

Tests

  • DeployOPChain.t.sol: the default input resolves through a new _permissionedGameType() helper. Added test_run_permissionedCannonGameTypeWithSuperRoot_reverts (the no-promotion regression) and test_run_superPermissionedGameTypeWithoutSuperRoot_reverts, renamed test_run_faultDisputeGamePermissionedCannon_succeeds to test_run_faultDisputeGamePermissioned_succeeds.
  • Go: dropped the three "SUPER_PERMISSIONED is rejected" table rows and the continuation gate case, flipped it to accepted in TestResolveInitialDeployRequirements, and updated the default-derived assertions (zero fallback prestate, standard.DisputeGameType, prepared SUPER_PERMISSIONED (5)).

Closes #22132

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.
@0xiamflux 0xiamflux changed the title Refactor/pcd games not super promoted op-deployer: Revert on game config mismatches instead of promoting them to Super Games Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PCD] Avoid quietly promoting permissioned games

1 participant