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 L1CrossDomainMessenger #8631

Merged
merged 76 commits into from Jan 11, 2024

Conversation

@0xfuturistic 0xfuturistic self-assigned this Dec 14, 2023
@0xfuturistic 0xfuturistic requested review from a team as code owners December 14, 2023 21:04
@0xfuturistic 0xfuturistic requested review from trianglesphere and Inphi and removed request for a team December 14, 2023 21:04
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 15 minutes and 35 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 050eb0a and 670f534.

Walkthrough

The overall changes suggest a significant update to the Ethereum Optimism codebase, focusing on cross-domain messaging and synchronization logic. The updates include modifications to the Cross-Domain Messenger contracts across both L1 and L2, a change in gas benchmarks, refactoring of profiling and metrics services, and the removal of sync target logic. The versioning adjustments and the addition of new flags and configurations indicate a move towards a more flexible and potentially more performant system.

Changes

File Pattern Summary of Changes
.abigenrc Version number downgraded from v1.10.25 to v1.10.16.
op-chain-ops/.../config.go, op-chain-ops/immutables/..., op-chain-ops/upgrades/l1.go Updated cross-domain messaging configurations and structures, including the addition of new fields and parameters.
packages/contracts-bedrock/... Adjusted gas benchmarks, refactored deployment scripts, and updated contract logic for L1CrossDomainMessenger and L2CrossDomainMessenger.
packages/contracts-bedrock/test/... Added new tests for initialization values and re-initialization checks for proxy and implementation contracts.
.../config.yml, .gitmodules, CONTRIBUTING.md Updated CI configuration, added new submodules, and modified contribution guidelines URL.
op-batcher/..., op-challenger/..., op-conductor/..., op-heartbeat/..., op-node/..., op-proposer/... Changed import paths for oppprof package and refactored profiling and metrics services across various components.
op-node/rollup/derive/... Removed EngineSyncTarget logic, updated synchronization and payload handling methods.
op-service/eth/sync_status.go, op-service/flags/custom.go Removed EngineSyncTarget field and updated related synchronization logic.

Note: The file paths have been shortened with ellipsis (...) to group similar changes and save space.

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.

packages/contracts-bedrock/scripts/Deploy.s.sol Outdated Show resolved Hide resolved
packages/contracts-bedrock/test/Authorization.t.sol Outdated Show resolved Hide resolved
packages/contracts-bedrock/scripts/Deploy.s.sol Outdated Show resolved Hide resolved
packages/contracts-bedrock/scripts/Deploy.s.sol Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (954bcf2) 25.69% compared to head (670f534) 25.72%.
Report is 126 commits behind head on feat/mcp-l1.

Additional details and impacted files
@@               Coverage Diff               @@
##           feat/mcp-l1    #8631      +/-   ##
===============================================
+ Coverage        25.69%   25.72%   +0.03%     
===============================================
  Files              119      117       -2     
  Lines             4889     4844      -45     
  Branches          1063     1057       -6     
===============================================
- Hits              1256     1246      -10     
+ Misses            3527     3494      -33     
+ Partials           106      104       -2     
Flag Coverage Δ
chain-mon-tests 27.14% <ø> (ø)
contracts-bedrock-tests 20.23% <ø> (-0.01%) ⬇️
contracts-ts-tests 12.25% <ø> (ø)
sdk-next-tests 42.08% <ø> (-0.11%) ⬇️
sdk-tests 42.08% <ø> (-0.11%) ⬇️

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

Files Coverage Δ
...ontracts-bedrock/src/L1/L1CrossDomainMessenger.sol 0.00% <ø> (ø)
...ckages/contracts-bedrock/src/L1/OptimismPortal.sol 0.00% <ø> (ø)
...ckages/contracts-bedrock/src/L2/GasPriceOracle.sol 0.00% <ø> (ø)
packages/contracts-bedrock/src/L2/L1Block.sol 80.00% <ø> (-8.89%) ⬇️
...ontracts-bedrock/src/L2/L2CrossDomainMessenger.sol 0.00% <ø> (ø)
...ntracts-bedrock/src/dispute/DisputeGameFactory.sol 0.00% <ø> (ø)
...contracts-bedrock/src/dispute/FaultDisputeGame.sol 0.00% <ø> (ø)
.../contracts-bedrock/src/dispute/lib/LibPosition.sol 0.00% <ø> (ø)
...kages/contracts-bedrock/src/dispute/lib/LibUDT.sol 0.00% <ø> (ø)

... and 6 files with indirect coverage changes

@Inphi
Copy link
Contributor

Inphi commented Dec 15, 2023

You should run pnpm pre-pr in contracts/bedrock to fix the contract-bedrock-checks build.

@0xfuturistic 0xfuturistic force-pushed the ctb/L1CrossDomainMessenger-immutable branch 2 times, most recently from cfcd4bd to e6d8872 Compare December 18, 2023 15:08
@0xfuturistic 0xfuturistic force-pushed the ctb/L1CrossDomainMessenger-immutable branch from 76d20a1 to cab3bc6 Compare December 18, 2023 19:30
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/L1CrossDomainMessenger-immutable branch from cab3bc6 to e819800 Compare December 18, 2023 19:55
@0xfuturistic 0xfuturistic force-pushed the ctb/L1CrossDomainMessenger-immutable branch 2 times, most recently from a59caba to 9d5f0d5 Compare December 20, 2023 13:37
op-chain-ops/upgrades/l1.go Outdated Show resolved Hide resolved
op-chain-ops/immutables/immutables_test.go Show resolved Hide resolved
op-chain-ops/immutables/immutables.go Show resolved Hide resolved
packages/contracts-bedrock/scripts/ChainAssertions.sol Outdated Show resolved Hide resolved
packages/contracts-bedrock/scripts/ChainAssertions.sol Outdated Show resolved Hide resolved
@0xfuturistic 0xfuturistic force-pushed the ctb/L1CrossDomainMessenger-immutable branch from d153a41 to 2e11da8 Compare January 10, 2024 16:33
@0xfuturistic 0xfuturistic force-pushed the ctb/L1CrossDomainMessenger-immutable branch from 2e11da8 to d0ca276 Compare January 10, 2024 16:41
op-chain-ops/upgrades/l1.go Outdated Show resolved Hide resolved
op-chain-ops/upgrades/l1.go Outdated Show resolved Hide resolved
@tynes
Copy link
Contributor

tynes commented Jan 10, 2024

Good after https://github.com/ethereum-optimism/optimism/pull/8631/files#r1448073415 is addressed

@tynes tynes merged commit aa65b0d into feat/mcp-l1 Jan 11, 2024
64 checks passed
@tynes tynes deleted the ctb/L1CrossDomainMessenger-immutable branch January 11, 2024 00:49
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

3 participants