feat: ZKDisputeGame Multi-chain Super Game Migration Paths#21518
feat: ZKDisputeGame Multi-chain Super Game Migration Paths#21518ashitakah wants to merge 56 commits into
ZKDisputeGame Multi-chain Super Game Migration Paths#21518Conversation
…y with convention, update interface
…CWIA args encoding
…chainid 0 enforcement
|
/ci authorize 5b8667f |
ZKDisputeGame Multi-chain Super Game Migration Paths
|
@ashitakah Could you explain more about the issue of using |
Hey @Inphi, as we outlined in the document we shared here the regular Additionally, initially IIRC we thought that the reinitializer guard in the shared ASR would block multiple inits and cause the upgrade to revert but looking at the proxy upgrade again this doesnt look like this is the case since Lmk what you think and if you're open to converting it to a regular |
|
/ci authorize 57cb220 |
Summary
Adds the interop migration path (Path C):
OPContractsManagerV2.setInteropDisputeGames(...), which re-points the shared dispute games of an already-interop set to a new respected super game in a single transaction covering all chains. Current use case is the post-migration transition from shared fault proofs to a shared superZKDisputeGame. Reuses the migrator machinery; the standardupgrade()path can't be used since it re-inits per chain and would clobber the sharedAnchorStateRegistry/ETHLockbox. Paths A and B (isolated chains) need no contract changes and go throughupgrade(), since ZK is already inisSuperGame.Changes
Contracts —
src/L1/opcm/OPContractsManagerMigrator.solsetInteropDisputeGamesAnchorStateRegistrywith the new respected game type + anchor root, then sets the dispute game impls on the sharedDisputeGameFactoryvia the existing_getGameImpl/_makeGameArgs. Enabled configs register, disabled configs clear. No new infra deployed, per-chain portals untouched.OPTIMISM_PORTAL_INTEROP+ZK_DISPUTE_GAMEdev features (TODO to drop the ZK gate once finalized; the function is generic across super games). RequiresstartingRespectedGameType ∈ isSuperGame. Runtime check that all portals resolve to the same shared ASR.OPContractsManagerMigrator_ZKDisputeGameNotEnabled,OPContractsManagerMigrator_NotSharedInteropSet.Contracts —
src/L1/opcm/OPContractsManagerV2.solsetInteropDisputeGames_onlyDelegateCall+ delegatecall to the migrator (mirrorsmigrate()). Transitional, removed once interop is native in OPCM.7.1.22→7.1.23.Interfaces
interfaces/L1/opcm/IOPContractsManagerMigrator.solsetInteropDisputeGames+ the two errors.interfaces/L1/opcm/IOPContractsManagerV2.solsetInteropDisputeGames.Forge script —
scripts/deploy/SetInteropDisputeGames.s.solInput/Output/runmirroringInteropMigration.s.sol. EtchesDummyCallerto simulate the governance delegatecall.checkOutputasserts on chain: all portals share the DGF, respected game type updated, and each input config applied (enabled registered, disabled cleared).Op-deployer (Go)
op-deployer/pkg/deployer/manage/set_interop_dispute_games.goSetInteropDisputeGamesrunner,encodeZKGameArgs(5-field ZK config),SetInteropDisputeGamesCLI. Validates all address flags withIsHexAddress. Default clears onlySUPER_CANNON_KONA(9, the permissionless slot ZK replaces) and keepsSUPER_PERMISSIONED_CANNON(5) as the permissioned liveness backup.op-deployer/pkg/deployer/manage/flags.go--system-config-proxy-addresses,--source-game-types,--zk-verifier-address,--zk-max-challenge-duration,--zk-max-prove-duration) +set-interop-dispute-gamescommand.Tests
test/L1/opcm/OPContractsManagerV2.t.soltest_setInteropDisputeGames_succeeds(migrate to interop with SPDG + kona, swap to ZK, asserts SPDG kept, ZK registered + respected, kona cleared),_notDelegateCalled_reverts,_notSharedInteropSet_reverts.op-deployer/pkg/deployer/manage/set_interop_dispute_games_test.goTestEncodeZKGameArgs(encoder round-trip + validation),TestSetInteropDisputeGames(forked-Sepolia e2e: deploy with ZK impl, migrate to interop, swap, asserts the end shape on chain).Snapshots
snapshots/semver-lock.json,snapshots/abi/*setInteropDisputeGamesABI.Notes
SUPER_PERMISSIONED_CANNON(permissioned backup) +ZK_DISPUTE_GAME(permissionless, respected), mirroring today's permissioned + permissionless super shape.assertValidSuperRootDisputeGamesin theStandardValidatorto fail even though the migration will not be blocked since no on-chain validator covers the post-swap state. Executors should provide the correct configs or post-interop after all flag removals, reorder/modify those checks. Issue tacked here [SuperZKDG] RemoveZK_DISPUTE_GAMEdev feature flag and address TODOs once ZK becomes the default game post-interop #21529SPDG/SFDG→ ZK) and full game-lifecycle / finalization tests are handled in a separate test PR here test: ZK Game Integration Test Coverage and E2E SuperGame Migration Tests #21128Closes #20759