Skip to content

challenger: Switch output_cannon to use the new contract type.#8379

Merged
refcell merged 7 commits intodevelopfrom
aj/output-cannon-new-contract
Dec 2, 2023
Merged

challenger: Switch output_cannon to use the new contract type.#8379
refcell merged 7 commits intodevelopfrom
aj/output-cannon-new-contract

Conversation

@ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Dec 1, 2023

Description

Switches the output_cannon trace type to use game type 253 and the new OutputBisectionGame contract. Enhanced the e2e test for it a little to check it progresses into the cannon trace. The e2e is still a fairly basic sanity check - we'll review and update e2e tests further in https://github.com/ethereum-optimism/client-pod/issues/262

Also we can now support cannon and output_cannon games in the same instance.

Tests

Updated e2e tests.

Metadata

@ajsutton ajsutton requested a review from a team as a code owner December 1, 2023 00:05
@ajsutton ajsutton requested a review from tynes December 1, 2023 00:05
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2023

Note

Reviews Paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Walkthrough

The changes involve a significant update to the game types and contract interactions within an application, likely related to blockchain or a similar distributed ledger technology. The error for conflicting trace types has been removed, indicating a change in the application's logic to allow simultaneous use of TraceTypeCannon and TraceTypeOutputCannon. The outputCannonGameType has been updated to a unique value, and there's a shift from a FaultDisputeGameContract to an OutputBisectionGameContract, suggesting a change in the game mechanics or dispute resolution process. Test cases and utilities have been updated to reflect these changes.

Changes

File Path Change Summary
op-challenger/config/config.go
op-challenger/config/config_test.go
Removed ErrCannonAndOutputCannonConflict error. Removed a test function; modified another to include new trace types and validation steps.
op-challenger/game/fault/register.go Changed outputCannonGameType value; updated contract creation and methods for block range information.
op-e2e/e2eutils/disputegame/... Removed constants, types, and interfaces; added imports; modified constants and functions; updated struct fields and methods.
op-e2e/faultproofs/output_cannon_test.go Removed and added variables; updated loop conditions and function calls.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@ajsutton ajsutton requested a review from refcell December 1, 2023 00:05
@codecov
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Merging #8379 (a51785e) into develop (918459c) will increase coverage by 23.39%.
Report is 36 commits behind head on develop.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8379       +/-   ##
============================================
+ Coverage    40.09%   63.48%   +23.39%     
============================================
  Files          164       16      -148     
  Lines         6175     1427     -4748     
  Branches      1002        0     -1002     
============================================
- Hits          2476      906     -1570     
+ Misses        3623      475     -3148     
+ Partials        76       46       -30     
Flag Coverage Δ
cannon-go-tests 63.48% <ø> (ø)
chain-mon-tests ?
common-ts-tests ?
contracts-bedrock-tests ?
contracts-ts-tests ?
core-utils-tests ?
sdk-next-tests ?
sdk-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 148 files with indirect coverage changes

@ajsutton
Copy link
Contributor Author

ajsutton commented Dec 1, 2023

@coderabbitai pause

Go home, you're drunk.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2023

This is an invalid command. Please refer to the list of valid keywords below.

CodeRabbit Commands
  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

@ajsutton
Copy link
Contributor Author

ajsutton commented Dec 1, 2023

@coderabbitai pause

@CodeRabbitSupport
Copy link

@ajsutton We are researching this and will suppress this noise.

@ajsutton ajsutton force-pushed the aj/output-cannon-new-contract branch from 8137dee to 34f512a Compare December 1, 2023 01:11
@ajsutton ajsutton force-pushed the aj/output-cannon-new-contract branch from 34f512a to 72956da Compare December 1, 2023 01:55
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Small comments, otherwise looks good to me

@refcell refcell enabled auto-merge December 1, 2023 20:21
@refcell refcell added this pull request to the merge queue Dec 1, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 1, 2023
@refcell refcell added this pull request to the merge queue Dec 2, 2023
Merged via the queue into develop with commit d61af8a Dec 2, 2023
@refcell refcell deleted the aj/output-cannon-new-contract branch December 2, 2023 00:32
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