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

proposing to combine these interop messaging pages #1088

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pages/stack/interop/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"explainer": "Interop explainer",
"cross-chain-message": "Anatomy of cross-chain message",
"supersim": "Supersim Multichain Development Environment",
"message-passing": "Interop message passing",
"op-supervisor": "OP Supervisor",
Expand Down
36 changes: 0 additions & 36 deletions pages/stack/interop/cross-chain-message.mdx

This file was deleted.

25 changes: 21 additions & 4 deletions pages/stack/interop/message-passing.mdx
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
---
title: Interop message passing overview
lang: en-US
description: Learn about cross-chain message passing in the Superchain.
description: Learn about cross-chain message passing with OP Stack interoperability.
---

import { Callout, Steps } from 'nextra/components'
import Image from 'next/image'

# Interop message passing overview

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

This guide provides an overview of cross-chain message passing in the Superchain.
This guide provides an overview of cross-chain message passing with the OP Stack. A cross-chain message applies to any message sent across a chain.

## Overview
## Anatomy of a cross-chain message

The Superchain uses a pull-based event system for cross-chain communication. Messages are sent through the `L2ToL2CrossDomainMessenger` contract, which provides a secure and standardized way to pass information between chains.
To send a cross-chain message on the Superchain using [Superchain interoperability](/stack/explainer), these two aspects must be in place:

1. Each interoperable chain runs a verifying node for each chain in the interoperable set.
2. Each cross-chain message has an **initiating transaction** on the source chain and a **finalizing transaction** on the destination chain.
* **First/initiating transaction:** is submitted to the source chain and emits an event that can be consumed on a destination chain.
* **Second/finalizing transaction:** is submitted to a destination chain, where the block builder should only include it if certain that the first transaction was included in the source chain. The block builder can use OP-Supervisor to determine the integrity of the initiating message. Anyone can submit the second transaction.
<Callout type="default">
There is no strict requirement that the executing message is ever submitted. See the specs for details on tracing the [executing message event](https://specs.optimism.io/interop/predeploys.html#executingmessage-event).
</Callout>

<br />

<Image src="/img/op-stack/protocol/cross-chain-message.png" alt="Anatomy of Cross-Chain Message with Interop" width={700} height={500} />

In the example above, `Ox123` sends 1 OP from OP Mainnet to Base, but this applies to any asset using the SuperchainERC20 token standard.

## How it works

The Superchain uses a pull-based event system for cross-chain communication. Messages are sent through the `L2ToL2CrossDomainMessenger` contract, which provides a secure and standardized way to pass information between chains.

The following diagram illustrates how messages flow between chains through the `L2ToL2CrossDomainMessenger` contract, which acts as a bridge for cross-chain communication. When a contract on the source chain initiates a message, it's processed through several stages before reaching its destination, ensuring secure and reliable message delivery.

```mermaid
Expand Down
3 changes: 2 additions & 1 deletion public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@
/stack/interop/superchain-erc20 /stack/interop/assets/superchain-erc20
/stack/interop/superchain-weth /stack/interop/assets/superchain-weth
/stack/interop/transfer-superchainERC20 /stack/interop/assets/transfer-superchainERC20
/builders/app-developers/contracts/superchain-erc20 /stack/interop/assets/superchain-erc20
/builders/app-developers/contracts/superchain-erc20 /stack/interop/assets/superchain-erc20
/stack/interop/cross-chain-message /stack/interop/message-passing
Loading