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

contracts: More robust abi/storage snapshot gen #9950

Merged
merged 15 commits into from
Mar 29, 2024
Merged

contracts: More robust abi/storage snapshot gen #9950

merged 15 commits into from
Mar 29, 2024

Conversation

Inphi
Copy link
Contributor

@Inphi Inphi commented Mar 22, 2024

Updates the generate-snapshot.ts script to be compatible with the latest forge artifact schema.

Note that the deleted snapshots referred to contracts that no longer exist.

Tested on foundry @ c2233ec9fe61e0920c61c6d779bc707252852037

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.67%. Comparing base (16bf845) to head (95fcfb2).
Report is 25 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #9950       +/-   ##
============================================
+ Coverage    28.34%   42.67%   +14.33%     
============================================
  Files          165       73       -92     
  Lines         7271     4794     -2477     
  Branches      1330      755      -575     
============================================
- Hits          2061     2046       -15     
+ Misses        5104     2642     -2462     
  Partials       106      106               
Flag Coverage Δ
cannon-go-tests 82.29% <ø> (ø)
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests 26.72% <ø> (ø)
contracts-bedrock-tests ?
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-next-tests 41.03% <ø> (ø)
sdk-tests 41.03% <ø> (ø)

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

see 92 files with indirect coverage changes

@Inphi Inphi marked this pull request as ready for review March 22, 2024 07:03
@Inphi Inphi requested a review from a team as a code owner March 22, 2024 07:03
@Inphi Inphi requested a review from clabby March 22, 2024 07:03
Copy link
Contributor

coderabbitai bot commented Mar 22, 2024

Walkthrough

Walkthrough

The updates encompass significant changes to the generate-snapshots.ts script, enhancing the handling of contract artifacts by modifying data structures and refining conditions for processing. Additionally, the CI/CD pipeline configuration has been updated, including the default builder image version, as well as the versions of Geth and NVM installed, ensuring the build environment remains current with the latest tool versions.

Changes

Files Change Summary
.../autogen/generate-snapshots.ts Updated ForgeArtifact type, modified storageLayout, improved library/abstract contract checks, added artifact.ast presence check.
.circleci/config.yml Updated ci_builder_image version to v0.46.1, Geth to 1.13.14, and NVM to v0.39.7.

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-tests 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 tests 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 tests.
    • @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.
  • 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

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@Inphi Inphi requested a review from a team as a code owner March 22, 2024 17:31
@sebastianst
Copy link
Member

Sorry I accidentally merged #9896 into this one, after stacking. Only review of @Inphi's changes necessary.

@Inphi Inphi enabled auto-merge March 22, 2024 17:57
@Inphi Inphi requested a review from mds1 March 27, 2024 17:18
.circleci/config.yml Outdated Show resolved Hide resolved
Copy link
Contributor

semgrep-app bot commented Mar 29, 2024

Semgrep found 1 iterate-over-empty-map finding:

Iteration over a possibly empty map Kinds. This is likely a bug or redundant code

Ignore this finding from iterate-over-empty-map.

@Inphi Inphi added this pull request to the merge queue Mar 29, 2024
Merged via the queue into develop with commit b5c9af4 Mar 29, 2024
71 of 73 checks passed
@Inphi Inphi deleted the inphi/cov branch March 29, 2024 18:11
mds1 added a commit that referenced this pull request Apr 4, 2024
Since #9950 kontrol tests have been consistently failing. There are a few theories as to why, but to fix tests in the meantime we will downgrade the version. 

It's possible this causes "llegal instruction" panics in some devnet tests, so let's try this, and incrementally increase the foundry version until we find a version that works for both until we properly debug the issues.
0xfuturistic pushed a commit that referenced this pull request Apr 24, 2024
* contracts: More robust abi/storage snapshot gen

* update geth version used by ci

* ci: bump ci-builder rc

* ci-builder: pin foundry commit, update nvm

* ci: remove foundry commit pin, update foundry in versions.json

* ci: bump ci-builder to v0.46.0-rc.4

* update Kontrol snapshots

* set ast=true in foundry.toml; revert snapshot gen

* replace Clone snapshots

* enable --ast only during snapshots

* reset snapshot directories

* Update .circleci/config.yml to use ci-builder:v0.46.0

* update foundry to nightly-617dfc28cb8206a0003edcf73a6f1058adaef740

* ci: bump ci-builder to v0.46.1

---------

Co-authored-by: Roberto Bayardo <roberto.bayardo@coinbase.com>
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
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.

5 participants