Conversation
|
/ci authorize 3ad0694 |
ajsutton
left a comment
There was a problem hiding this comment.
Looks good generally. It looks like we have added support for ZK to op-devstack but don't have any tests that actually enable it. Would be good to add one so that we actually exercise the op-deployer code in a real situation rather than just unit tests.
Auto-enabling the dev feature also seems a bit dangerous so likely should just depend on the user doing that explicitly.
| // Auto-enable ZKDisputeGameFlag if any chain has a ZK dispute game in AdditionalDisputeGames. | ||
| outer: | ||
| for _, chain := range intent.Chains { | ||
| for _, game := range chain.AdditionalDisputeGames { | ||
| if game.VMType == state.VMTypeZK { | ||
| proofParams.DevFeatureBitmap = devfeatures.EnableDevFeature(proofParams.DevFeatureBitmap, devfeatures.ZKDisputeGameFlag) | ||
| break outer | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Do we do this auto-enablement of dev features anywhere else? It seems dangerous and we should just have the caller explicitly enable the dev feature.
There was a problem hiding this comment.
I think you're right, and if it could be risky, I'll correct it.
New tests are added |
|
/ci authorize d95d853 |
Changed
upgrade.go
Added support for
GameTypeZKDisputeGame(type 10), including theZKDisputeGameConfigstruct and ABI encoding required for the OPCM V2 upgrade flow.add_game_type.go
Hooked
ZKDisputeGameTypeinto the game type registry for devstack environments.chain_intent.go
Introduced
ZKDisputeGameParamsand an optionalZKDisputeGamefield onAdditionalDisputeGame.Added validation in
Check()to reject any ZK game entry with:VerifieraddressAbsolutePrestateThis prevents silently broken game deployments.
devfeatures.go
Added
ZKDisputeGameDevFlag.The flag is automatically OR-ed into the
DevFeatureBitmapinpipeline/implementations.gowhenever any chain intent includes anAdditionalDisputeGamewithVMType == VMTypeZK.This ensures
ZkDisputeGameImplis deployed without manual bitmap configuration.pipeline/implementations.go
Auto-enables
ZKDisputeGameDevFlagwhen a ZK game is present in any chain’sAdditionalDisputeGames, then forwards it toDeployImplementations.DeployImplementations.s.sol / VerifyOPCM.s.sol
zkDisputeGameImplthrough the deploy scriptImplementationsstruct.validatorGetterChecksto ensure it is verified against the container during deployment.Remaining files
Added plumbing to read and persist
zkDisputeGameImplfromReadImplementationAddressesinto state.Why the initial deployment files weren't touched
DeployOPChain.s.solintentionally registers the ZK game slot withenabled: false.