Skip to content

Commit 598a38e

Browse files
committed
updated bootstrap command docs
1 parent f84e1ad commit 598a38e

File tree

5 files changed

+122
-106
lines changed

5 files changed

+122
-106
lines changed

pages/operators/chain-operators/tools/op-deployer.mdx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,28 @@ op-deployer inspect l2-semvers --workdir .deployer <l2-chain-id> # outputs the s
129129

130130
## Bootstrap usage
131131

132-
You can also use `op-deployer` to deploy the contracts needed to run the `init`... `apply` flow on new chains. This process, called 'bootstrapping,' is useful when you want to use `op-deployer` with L3s, new testnets, or other custom settlement chains.
132+
The bootstrap commands are specialized tools primarily used for initializing a new superchain on an L1 network that hasn't previously hosted one.
133133

134-
### OPCM bootstrap
135-
136-
To deploy OPCM to a new chain, run the following command:
134+
### Available commands
137135

138136
```bash
139-
op-deployer bootstrap opcm \
140-
--l1-rpc-url <mainnet-rpc-url> \
141-
--private-key <deployer-private-key> \
142-
--artifacts-locator tag://op-contracts/v1.6.0
137+
op-deployer bootstrap superchain
138+
op-deployer bootstrap implementations
139+
op-deployer bootstrap proxy
143140
```
144141

