OP Stack
OP Supervisor

OP Supervisor

šŸ’”

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.

OP Supervisor is a service that verifies cross-chain messages and manages interoperability between chains in the OP Stack. It serves as a hub where each op-node can index the data needed for cross-chain verification. Chain operators and teams running full nodes like RPC providers are expected to run this service. Some features and benefits include:

  • Enables secure cross-chain message passing on the Superchain
  • Provides a unified point for managing interoperability data
  • Supports multiple networks simultaneously
  • Offers potential for public endpoints to aid in node synchronization

How cross-chain message verification works

OP Supervisor 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ā .ā 

  • 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-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

OP Supervisor 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. ā 

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

OP Supervisor 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 log data indexing). The API is designed to handle potential L1 reorgs that can affect the validity of cross-chain messagesā .

Key API methods include:

MethodDescription
UnsafeView and SafeViewReturns the Local and Cross heads for their respective levels
DerivedFromOP Nodes use to check the L1 source of the Supervisor (needed for Safe Head tracking)
UpdateLocalSafe and UpdateLocalUnsafeTells the Supervisor when the Node's heads change
FinalizedReturns the Finalized Head
UpdateFinalizedL1Signals to the Supervisor new finality signals
CheckMessageChecks logs in the DB directly in tests

For a full listing of API names, see the op-supervisor client (opens in a new tab).

RPC access to all chains

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:

  • 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