Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(op-challenger): support ZKDisputeGame #260

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

welkin22
Copy link
Contributor

Description

Modify op-challenger to support the ZKDisputeGame type. The op-challenger will monitor the ZKDisputeGame created by the on-chain factory contract and verify its legitimacy. If the claim made by the game is illegal, it will initiate a challenge. At the same time, it will also respond to malicious challenges.

Rationale

The op-challenger will interact with the zk proof generation program coded in Rust and use the zk proof to perform some actions. (The part interacting with the Rust program is not yet completed and is currently mocked.)

Example

Based on the existing startup flags, this PR adds the following flags:
--zk-dispute-game: Indicates that the zk-dispute-game type is enabled on the current chain for op-challenger
--zk-challenge-by-proof: Indicates that op-challenger should initiate challenges using zk proof
--zk-response-challenge-by-proof: Indicates that op-challenger should respond to malicious challenges
--zk-response-challenge-claimants: If this flag is set, op-challenger will only respond to malicious challenges for the address specified by the flag.

When enabling --zk-dispute-game, you should also set --trace-type=zk to ensure the program runs correctly.

Changes

Notable changes:

  • Added logic to handle zkDisputeGame

@welkin22 welkin22 marked this pull request as draft January 26, 2025 06:30
@github-actions github-actions bot requested review from bnoieh and krish-nr January 26, 2025 06:30
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.

1 participant