-
Notifications
You must be signed in to change notification settings - Fork 267
Create op-supervisor.mdx #1044
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
Merged
Merged
Create op-supervisor.mdx #1044
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a14b617
Create op-supervisor.mdx
cpengilly eb0e74e
feedback addresssed
cpengilly 7b9abd9
Merge branch 'main' into op-supervisor
cpengilly e3c0a06
Update op-supervisor.mdx
cpengilly afb3125
updates
cpengilly fdb6866
fix internal link
cpengilly 337f95e
Apply suggestions from code review
cpengilly b4abe13
Merge branch 'main' into op-supervisor
cpengilly a3767d5
add expected audience
cpengilly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: OP Supervisor | ||
lang: en-US | ||
description: Learn the basics of OP-Supervisor. | ||
--- | ||
|
||
import { Callout, Tabs, Steps } from 'nextra/components' | ||
|
||
# OP Supervisor | ||
|
||
<Callout> | ||
Interop is currently in active development and not yet ready for production use. The information provided here may change. Check back regularly for the most up-to-date information. | ||
</Callout> | ||
|
||
OP Supervisor is a critical service designed to verify cross-chain messages and manage the safety of interoperability between different chains in the OP Stack. It acts as a hub for indexing data that every `op-node` needs to cross-verify with other chains. | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Some features and benefits include: | ||
|
||
* Enables secure cross-chain message passing on the Superchain | ||
* Provides a centralized point for managing interoperability data | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Supports multiple networks simultaneously | ||
* Offers potential for public endpoints to aid in node synchronization | ||
|
||
## Cross-chain message verification | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Verifies messages between different chains in the OP Stack, reducing the risk of invalid or malicious cross-chain interactions. It centralizes the verification process, which reduces the complexity of operating individual nodes. | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* `op-geth`: queries `op-supervisor` during block-building to verify if a message is sufficiently safe to include. This process involves checking each executing message and potentially undoing transactions if conflicts or unknown states are encountered. `op-geth` also queries `op-supervisor` when taking new items into the mempool as an [early filter mechanism](https://github.com/ethereum-optimism/op-geth/pull/422). | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* `op-node`: queries cross-chain safety information and coordinates safety updates between OP stack nodes and `op-supervisor`. It uses the API provided by `op-supervisor` to perform actions like: | ||
* Updating and retrieving various safety levels | ||
* Checking and returning the `cross-unsafe` head for a given chain | ||
* Attempting to promote a block to `cross-safe` status | ||
* Attempting to finalize an L2 block based on L1 finality | ||
|
||
## Log data indexing and management | ||
|
||
Acts as a hub for indexing data that every `op-node` needs to cross-verify with other chains, centralizing the process of managing interoperability data. Maintains the integrity of cross-chain interactions by tracking safety changes across the Superchain, ensuring consistent application of invalid dependency resolutions. | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
`op-supervisor` indexes two types of cross-chain dependencies: | ||
|
||
* Interop messages (events): `op-supervisor` maintains an events-index per L2 chain, which determines message-dependencies to check if blocks are safe | ||
* L1 DA (data availability): `op-supervisor` tracks the L1 DA for L2 blocks and maintains a DA safety-index per L2 chain, which helps determine how to rewind L2 chains to resolve invalid dependencies | ||
|
||
## API for cross-chain safety | ||
|
||
Provides an interface for `op-node` to query cross-chain safety information and coordinate safety updates between OP stack nodes and `op-supervisor`. OP-Supervisor uses a global read API to determine **message safety** and **block safety,** utilizing both the events index and the safety index (See op-supervisor's [safe data indexing](#safe-data-indexing-and-management)). The API is designed to handle potential L1 reorgs that can affect the validity of cross-chain messages. | ||
|
||
Key API methods include: | ||
|
||
| Method | Description | | ||
| ----------------------------------------- | ------------------------------------------------------------------------------------- | | ||
| `UnsafeView` and `SafeView` | Returns the Local and Cross heads for their respective levels | | ||
| `DerivedFrom` | OP Nodes use to check the L1 source of the Supervisor (needed for Safe Head tracking) | | ||
| `UpdateLocalSafe` and `UpdateLocalUnsafe` | Tells the Supervisor when the Node's heads change | | ||
| `Finalized` | Returns the Finalized Head | | ||
| `UpdateFinalizedL1` | Signals to the Supervisor new finality signals | | ||
| `CheckMessage` | Checks logs in the DB directly in tests, can also use `CheckMessages` in geth | | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For a full listing of API names, see the [`op-supervisor` client](https://github.com/ethereum-optimism/optimism/blob/develop/op-service/sources/supervisor_client.go). | ||
|
||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## RPC access to all chains | ||
|
||
The `op-supervisor` requires RPC access to all chains in the dependency set. This allows `op-supervisor` to verify cross-chain messages and sync data across multiple networks simultaneously, such as OP Mainnet and Base nodes using the same instance. | ||
|
||
Benefits of this approach: | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* Cost-effective: Running `op-supervisor` is cheaper than running a full node for each chain in the dependency set. | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Scalability: As the number of chains in the Superchain grows, `op-supervisor` can handle the increasing complexity of cross-chain interactions. | ||
* Improved reliability: It enables a more redundant setup, which is good for stability in the growing ecosystem. | ||
|
||
## Next steps | ||
|
||
* Want to learn more? Read our guide on the anatomy of a [cross-chain message](/stack/interop/cross-chain-message) or check out this [interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). | ||
* For more info about how OP Stack interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.