feat(interop): superchain backend
This contains the start of the backend for superchain interopability.
This backend exposes a single endpoint superchain_messageSafety that
will verify that the message identifier matches the supplied payload and
returns the safety label relative to it's dependencies. As a start,
we only support the Finalized label to enable tx mempool validation
and block building in op-geth
Closes ethereum-optimism/protocol-quest#158
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @hamdiallam and the rest of your teammates on
Graphite
Is there a doc someplace that describes this service?
Is there a doc someplace that describes this service?
No their isn't atm. Mainly jotting down references/plan in the tickets to get an e2e flow working & gather some feedback then will polish everything up.
Semgrep found 4 sol-style-return-arg-fmt findings:
Named return arguments to functions must be appended with an underscore (_)
Semgrep found 8 golang_fmt_errorf_no_params findings:
- op-superchain/backend.go: L127, L124, L121, L118, L113
- op-service/solabi/util.go: L88
- op-program/host/l2_client.go: L46
- op-chain-ops/cmd/check-ecotone/main.go: L647
No fmt.Errorf invocations without fmt arguments allowed
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 16.05%. Comparing base (
90c717a) to head (873b0e5). Report is 192 commits behind head on feat/interop.
:exclamation: Current head 873b0e5 differs from pull request most recent head 527db49. Consider uploading reports for the commit 527db49 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## feat/interop #9612 +/- ##
=============================================
Coverage 16.04% 16.05%
=============================================
Files 123 123
Lines 5354 5358 +4
Branches 1184 1185 +1
=============================================
+ Hits 859 860 +1
- Misses 4420 4423 +3
Partials 75 75
| Flag | Coverage Δ | |
|---|---|---|
| chain-mon-tests | 27.14% <ø> (ø) |
|
| contracts-bedrock-tests | 0.60% <ø> (-0.01%) |
:arrow_down: |
| contracts-ts-tests | 12.25% <ø> (ø) |
|
| sdk-next-tests | 41.03% <ø> (+0.03%) |
:arrow_up: |
| sdk-tests | 41.03% <ø> (+0.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Semgrep found 6 golang_fmt_errorf_no_params findings:
- op-node/rollup/derive/l1_block_info.go
No fmt.Errorf invocations without fmt arguments allowed
Semgrep found 1 iterate-over-empty-map finding:
Iteration over a possibly empty map Kinds. This is likely a bug or redundant code
Walkthrough
Walkthrough
The recent updates aim to enhance interoperability and upgrade mechanisms within the Optimism network, focusing on the rollup node and contract layers. These improvements include introducing fuzz testing for Interop round-trips, utilizing direct bytecode comparisons for L1 block deployments, implementing Interop-specific binary data handling, and introducing a new superchain package for enhanced blockchain message safety. Additionally, an RPC server is introduced for improved service management.
Changes
| Files | Change Summary |
|---|---|
op-node/Makefile |
Added fuzz test for FuzzL1InfoInteropRoundTrip. |
op-node/.../ecotone_upgrade_transactions_test.go |
Replaced op-bindings/bindings with bytecode comparisons. |
op-node/.../fuzz_parsers_test.go, op-node/.../l1_block_info.go, op-node/.../l1_block_info_test.go, packages/.../differential-testing.go, packages/.../L1Block.sol, packages/.../Encoding.sol, packages/.../L1Block.t.sol, packages/.../Encoding.t.sol, packages/.../FFIInterface.sol |
Added Interop upgrade functionality and tests. |
op-node/.../types.go, op-service/rpc/service.go, op-service/solabi/util.go, op-superchain/... (all files in op-superchain directory) |
Introduced superchain package, RPC server management, and utility functions. |
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?
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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto 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.yamlfile 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/coderabbit-overrides.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.