Skip to content

OPCMUpgradeV700: SUPER_PERMISSIONED_CANNON should use cannonKonaPrestate, not cannonPrestate #1412

@ajsutton

Description

@ajsutton

Claude: filing on behalf of @ajsutton.

Problem

In src/template/OPCMUpgradeV700.sol, _buildOneGameConfig routes per-game-type prestates as:

bool isKona = gt == CANNON_KONA || gt == SUPER_CANNON_KONA;
bytes32 absolutePrestate = isKona ? cannonKonaPre : cannonPre;

That sends SUPER_PERMISSIONED_CANNON (game type 5) to cannonPrestate and only SUPER_CANNON_KONA (game type 9) to cannonKonaPrestate.

For an output-root → super-root upgrade, both SUPER_PERMISSIONED_CANNON and SUPER_CANNON_KONA must use the kona-interop super prestate. The -interop kona variant supports super roots and works regardless of whether interop is enabled or scheduled on the chain. Pointing SUPER_PERMISSIONED_CANNON at cannonPrestate (the standard cannon MIPS prestate) means the deployed permissioned super game would reference the wrong prestate.

Fix

Source both SUPER_PERMISSIONED_CANNON and SUPER_CANNON_KONA from cannonKonaPrestate (or rename to a single superPrestate field). With that change, cannonPrestate is no longer needed in the TOML for this template and the OPCMUpgrade struct can drop it.

Concretely in _buildOneGameConfig:

bool isSuper = gt == SUPER_CANNON || gt == SUPER_PERMISSIONED_CANNON || gt == SUPER_CANNON_KONA;
bool isKona = gt == CANNON_KONA;
bytes32 absolutePrestate = (isSuper || isKona) ? cannonKonaPre : cannonPre;

(or refactor to a single super-prestate field — SUPER_CANNON is being removed anyway, so the only super game types that need a prestate are 5 and 9, and they share it.)

Impact

Any task built with the current template for an output-root→super-root upgrade would set the wrong prestate on the new SUPER_PERMISSIONED_CANNON game implementation, which would cause the on-chain op-challenger configuration to mismatch what the deployed game expects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions