Skip to content

fix: only allow enabling permissioned game types in opcmv2 deployment#835

Merged
0xiamflux merged 3 commits intosc-feat/opcm2-deploy-opc-gamesfrom
feat/opcm2-deploy-opc-games
Feb 2, 2026
Merged

fix: only allow enabling permissioned game types in opcmv2 deployment#835
0xiamflux merged 3 commits intosc-feat/opcm2-deploy-opc-gamesfrom
feat/opcm2-deploy-opc-games

Conversation

@0xniha
Copy link
Copy Markdown

@0xniha 0xniha commented Feb 2, 2026

Closes OPT-1423

@0xniha 0xniha requested review from 0xOneTony and 0xiamflux February 2, 2026 19:23
@0xniha 0xniha self-assigned this Feb 2, 2026
@linear
Copy link
Copy Markdown

linear bot commented Feb 2, 2026

Comment on lines +889 to +892
IDisputeGameFactory _dgf = IDisputeGameFactory(_input.sysCfg.disputeGameFactory());
bool isInitialDeployment = address(_dgf.gameImpls(GameTypes.CANNON)) == address(0)
&& address(_dgf.gameImpls(GameTypes.CANNON_KONA)) == address(0)
&& address(_dgf.gameImpls(GameTypes.PERMISSIONED_CANNON)) != address(0);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this check, I'm open to suggestions to replace it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't ⁨assertValidPermissionlessDisputeGame⁩ just return early if those are zero addresses?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, with an error

0xiamflux
0xiamflux previously approved these changes Feb 2, 2026
@0xiamflux 0xiamflux merged commit 2ba65ba into sc-feat/opcm2-deploy-opc-games Feb 2, 2026
1 check passed
@0xiamflux 0xiamflux deleted the feat/opcm2-deploy-opc-games branch February 2, 2026 22:06
0xiamflux pushed a commit that referenced this pull request Feb 6, 2026
ethereum-optimism#19077)

* fix: only allow enabling permissioned game types in opcmv2 deployment (#835)

* fix: only allow permissioned game types in opcmv2 deployment

* docs: add comment for permissionless games config in deployopchain

* feat: add isInitialDeployment argument to std validator script

* fix: undo OPCMv1 changes

* fix: old test content

* fix: expect validator errors for disabled games in deploy test

CANNON and CANNON_KONA are intentionally disabled during initial deployment,
so no implementations are registered. The validator correctly flags this as
PLDG-10 and CKDG-10 errors. Update test to expect these errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: revert on non-PERMISSIONED_CANNON game type in DeployOPChain

Address review feedback: raise an error instead of silently overwriting
the disputeGameType input. Only PERMISSIONED_CANNON is valid for initial
deployment since no prestate exists for permissionless games.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants