Skip to content

Commit 3fdf0ec

Browse files
authored
Merge pull request #1250 from ethereum-optimism/fix-tut
Fixes: ETH Deposit Tutorial
2 parents 332da75 + cc430a6 commit 3fdf0ec

File tree

7 files changed

+77
-79
lines changed

7 files changed

+77
-79
lines changed

pages/builders/app-developers/tutorials/cross-dom-bridge-eth.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ You can get some Sepolia ETH from [this faucet](https://sepoliafaucet.com).
133133

134134
## Deposit ETH
135135

136-
Now that you have some ETH on L1 you can deposit that ETH into the `L1StandardBridge` contract. You'll then receive the same number of ETH on L2 in return.
136+
Now that you have some ETH on L1 you can deposit that ETH into the `OptimismPortalProxy` contract. You'll then receive the same number of ETH on L2 in return.
137137

138138
<Tabs items={['depositETH', 'Full Code']}>
139139
<Tabs.Tab>
@@ -167,7 +167,7 @@ Now that you have some ETH on L1 you can deposit that ETH into the `L1StandardBr
167167

168168
Wait for the L1 transaction to be processed and log the receipt.
169169

170-
```js file=<rootDir>/public/tutorials/cross-dom-bridge-eth.js#L52-L53 hash=0de1fe6dd17f753ab80d356b38d9ca41
170+
```js file=<rootDir>/public/tutorials/cross-dom-bridge-eth.js#L52-L53 hash=bccea143ce3571de154531c40e9a0d04
171171
```
172172

173173
{<h3>Extract the L2 transaction hash</h3>}
@@ -188,7 +188,7 @@ Now that you have some ETH on L1 you can deposit that ETH into the `L1StandardBr
188188
</Tabs.Tab>
189189

190190
<Tabs.Tab>
191-
```js file=<rootDir>/public/tutorials/cross-dom-bridge-eth.js#L3-L63 hash=b7d72a54dcdbb9b89c6874e2862fde00
191+
```js file=<rootDir>/public/tutorials/cross-dom-bridge-eth.js#L3-L63 hash=1198e2379e95a0e6c72c03692f10e9ee
192192
```
193193
</Tabs.Tab>
194194
</Tabs>

pages/stack/interop.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ Documentation covering Cross Chain Message, Explainer, Message Passing, Op Super
2727
<Card title="Cross domain assets" href="/stack/interop/assets" />
2828

2929
<Card title="Interop devnet" href="/stack/interop/devnet" />
30+
31+
<Card title="Interoperability predeploys" href="/stack/interop/predeploy" />
32+
33+
<Card title="Cross-chain security" href="/stack/interop/security" />
34+
3035
</Cards>

pages/stack/interop/explainer.mdx

+32-37
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ import { InteropCallout } from '@/components/WipCallout'
1111

1212
<InteropCallout />
1313

14-
# Interoperability explainer
14+
# Interoperability explainer
1515

1616
## Why do we need interoperability?
1717

18-
It is easy for a blockchain to be certain about information it generates itself.
18+
It is easy for a blockchain to be certain about information it generates itself.
1919
Information that comes from other sources is harder to provide in a safe, decentralized, and uncensorable manner (this is called [The Oracle Problem](https://chain.link/education-hub/oracle-problem)).
2020
The next major scalability improvement to the OP Stack is to enable a network of chains to feel like a single blockchain.
2121
This goal requires low-latency, seamless message passing and asset bridging.
2222

2323
*Interoperability* is a set of protocols and services that lets OP Stack blockchains read each others' state.
2424
Interoperability provides the following benefits:
2525

26-
- 1-block latency asset movement, removing the problem of capital fragmentation leading to better capital efficiency.
27-
- Improved experience for both users and developers.
28-
- Secure transfer of assets, such as ETH and ERC-20 tokens, across L2s.
29-
- Horizontal scalability for applications that need it.
26+
* 1-block latency asset movement, removing the problem of capital fragmentation leading to better capital efficiency.
27+
* Improved experience for both users and developers.
28+
* Secure transfer of assets, such as ETH and ERC-20 tokens, across L2s.
29+
* Horizontal scalability for applications that need it.
3030

3131
## Interoperability architecture
3232

3333
A pre-interop OP Stack node consists of two pieces of software: a consensus client (e.g. op-node) and an execution client, which is responsible for processing user transactions and constructing blocks (e.g. op-geth).
34-
Interoperability among OP Stack chains is enabled via a new service called [*OP Supervisor*](/stack/interop/op-supervisor).
34+
Interoperability among OP Stack chains is enabled via a new service called [*OP Supervisor*](/stack/interop/op-supervisor).
3535
Every node operator is expected to run this service in addition to the [rollup node](/builders/node-operators/architecture#rollup-node) and [execution client](/builders/node-operators/architecture#execution-client).
3636

3737
```mermaid
@@ -145,28 +145,26 @@ Interop expands the scope of trust for unsafe blocks (blocks that are shared thr
145145
If a sequencer chooses to accept unsafe messages, the sequencer must trust the sequencer that produces the inbound message as well as any referenced unsafe messages produced from sequencers in the transitive dependency set.
146146

147147
<details>
148-
149-
<summary>What is the transitive dependency set?</summary>
150-
151-
The transitive dependency set of a blockchain is all the chains on which it depends, and all the chains that depend on them, and so on.
152-
For example, in the illustration above, the dependency set of chain A is just chain B.
153-
However, the *transitive* dependency set includes chain B, the chains that depend on it (C and D) and the chains that depend on them (E).
154-
If there was a chain that depended on E, that chain would be part of the transitive dependency set too.
155-
156-
```mermaid
157-
158-
flowchart LR
159-
A[Chain A] <--> B[Chain B]
160-
B <--> C[Chain C]
161-
B <--> D[Chain D]
162-
D <--> E[Chain E]
163-
F[Chain F] <--> G[Chain G]
164-
```
165-
166-
For example, there could be a block in chain D that depends on an initiating message in chain E>
167-
If the block with that initiating message is still unsafe (not written to L1), then the block in chain D is also usafe, even if it has been written to L1.
168-
As a result, a block in chain B that depends on the chain D block can also be unsafe, as can a block in chain A that depends on the block in chain B.
169-
148+
<summary>What is the transitive dependency set?</summary>
149+
150+
The transitive dependency set of a blockchain is all the chains on which it depends, and all the chains that depend on them, and so on.
151+
For example, in the illustration above, the dependency set of chain A is just chain B.
152+
However, the *transitive* dependency set includes chain B, the chains that depend on it (C and D) and the chains that depend on them (E).
153+
If there was a chain that depended on E, that chain would be part of the transitive dependency set too.
154+
155+
```mermaid
156+
157+
flowchart LR
158+
A[Chain A] <--> B[Chain B]
159+
B <--> C[Chain C]
160+
B <--> D[Chain D]
161+
D <--> E[Chain E]
162+
F[Chain F] <--> G[Chain G]
163+
```
164+
165+
For example, there could be a block in chain D that depends on an initiating message in chain E>
166+
If the block with that initiating message is still unsafe (not written to L1), then the block in chain D is also usafe, even if it has been written to L1.
167+
As a result, a block in chain B that depends on the chain D block can also be unsafe, as can a block in chain A that depends on the block in chain B.
170168
</details>
171169

172170
Notably this trust assumption is only for *unsafe* blocks, and *only* if the sequencer allows messages from unsafe blocks to be processed.
@@ -202,8 +200,8 @@ To move an asset from chain E to chain B, it is necessary to move the asset from
202200

203201
### Superchain interop cluster
204202

205-
The Superchain builds on top of the interop protocol and implements a single mesh network with complete dependencies.
206-
In this model, each blockchain in the Superchain interop cluster would have direct connections to every other blockchain, creating a fully connected mesh network.
203+
The Superchain builds on top of the interop protocol and implements a single mesh network with complete dependencies.
204+
In this model, each blockchain in the Superchain interop cluster would have direct connections to every other blockchain, creating a fully connected mesh network.
207205
This model provides the highest level of interoperability, as any blockchain can transact directly with any other.
208206

209207
```mermaid
@@ -213,10 +211,8 @@ flowchart LR
213211
A <--> C <--> E <--> B <--> D <--> A
214212
```
215213

216-
217214
Each blockchain in the Superchain interop cluster shares the same security model to mitigate the weakest-link scenario. As outlined in the [Standard Rollup Charter](https://gov.optimism.io/t/season-6-standard-rollup-charter-ratification/8135#p-36758-governing-policies-11), these chains share the same L1 `ProxyAdmin` Owner. Any changes to the Superchain interop cluster must follow the standard Protocol Upgrade vote procedure—the established governance process for Superchain modifications.
218215

219-
220216
{/*
221217
## Interop assets
222218
@@ -229,8 +225,7 @@ This means ETH and ERC-20s can seamlessly and securely move across L2s, and inte
229225
*/}
230226

231227
## Next steps
232-
* Want to learn more? Read our guide on the anatomy of a [cross-chain message](cross-chain-message) or check out this [interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes).
233-
* Ready to get started? Use [Supersim](supersim), a local dev environment that simulates interop for testing applications against a local version of the Superchain.
234-
* For more info about how OP Stack interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html).
235-
236228

229+
* Want to learn more? Read our guide on the anatomy of a [cross-chain message](cross-chain-message) or check out this [interop design video walk-thru](https://www.youtube.com/watch?v=FKc5RgjtGes).
230+
* Ready to get started? Use [Supersim](supersim), a local dev environment that simulates interop for testing applications against a local version of the Superchain.
231+
* For more info about how OP Stack interoperability works under the hood, [check out the specs](https://specs.optimism.io/interop/overview.html).

pages/stack/interop/predeploy.mdx

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { InteropCallout } from '@/components/WipCallout'
1313

1414
# Interoperability predeploys
1515

16-
The following predeploys have been added to enable interoperability.
16+
The following predeploys have been added to enable interoperability.
1717
*Predeployed smart contracts* exist at predetermined addresses, coming from the genesis state.
1818
They're similar to [precompiles](https://www.evm.codes/precompiled) but run directly in the EVM instead of running as native code.
1919

@@ -22,19 +22,19 @@ They're similar to [precompiles](https://www.evm.codes/precompiled) but run dire
2222
The `CrossL2Inbox` is the system predeploy for cross chain messaging.
2323
Anyone can trigger the execution or validation of cross chain messages, on behalf of any user.
2424

25-
- **Address:** `0x4200000000000000000000000000000000000022`
26-
- **Specs:** [`CrossL2Inbox`](https://specs.optimism.io/interop/predeploys.html#crossl2inbox)
27-
- **Source code:** [`CrossL2Inbox`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol)
25+
* **Address:** `0x4200000000000000000000000000000000000022`
26+
* **Specs:** [`CrossL2Inbox`](https://specs.optimism.io/interop/predeploys.html#crossl2inbox)
27+
* **Source code:** [`CrossL2Inbox`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol)
2828

2929
## L2ToL2CrossDomainMessenger
3030

3131
The `L2ToL2CrossDomainMessenger` is a higher level abstraction on top of the `CrossL2Inbox` that provides general message passing.
3232
It's utilized for secure ERC20 token transfers between L2 chains.
3333
Messages sent through the `L2ToL2CrossDomainMessenger` on the source chain receive both replay protection and domain binding (the executing transaction can only be valid on a single chain).
3434

35-
- **Address:** `0x4200000000000000000000000000000000000023`
36-
- **Specs:** [`L2ToL2CrossDomainMessenger`](https://specs.optimism.io/interop/predeploys.html#l2tol2crossdomainmessenger)
37-
- **Source code:** [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol)
35+
* **Address:** `0x4200000000000000000000000000000000000023`
36+
* **Specs:** [`L2ToL2CrossDomainMessenger`](https://specs.optimism.io/interop/predeploys.html#l2tol2crossdomainmessenger)
37+
* **Source code:** [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol)
3838

3939
{/*
4040
## OptimismSuperchainERC20Factory
@@ -60,6 +60,6 @@ This contract is the `Beacon` part, which provides the implementation address fo
6060

6161
The `SuperchainTokenBridge` is an abstraction on top of the `L2toL2CrossDomainMessenger` that facilitates token bridging using interop. It has mint and burn rights over `OptimismSuperchainERC20` tokens, as described in the [token bridging spec](https://specs.optimism.io/interop/token-bridging.html).
6262

63-
- **Address:** `0x4200000000000000000000000000000000000028`
64-
- **Specs:** [`SuperchainTokenBridge`](https://specs.optimism.io/interop/predeploys.html#superchainerc20bridge)
65-
- **Source code:** [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol)
63+
* **Address:** `0x4200000000000000000000000000000000000028`
64+
* **Specs:** [`SuperchainTokenBridge`](https://specs.optimism.io/interop/predeploys.html#superchainerc20bridge)
65+
* **Source code:** [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol)

0 commit comments

Comments
 (0)