142+
### Use cases
143+
144+
The bootstrap commands are specifically designed for scenarios such as:
145+
* Setting up a superchain on a new EVM-compatible L1.
146+
* Initializing superchain contracts on a new Ethereum testnet (e.g., an alternative to Sepolia).
147+
* Creating the foundational infrastructure for a brand new superchain deployment.
148+
149+
<Callout type="info">
150+
For standard deployments and chain operations, use the [op-deployer `apply`](/operators/chain-operators/tools/op-deployer#apply) command.
151+
The bootstrap commands are specialized tools that will rarely be needed by most users.
152+
</Callout>
153+
145154
## Next steps
146155

147156
* For more details, check out the tool and documentation in the [op-deployer repository](https://github.com/ethereum-optimism/optimism/tree/develop/op-deployer/cmd/op-deployer).

pages/stack/interop.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ Documentation covering Cross Chain Message, Explainer, Message Passing, Op Super
3434
<Card title="Tutorials" href="/stack/interop/tutorials" icon={<img src="/img/icons/shapes.svg" />} />
3535

3636
<Card title="Safe interoperability measures" href="/stack/interop/interop-security" icon={<img src="/img/icons/shapes.svg" />} />
37+
38+
<Card title="Interop reorg awareness" href="/stack/interop/reorg" />
3739
</Cards>

pages/stack/interop/reorg.mdx

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,43 @@ import { InteropCallout } from '@/components/WipCallout'
1313

1414
# Interop reorg awareness
1515

16-
[A chain reorganization, or reorg,](https://www.alchemy.com/overviews/what-is-a-reorg#what-happens-to-reorgs-after-the-merge) happens when validators disagree on the most accurate version of the blockchain.
17-
If not handled correctly, reorgs in a cross-chain context could result in a [double-spend problem](https://en.wikipedia.org/wiki/Double-spending).
16+
[A chain reorganization, or "reorg",](https://www.alchemy.com/overviews/what-is-a-reorg#what-happens-to-reorgs-after-the-merge) happens when validators disagree on the most accurate version of the blockchain.
17+
If not handled correctly, reorgs in a cross-chain context could result in a [double-spend problem](https://en.wikipedia.org/wiki/Double-spending).
1818
The most frequent solution to mitigate the double-spend problem is to wait for Ethereum finality; however, that solution results in high latency cross-chain communication and a poor user experience.
1919

2020
<details>
21-
22-
<summary>What is double-spending?</summary>
23-
24-
```mermaid
25-
26-
flowchart LR
27-
subgraph init ["Initiating transaction (source chain)"]
28-
burn(tokens burned)
29-
burn-->send(send)
30-
end
31-
subgraph exec ["Executing transaction (destination chain)"]
32-
send==initiating message==>receive(receive)
33-
receive-->mint(tokens minted)
34-
end
35-
```
36-
37-
In a normal asset transfer tokens are burned on the source chain first, then a message is sent to the destination chain.
38-
When that message is received, the tokens are minted on the destination chain, where the user can now use those tokens.
39-
40-
```mermaid
41-
42-
flowchart LR
43-
subgraph init ["Not really the source chain"]
44-
err((error))
45-
end
46-
subgraph exec ["Executing transaction (destination chain)"]
47-
err==initiating message==>receive(receive)
48-
receive-->mint(tokens minted)
49-
end
50-
```
51-
52-
A double-spend problem occurs when the destination chain receives a valid initiating message, but due to issues on the source chain, such as a reorg, that initiating transaction is no longer valid.
53-
When that happens, the tokens are still on the source chain, but they are also on the destination chain.
54-
21+
<summary>What is double-spending?</summary>
22+
23+
```mermaid
24+
25+
flowchart LR
26+
subgraph init ["Initiating transaction (source chain)"]
27+
burn(tokens burned)
28+
burn-->send(send)
29+
end
30+
subgraph exec ["Executing transaction (destination chain)"]
31+
send==initiating message==>receive(receive)
32+
receive-->mint(tokens minted)
33+
end
34+
```
35+
36+
In a normal asset transfer tokens are burned on the source chain first, then a message is sent to the destination chain.
37+
When that message is received, the tokens are minted on the destination chain, where the user can now use those tokens.
38+
39+
```mermaid
40+
41+
flowchart LR
42+
subgraph init ["Not really the source chain"]
43+
err((error))
44+
end
45+
subgraph exec ["Executing transaction (destination chain)"]
46+
err==initiating message==>receive(receive)
47+
receive-->mint(tokens minted)
48+
end
49+
```
50+
51+
A double-spend problem occurs when the destination chain receives a valid initiating message, but due to issues on the source chain, such as a reorg, that initiating transaction is no longer valid.
52+
When that happens, the tokens are still on the source chain, but they are also on the destination chain.
5553
</details>
5654

5755
Most solutions to mitigate the double-spend problem rely on [L1 finality](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/#finality). However, that solution results in high latency and poor user experience.
@@ -81,13 +79,13 @@ graph LR
8179
class A101,A102,A103,B302,B303 unsafe
8280
```
8381

84-
In the diagram above, solid arrows are the derivation of a block from the previous block in the chain.
82+
In the diagram above, solid arrows are the derivation of a block from the previous block in the chain.
8583
Dotted arrows go from the block with the initiating message (the source) to the block with the executing message (the destination).
8684
Blocks can either be finalized (grey), cross-safe (green), or unsafe (red).
87-
Blockchain A has only written block A<sub>100</sub> to the blockchain.
85+
Blockchain A has only written block A<sub>100</sub> to the blockchain.
8886
As a result, block A<sub>101</sub> is unsafe, and so are all the blocks that depend on it, directly (A<sub>102</sub> and B<sub>302</sub>) or indirectly (A<sub>103</sub> and B<sub>303</sub>).
89-
Blocks B<sub>302</sub> and B<sub>303</sub> may be *local-safe* (if they are written to L1), but they cannot be *cross-safe* because they depend on a block that isn't.
90-
If all goes well, eventually A<sub>101</sub> will be written to L1, turn safe, and then the blocks that depend on it can become safe as well.
87+
Blocks B<sub>302</sub> and B<sub>303</sub> may be *local-safe* (if they are written to L1), but they cannot be *cross-safe* because they depend on a block that isn't.
88+
If all goes well, eventually A<sub>101</sub> will be written to L1, turn safe, and then the blocks that depend on it can become safe as well.
9189

9290
The message between A<sub>101</sub> and B<sub>302</sub> can be an asset moving across the bridge.
9391
In that case, the initiating message (A<sub>101</sub>) burns `n` tokens on the source chain (A), and the executing message (B<sub>302</sub>) mints `n` tokens on the destination chain (B).
@@ -104,11 +102,10 @@ So L1 reorgs are basically invisible to L2.
104102

105103
Sequencers inform the rest of the Superchain about a new block in two ways:
106104

107-
- The gossip protocol, which is typically used as soon as the block is created.
108-
The problem is that the gossip protocol does not create a commitment.
109-
- Posting to L1, which typically happens a few minutes after the block is created.
110-
The reason is cost, it is a lot cheaper if compression and L1 posting are done in large batches, rather than for each individual block.
111-
105+
* The gossip protocol, which is typically used as soon as the block is created.
106+
The problem is that the gossip protocol does not create a commitment.
107+
* Posting to L1, which typically happens a few minutes after the block is created.
108+
The reason is cost, it is a lot cheaper if compression and L1 posting are done in large batches, rather than for each individual block.
112109

113110
Equivocation happens when a sequencer publishes a block using the gossip protocol that is different from the one that eventually gets written to L1.
114111
In this case, the block that is written to L1 (let's call it A'<sub>101</sub>) is the valid one, and that causes every dependent block to be recalculated.
@@ -154,15 +151,13 @@ So the change from A<sub>101</sub> to A'<sub>101</sub> cannot invalidate any exi
154151
If a block is invalid, even if it is posted on L1, the canonical chain replaces it with a block that only includes the deposit transactions, those transactions posted to L1.
155152

156153
<details>
154+
<summary>What makes a block invalid?</summary>
157155

158-
<summary>What makes a block invalid?</summary>
159-
160-
There are several potential reasons:
161-
162-
- The block posted to L1 includes incorrect information, for example because it relied on a node on a different blockchain for interop and that node reported incorrect information.
163-
- The block was never posted.
164-
After a timeout of twelve hours all the verifiers will assume that the block that should have been posted is a deposit-only block.
156+
There are several potential reasons:
165157

158+
* The block posted to L1 includes incorrect information, for example because it relied on a node on a different blockchain for interop and that node reported incorrect information.
159+
* The block was never posted.
160+
After a timeout of twelve hours all the verifiers will assume that the block that should have been posted is a deposit-only block.
166161
</details>
167162

168163
This is functionally equivalent to equivocation, and dealt with the same way, so it can change unsafe blocks but only those blocks.
@@ -177,6 +172,6 @@ At worst, some unsafe blocks need to be recalculated (if one fork is chosen over
177172

178173
## Next steps
179174

180-
- Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain.
181-
- Deploy a [SuperchainERC20](./tutorials/deploy-superchain-erc20) to the Superchain.
182-
- View more [interop tutorials](./tutorials).
175+
* Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain.
176+
* Deploy a [SuperchainERC20](./tutorials/deploy-superchain-erc20) to the Superchain.
177+
* View more [interop tutorials](./tutorials).

0 commit comments

Comments
 (0)