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-bedrock: move immutables to storage for L1StandardBridge #8632

Merged
merged 64 commits into from Jan 11, 2024

Conversation

@0xfuturistic 0xfuturistic requested review from a team as code owners December 14, 2023 21:05
@0xfuturistic 0xfuturistic requested review from sebastianst and clabby and removed request for a team December 14, 2023 21:05
@0xfuturistic 0xfuturistic self-assigned this Dec 14, 2023
Copy link
Contributor

coderabbitai bot commented Dec 14, 2023

Warning

Rate Limit Exceeded

@0xfuturistic has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 8 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 b100652 and 3c3e720.

Walkthrough

The changes across various files suggest a significant refactoring and potential upgrade of a blockchain-related codebase, possibly for a layer 2 solution. The version rollback in .abigenrc hints at a revert to a previous stable release. The code adjustments involve the removal of certain initializations and parameters, particularly related to bridge contracts, and the introduction of a new initialization pattern. This indicates a simplification or reorganization of contract relationships and a possible change in the bridge contract architecture.

Changes

File Path Summary
.abigenrc Reverted version number from v1.10.25 to v1.10.16.
op-chain-ops/genesis/config.go
op-chain-ops/immutables/immutables.go
op-chain-ops/immutables/immutables_test.go
Removed L2StandardBridge initialization and updated related configurations and tests.
op-chain-ops/upgrades/l1.go
op-chain-ops/cmd/check-l2/main.go
Added imports, modified L1StandardBridge function, and included additional logic for L2StandardBridge initialization status checks.
packages/contracts-bedrock/.gas-snapshot Adjusted gas costs for benchmarks in L1StandardBridge related tests.
packages/contracts-bedrock/lib/forge-std Updated subproject commit hash.
packages/contracts-bedrock/scripts/ChainAssertions.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
Modified checkL1StandardBridge for conditional checks and updated Deploy.s.sol with new import and parameters.
packages/contracts-bedrock/src/.../L1StandardBridge.sol
packages/contracts-bedrock/src/.../L2StandardBridge.sol
packages/contracts-bedrock/src/universal/StandardBridge.sol
Updated version constants, constructors, and initialization patterns. Removed and replaced certain variables and adjusted storage layout.
packages/contracts-bedrock/test/.../L1StandardBridge.t.sol
packages/contracts-bedrock/test/.../L2StandardBridge.t.sol
packages/contracts-bedrock/test/Specs.t.sol
packages/contracts-bedrock/test/universal/StandardBridge.t.sol
Added new tests, updated existing tests to align with contract changes, and modified function calls and parameters in tests.

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.
  • 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 from git 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.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (7580960) 25.73% compared to head (3c3e720) 25.64%.
Report is 1 commits behind head on feat/mcp-l1.

Additional details and impacted files
@@               Coverage Diff               @@
##           feat/mcp-l1    #8632      +/-   ##
===============================================
- Coverage        25.73%   25.64%   -0.09%     
===============================================
  Files              117      117              
  Lines             4854     4858       +4     
  Branches          1059     1059              
===============================================
- Hits              1249     1246       -3     
- Misses            3499     3508       +9     
+ Partials           106      104       -2     
Flag Coverage Δ
chain-mon-tests 27.14% <ø> (ø)
contracts-bedrock-tests 20.09% <0.00%> (-0.19%) ⬇️
contracts-ts-tests 12.25% <ø> (ø)
sdk-next-tests 42.08% <ø> (ø)
sdk-tests 42.08% <ø> (ø)

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

Files Coverage Δ
...ages/contracts-bedrock/src/L1/L1StandardBridge.sol 0.00% <0.00%> (ø)
...ages/contracts-bedrock/src/L2/L2StandardBridge.sol 0.00% <0.00%> (ø)
...contracts-bedrock/src/universal/StandardBridge.sol 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

@0xfuturistic 0xfuturistic force-pushed the ctb/L1StandardBridge-immutable branch 2 times, most recently from 4d5a4ae to 1fa196c Compare December 18, 2023 21:06
Copy link

semgrep-app bot commented Dec 18, 2023

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

  • op-batcher/compressor/compressors.go: L12-23

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

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

@0xfuturistic 0xfuturistic force-pushed the ctb/L1StandardBridge-immutable branch 2 times, most recently from 8e7b6e3 to 598f509 Compare December 20, 2023 13:51
Copy link

semgrep-app bot commented Dec 23, 2023

Semgrep found 1 writable-filesystem-service finding:

  • indexer/docker-compose.yml: L120

Service 'backend-goerli' is running with a writable root filesystem. This may allow malicious applications to download and run additional payloads, or modify container files. If an application inside a container has to save something temporarily consider using a tmpfs. Add 'read_only: true' to this service to prevent this.

Ignore this finding from writable-filesystem-service.

Semgrep found 1 no-new-privileges finding:

  • indexer/docker-compose.yml: L120

Service 'backend-goerli' allows for privilege escalation via setuid or setgid binaries. Add 'no-new-privileges:true' in 'security_opt' to prevent this.

Ignore this finding from no-new-privileges.

Semgrep found 1 deprecated-ioutil-readfile finding:

  • op-exporter/main.go: L146

ioutil.ReadFile is deprecated

Ignore this finding from deprecated-ioutil-readfile.

@0xfuturistic 0xfuturistic force-pushed the ctb/L1StandardBridge-immutable branch 2 times, most recently from a9c3afa to 157578a Compare December 24, 2023 19:35
op-chain-ops/immutables/immutables_test.go Outdated Show resolved Hide resolved
op-chain-ops/immutables/immutables.go Outdated Show resolved Hide resolved
@0xfuturistic 0xfuturistic force-pushed the ctb/L1StandardBridge-immutable branch 2 times, most recently from fd02d3c to 00dce38 Compare January 2, 2024 13:07
0xfuturistic and others added 24 commits January 11, 2024 10:03
L1 proxy is already tested for in intiailize, but L1 impl not
@tynes tynes merged commit 2f3ddc4 into feat/mcp-l1 Jan 11, 2024
63 of 64 checks passed
@tynes tynes deleted the ctb/L1StandardBridge-immutable branch January 11, 2024 17:25
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.

None yet

2 participants