From ef2431244daf9ca03939013b0c7ebc7b9ba632b0 Mon Sep 17 00:00:00 2001 From: soyboy Date: Thu, 7 Nov 2024 16:40:44 -0800 Subject: [PATCH] proposing to combine these pages --- pages/stack/interop/_meta.json | 1 - pages/stack/interop/cross-chain-message.mdx | 36 --------------------- pages/stack/interop/message-passing.mdx | 25 +++++++++++--- public/_redirects | 3 +- 4 files changed, 23 insertions(+), 42 deletions(-) delete mode 100644 pages/stack/interop/cross-chain-message.mdx diff --git a/pages/stack/interop/_meta.json b/pages/stack/interop/_meta.json index d42e969c..fa231412 100644 --- a/pages/stack/interop/_meta.json +++ b/pages/stack/interop/_meta.json @@ -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", diff --git a/pages/stack/interop/cross-chain-message.mdx b/pages/stack/interop/cross-chain-message.mdx deleted file mode 100644 index 3d7d8d40..00000000 --- a/pages/stack/interop/cross-chain-message.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Anatomy of a cross-chain message -lang: en-US -description: Learn how cross-chain messaging works with OP Stack interoperability. ---- - -import { Callout } from 'nextra/components' -import Image from 'next/image' - -# Anatomy of a cross-chain message - -A cross-chain message applies to any message sent across a chain. This applies to asset transfers using the [SuperchainERC20](superchain-erc20) token standard. - -## How it works - -To send a cross-chain message on the Superchain using [Superchain interoperability](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. - - 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). - - -
- -Anatomy of Cross-Chain Message with Interop - -In the example above, `Ox123` sends 1 OP from OP Mainnet to Base, but this applies to any asset using the SuperchainERC20 token standard. - -## Next steps - -* More questions? Check out the FAQ section in the [Superchain Interop Explainer](explainer#faqs) or check out this [Superchain interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes). -* Ready to get started? Use [Supersim](supersim), a local dev environment that simulates Superchain interop for testing applications against a local version of the Superchain. -* For more info about how Superchain interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html). diff --git a/pages/stack/interop/message-passing.mdx b/pages/stack/interop/message-passing.mdx index 3be6ed39..f529427d 100644 --- a/pages/stack/interop/message-passing.mdx +++ b/pages/stack/interop/message-passing.mdx @@ -1,10 +1,11 @@ --- 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 @@ -12,14 +13,30 @@ import { Callout, Steps } from 'nextra/components' 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. -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. + + 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). + + +
+ +Anatomy of Cross-Chain Message with Interop + +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 diff --git a/public/_redirects b/public/_redirects index 6d137da4..d8c6edec 100644 --- a/public/_redirects +++ b/public/_redirects @@ -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 \ No newline at end of file +/builders/app-developers/contracts/superchain-erc20 /stack/interop/assets/superchain-erc20 +/stack/interop/cross-chain-message /stack/interop/message-passing \ No newline at end of file