Skip to content

contracts-bedrock: remove cannon deps on bindings#10280

Merged
tynes merged 5 commits intodevelopfrom
feat/cannon-remove-deps
Apr 24, 2024
Merged

contracts-bedrock: remove cannon deps on bindings#10280
tynes merged 5 commits intodevelopfrom
feat/cannon-remove-deps

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Apr 24, 2024

Description

Removes cannon deps on op-bindings package following
a pattern similar to #10225.
Includes test coverage of the new functions and is the minimal diff to
get things working.

Ideally there was a canonical forge artifact type that is used but for
now we don't worry about it. This unblocks further work on removing the
bindings from the monorepo, greatly improving devex.

Removes `cannon` deps on `op-bindings` package following
a pattern similar to #10225.
Includes test coverage of the new functions and is the minimal diff to
get things working.

Ideally there was a canonical forge artifact type that is used but for
now we don't worry about it. This unblocks further work on removing the
bindings from the monorepo, greatly improving devex.
@tynes tynes requested review from a team as code owners April 24, 2024 00:14
@tynes tynes requested review from mds1 and sebastianst April 24, 2024 00:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 24, 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 41 minutes and 21 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 cf72ee1 and a4e94f8.

Walkthrough

The changes across the codebase streamline contract loading processes and enhance workflow efficiency. The update in evm.go introduces contract loading from JSON files, offering a more flexible approach for managing contract data. Additionally, the adjustments in .circleci/config.yml optimize job configurations by introducing new parameters and dependencies, enhancing the overall CI/CD pipeline.

Changes

File Path Change Summary
cannon/mipsevm/.../evm.go Enhanced contract loading by loading MIPS and Oracle contracts from JSON files, updating the Contract struct, and refactoring contract loading logic.
.circleci/config.yml - Added uses_artifacts boolean parameter and optimized job configurations.
- Updated workflows and job dependencies for improved CI/CD pipeline efficiency.

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: 0

Out of diff range and nitpick comments (2)
cannon/mipsevm/evm.go (2)

24-33: Consider using configuration or environment variables for JSON file paths to enhance portability and flexibility.


40-51: Consider adding logging at key steps to improve traceability and debugging, especially useful in production environments.

@tynes
Copy link
Contributor Author

tynes commented Apr 24, 2024

cannon fuzz + cannon go lint need to wait for contracts build now

@tynes tynes requested a review from a team as a code owner April 24, 2024 01:14
@codecov
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 42.33%. Comparing base (1667124) to head (a4e94f8).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10280      +/-   ##
===========================================
- Coverage    42.40%   42.33%   -0.07%     
===========================================
  Files           73       73              
  Lines         4830     4845      +15     
  Branches       766      766              
===========================================
+ Hits          2048     2051       +3     
- Misses        2676     2684       +8     
- Partials       106      110       +4     
Flag Coverage Δ
cannon-go-tests 81.43% <42.85%> (-0.86%) ⬇️
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests 26.72% <ø> (ø)
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-tests 40.27% <ø> (ø)

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

Files Coverage Δ
cannon/mipsevm/evm.go 80.24% <42.85%> (-13.70%) ⬇️

@tynes tynes added this pull request to the merge queue Apr 24, 2024
Merged via the queue into develop with commit 9ca3362 Apr 24, 2024
@tynes tynes deleted the feat/cannon-remove-deps branch April 24, 2024 03:09
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.

2 participants