Skip to content

feat: op deployer zk mock verifier#21571

Open
ashitakah wants to merge 13 commits into
ethereum-optimism:developfrom
defi-wonderland:feat/op-deployer-zk-mock-verifier
Open

feat: op deployer zk mock verifier#21571
ashitakah wants to merge 13 commits into
ethereum-optimism:developfrom
defi-wonderland:feat/op-deployer-zk-mock-verifier

Conversation

@ashitakah

@ashitakah ashitakah commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

ZKMockVerifier is a no-op verifier that accepts any proof.

Previously, it was only deployed by bespoke code inside the devstack (add_game_type.go), which read the artifact from disk and sent a hand-built transaction. op-deployer itself had no way to deploy it.

This moves that deploy into op-deployer as a reusable capability. This is needed to spin up a devnet for e2e testing of the ZK dispute game without a real prover.

Changes

  • Add deployer.DeployZKMockVerifier(ctx, client, key, artifactsFS).

    • Reads the ZKMockVerifier bytecode from the artifacts FS.
    • Deploys it on L1.
    • Returns the deployed address.
  • Refactor op-devstack/sysgo/add_game_type.go to call the helper instead of the manual FindMonorepoRoot + ReadArtifact + txplan block.

    • Move the artifacts download up so the same FS is reused for both the deploy and the upgrade.

Notes

  • Dev/devnet only.

    • The mock lives in test/, so it is absent from released artifacts and cannot be deployed in a prod run.
    • It only resolves against a local full contracts build, which is the devnet/e2e setting it targets.
  • The OPCM upgrade flow only emits calldata; it does not send transactions.

    • The mock is deployed as its own L1 transaction before the upgrade.
    • The caller orchestrates both steps: deploy mock, then submit the upgrade, same as before.

@ashitakah ashitakah marked this pull request as ready for review June 25, 2026 17:39
@ashitakah ashitakah requested review from a team as code owners June 25, 2026 17:39
@ashitakah

Copy link
Copy Markdown
Contributor Author

/ci authorize f2af8ed

@ashitakah ashitakah requested review from a team and 0xOneTony and removed request for a team June 25, 2026 17:43
af := &foundry.ArtifactsFS{FS: afacts}
artifact, err := af.ReadArtifact(zkMockVerifierArtifact, zkMockVerifierContract)
require.NoError(t, err)
require.NotEmpty(t, artifact.Bytecode.Object, "ZKMockVerifier must have bytecode in local artifacts")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this exist in CI?

@0xarktos

0xarktos commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/ci authorize c2c0311

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.

3 participants