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

op-node: remove dependency on bindings #10213

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Apr 18, 2024

Description

Removes the op-node dependency on the op-bindings/bindings
package. This moves op-node into a world where it relies
completely on bindings that it generates itself. A make recipe
could be useful for this in the future. This will enable us to say
that the op-node is compatible with particular releases of the
contracts.

This change was made by searching for
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
in the codebase and replacing it.

There is still a dependency on op-bindings/predeploys, maybe
we want to keep that around or put them in a different package.

Removes the `op-node` dependency on the `op-bindings/bindings`
package. This moves `op-node` into a world where it relies
completely on bindings that it generates itself. A `make` recipe
could be useful for this in the future. This will enable us to say
that the `op-node` is compatible with particular releases of the
contracts.

This change was made by searching for
`"github.com/ethereum-optimism/optimism/op-bindings/bindings"`
in the codebase and replacing it.

There is still a dependency on `op-bindings/predeploys`, maybe
we want to keep that around or put them in a different package.
Copy link
Contributor

coderabbitai bot commented Apr 18, 2024

Warning

Rate Limit Exceeded

@tynes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 17 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 0a7ec7e and 955d33c.

Walkthrough

The recent updates focus on integrating new Ethereum contract bindings and refining import paths across various files in the op-node package. These changes introduce new functionalities for interacting with Ethereum contracts, enhancing the handling and organization of contract-related operations. The goal is to streamline interactions with the blockchain and improve the overall robustness of the codebase.

Changes

Files Change Summary
.../bindings/l1block.go
.../bindings/l2tol1messagepasser.go
Introduced new files with bindings for Ethereum contracts L1Block and L2ToL1MessagePasser, providing deployment and interaction functionalities.
.../rollup/derive/fuzz_parsers_test.go Refactored binding imports, updated contract initialization, and improved error handling.
.../rollup/output_root.go
.../withdrawals/utils.go
.../withdrawals/utils_test.go
Updated import paths for the bindings package to align with the new locations within the op-node package.
.../e2eutils/wait/withdrawals.go Reorganized import statements for bindings to reflect changes in project structure.
.../contracts-bedrock/scripts/go-ffi/utils.go Updated import path for a package, replacing op-bindings/bindings with op-node/bindings.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

op-node/bindings/disputegamefactory.go Show resolved Hide resolved
op-node/bindings/l2outputoracle.go Show resolved Hide resolved
@tynes tynes requested a review from a team as a code owner April 18, 2024 22:44
@tynes tynes requested a review from refcell April 18, 2024 22:44
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.22%. Comparing base (6837780) to head (955d33c).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #10213       +/-   ##
============================================
- Coverage    42.40%   29.22%   -13.18%     
============================================
  Files           73       31       -42     
  Lines         4830     2898     -1932     
  Branches       766      614      -152     
============================================
- Hits          2048      847     -1201     
+ Misses        2676     1976      -700     
+ Partials       106       75       -31     
Flag Coverage Δ
cannon-go-tests ?
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests ?
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests ?
sdk-tests 40.27% <ø> (ø)

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

see 42 files with indirect coverage changes

@tynes tynes requested a review from a team as a code owner April 18, 2024 23:18
@tynes tynes enabled auto-merge April 19, 2024 00:13
@tynes tynes added this pull request to the merge queue Apr 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 19, 2024
@tynes tynes added this pull request to the merge queue Apr 19, 2024
Merged via the queue into develop with commit 4a3d3fb Apr 19, 2024
75 checks passed
@tynes tynes deleted the feat/op-node-bindings-replace branch April 19, 2024 01:27
tynes added a commit that referenced this pull request Apr 19, 2024
Removes the `op-challenger` from requiring the global bindings.
This allows the service to be explicit about contract versions
that it supports. The `op-bindings` were not versioned and
added a lot of pain when it came to smart contract development
as they needed to always be updated.

Follows:
- #10213
- #10218
tynes added a commit that referenced this pull request Apr 19, 2024
Removes the dependency on the `op-bindings/bindings` package.
This is to improve devex in the monorepo and reduce CI time
as maintaining the bindings autogenerated in each PR just
doesn't scale. Now each service is responsible for their own
bindings. In the future, we can work towards releases of
the bindings when contracts are released.

Follows:
- #10213
- #10218
- #10221
@tynes tynes mentioned this pull request Apr 19, 2024
tynes added a commit that referenced this pull request Apr 23, 2024
Removes the dependency on the `op-bindings/bindings` package.
This is to improve devex in the monorepo and reduce CI time
as maintaining the bindings autogenerated in each PR just
doesn't scale. Now each service is responsible for their own
bindings. In the future, we can work towards releases of
the bindings when contracts are released.

Follows:
- #10213
- #10218
- #10221
github-merge-queue bot pushed a commit that referenced this pull request Apr 23, 2024
* indexer: remove bindings

Removes the dependency on the `op-bindings/bindings` package.
This is to improve devex in the monorepo and reduce CI time
as maintaining the bindings autogenerated in each PR just
doesn't scale. Now each service is responsible for their own
bindings. In the future, we can work towards releases of
the bindings when contracts are released.

Follows:
- #10213
- #10218
- #10221

* indexer: add missing binding
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