|
1 | 1 | --- |
2 | 2 | title: Interop message passing overview |
3 | 3 | lang: en-US |
4 | | -description: Learn about cross-chain message passing in the Superchain. |
| 4 | +description: Learn about cross-chain message passing with OP Stack interoperability. |
5 | 5 | --- |
6 | 6 |
|
7 | 7 | import { Callout, Steps } from 'nextra/components' |
| 8 | +import Image from 'next/image' |
8 | 9 |
|
9 | 10 | # Interop message passing overview |
10 | 11 |
|
11 | 12 | <Callout> |
12 | 13 | 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. |
13 | 14 | </Callout> |
14 | 15 |
|
15 | | -This guide provides an overview of cross-chain message passing in the Superchain. |
| 16 | +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. |
16 | 17 |
|
17 | | -## Overview |
| 18 | +## Anatomy of a cross-chain message |
18 | 19 |
|
19 | | -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. |
| 20 | +To send a cross-chain message on the Superchain using [Superchain interoperability](/stack/explainer), these two aspects must be in place: |
| 21 | + |
| 22 | +1. Each interoperable chain runs a verifying node for each chain in the interoperable set. |
| 23 | +2. Each cross-chain message has an **initiating transaction** on the source chain and a **finalizing transaction** on the destination chain. |
| 24 | + * **First/initiating transaction:** is submitted to the source chain and emits an event that can be consumed on a destination chain. |
| 25 | + * **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. |
| 26 | +<Callout type="default"> |
| 27 | + 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). |
| 28 | +</Callout> |
| 29 | + |
| 30 | +<br /> |
| 31 | + |
| 32 | +<Image src="/img/op-stack/protocol/cross-chain-message.png" alt="Anatomy of Cross-Chain Message with Interop" width={700} height={500} /> |
| 33 | + |
| 34 | +In the example above, `Ox123` sends 1 OP from OP Mainnet to Base, but this applies to any asset using the SuperchainERC20 token standard. |
20 | 35 |
|
21 | 36 | ## How it works |
22 | 37 |
|
| 38 | +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. |
| 39 | + |
23 | 40 | 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. |
24 | 41 |
|
25 | 42 | ```mermaid |
|
0 commit comments