Skip to content

Conversation

@ajsutton
Copy link
Contributor

Description

Starts to build out the OptimisticZK contract bindings and make challenger not require everything to look like a FaultDisputeGame. Chose to make the ZK contracts independent rather than trying to have a base class with shared code - the hierarchy of versions of FaultDisputeGame are already pretty complex and the method call implementations are generally pretty mechanical so better to keep the implementation simple at the cost of some code duplication. Especially since these methods haven't needed to change much outside of actual contract implementation changes.

There is however a hierarchy of contract interfaces so that we can have a single constructor method that creates the right bindings per game type with a generic interface returned and then can check if more specific interfaces are supported conditionally when required. That will be most useful for dispute-mon but is also used for the claim count value in list-games which doesn't apply to ZK games.

A new game type is introduced for optimistic ZK games, but a corresponding trace type doesn't exist yet - that can follow when actually supporting challenging the games. For now we just need to be able to handle the game type so we can fetch the metadata for list-games.

Tests

Added unit tests for the new bindings.

Metadata

fixes #18392

@ajsutton ajsutton marked this pull request as ready for review November 27, 2025 02:40
@ajsutton ajsutton requested review from a team as code owners November 27, 2025 02:40
@ajsutton ajsutton requested review from mbaxter and mds1 November 27, 2025 02:40
Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

Good foundations.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.07%. Comparing base (f90808d) to head (1f104e2).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #18393      +/-   ##
===========================================
+ Coverage    75.60%   80.07%   +4.47%     
===========================================
  Files          187      132      -55     
  Lines        11199     7168    -4031     
===========================================
- Hits          8467     5740    -2727     
+ Misses        2586     1428    -1158     
+ Partials       146        0     -146     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 80.07% <ø> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 56 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maurelian maurelian enabled auto-merge November 27, 2025 21:02
@maurelian maurelian added this pull request to the merge queue Nov 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 27, 2025
@ajsutton ajsutton added this pull request to the merge queue Nov 27, 2025
… games.

Starts to build out the OptimisticZK contract bindings and make challenger not require everything to look like a FaultDisputeGame.
@ajsutton ajsutton removed this pull request from the merge queue due to a manual request Nov 27, 2025
@ajsutton ajsutton force-pushed the aj/optimistic-zk-list-games branch from 77ff50a to 1f104e2 Compare November 27, 2025 21:30
@ajsutton ajsutton enabled auto-merge November 27, 2025 21:30
@ajsutton ajsutton added this pull request to the merge queue Nov 27, 2025
Merged via the queue into develop with commit ec2875f Nov 27, 2025
133 checks passed
@ajsutton ajsutton deleted the aj/optimistic-zk-list-games branch November 27, 2025 22:06
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.

op-challenger: Support optimistic zk games in list-games.

4 participants