Skip to content

Commit f849bff

Browse files
authored
Merge pull request #1599 from ethereum-optimism/update-genesis
Update OP Stack genesis creation docs
2 parents db37574 + a07e8a8 commit f849bff

File tree

13 files changed

+420
-364
lines changed

13 files changed

+420
-364
lines changed

pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

Lines changed: 143 additions & 120 deletions
Large diffs are not rendered by default.

pages/notices/_meta.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"upgrade-14": "Upgrade 14: MT-Cannon and Isthmus L1 Contracts",
88
"upgrade-13": "Upgrade 13: OPCM and incident response improvements",
99
"blob-fee-bug": "Superchain testnets' blob fee bug",
10-
"custom-gas-tokens-deprecation": "Preparing for Custom Gas Tokens deprecation",
11-
"sdk-deprecation": "Preparing for Optimism SDK deprecation"
10+
"custom-gas-tokens-deprecation": "Preparing for Custom Gas Tokens deprecation"
1211
}

pages/notices/sdk-deprecation.mdx

Lines changed: 0 additions & 83 deletions
This file was deleted.

pages/operators/chain-operators/deploy.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import { Card, Cards } from 'nextra/components'
2424
This section provides information on OP Stack genesis creation, deployment overview, and smart contract deployment. You'll find guides and overviews to help you understand and work with these topics.
2525

2626
<Cards>
27-
<Card title="Op stack genesis creation" href="/operators/chain-operators/deploy/genesis" />
27+
<Card title="Chain artifacts creation" href="/operators/chain-operators/deploy/genesis" />
2828

29-
<Card title="Op stack deployment overview" href="/operators/chain-operators/deploy/overview" />
29+
<Card title="Deployment overview" href="/operators/chain-operators/deploy/overview" />
3030

31-
<Card title="Op stack smart contract deployment" href="/operators/chain-operators/deploy/smart-contracts" />
31+
<Card title="Smart contract deployment" href="/operators/chain-operators/deploy/smart-contracts" />
3232

33-
<Card title="Learn how to validate your OP Stack deployment using op-validator" href="/operators/chain-operators/deploy/validate-deployment" />
33+
<Card title="Validate your contract deployment" href="/operators/chain-operators/deploy/validate-deployment" />
3434

3535
</Cards>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"overview": "Deployment overview",
3+
"smart-contracts": "Smart contract deployment",
4+
"validate-deployment": "Validate your contract deployment",
5+
"genesis": "Chain artifacts creation"
6+
}
7+
Lines changed: 62 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: OP Stack genesis creation
2+
title: Chain artifacts creation
33
lang: en-US
4-
description: Learn how to create a genesis file for the OP Stack.
4+
description: Learn how to create genesis and rollup configuration files using op-deployer after L1 contract deployment.
55
content_type: guide
66
topic: genesis-creation
77
personas:
@@ -20,78 +20,93 @@ is_imported_content: 'false'
2020

2121
import { Callout } from 'nextra/components'
2222

23-
# OP Stack genesis creation
23+
# Overview
2424

25-
<Callout type="info">
26-
The recommended way to generate genesis and rollup configuration files is using `op-deployer`.
27-
This ensures standardization and compatibility with the Superchain.
28-
</Callout>
25+
After deploying the L1 system contracts for your OP Stack chain, you need to generate two files to run nodes on the L2 network:
26+
27+
* **Genesis file** (`genesis.json`): Initializes the execution client (`op-geth`)
28+
* **Rollup configuration file** (`rollup.json`): Configures the consensus client (`op-node`)
2929

30-
The `op-deployer` tool simplifies the creation of genesis and rollup configuration files (`genesis.json` and `rollup.json`).
31-
These files are crucial for initializing the execution client (`op-geth`) and consensus client (`op-node`) for your network.
30+
This guide shows you how to generate these files from your L1 contract deployment data using `op-deployer`.
3231

33-
The recommended flow for creating a genesis file and rollup configuration file on the OP Stack is as follows:
32+
## Prerequisites
3433

35-
1. **Deploy the L1 contracts** using [op-deployer](/operators/chain-operators/tools/op-deployer).
36-
2. **Generate** both the L2 genesis file (`genesis.json`) and the rollup configuration file (`rollup.json`) using op-deployer's `inspect` commands.
37-
3. **Initialize** your off-chain components (e.g., execution client, consensus client).
34+
Before generating genesis and rollup configuration files, ensure you have:
3835

39-
## Recommended method: using op-deployer
36+
1. Deployed the L1 contracts successfully using the [`op-deployer apply`](/operators/chain-operators/tools/op-deployer#apply-deploy-your-chain) command
4037

41-
### Prerequisites
38+
2. Access to your deployment workspace directory (`.deployer` if you've followed the instructions in the L1 deployment contracts guide)
4239

43-
1. You have installed the `op-deployer` binary following the instructions in [deployer docs](/operators/chain-operators/tools/op-deployer#installation).
44-
After installation, extract the `op-deployer` into your `PATH` and `cd op-deployer`.
40+
## Generating genesis and rollup files
4541

46-
2. You have created and customized an intent file in a `.deployer` directory, typically by running:
42+
After your L1 contracts have been deployed, follow these steps to generate the configuration files:
4743

48-
```bash
49-
./bin/op-deployer init --l1-chain-id <YOUR_L1_CHAIN_ID> --l2-chain-ids <YOUR_L2_CHAIN_ID> --workdir .deployer
50-
```
44+
### Step 1: Locate your deployment state file
5145

52-
Replace `<YOUR_L1_CHAIN_ID>` and `<YOUR_L2_CHAIN_ID>` with their respective values, see a list of [`chainIds`](https://chainid.network/).
46+
The `op-deployer` tool creates a `state.json` file in your workspace directory that contains all the necessary information about your deployed contracts.
5347

54-
3. You have edited that intent file to your liking (roles, addresses, etc.).
48+
Verify that this file exists in your workspace:
49+
50+
```bash
51+
ls -la .deployer/state.json
52+
```
5553

56-
### Step 1: Deploy the L1 contracts
54+
### Step 2: Generate the L2 genesis file
5755

58-
To deploy your chain to L1, run:
56+
Use the `inspect genesis` command to retrieve your L2 genesis file:
5957

6058
```bash
61-
./bin/op-deployer apply --workdir .deployer \
62-
--l1-rpc-url <RPC_URL_FOR_L1> \
63-
--private-key <DEPLOYER_PRIVATE_KEY_HEX>
59+
op-deployer inspect genesis --workdir .deployer <L2_CHAIN_ID> > .deployer/genesis.json
6460
```
6561

66-
This command:
62+
Replace `<L2_CHAIN_ID>` with your L2 network's chain ID.
63+
64+
### Step 3: Generate the rollup configuration file
6765

68-
* Reads your intent file in `.deployer/.`
69-
* Deploys the OP Stack contracts to the specified L1.
70-
* Updates a local `state.json` file with the results of the deployment.
66+
Use the `inspect rollup` command to retrieve your rollup configuration file:
7167

72-
### Step 2: Generate your L2 genesis file and rollup file
68+
```bash
69+
op-deployer inspect rollup --workdir .deployer <L2_CHAIN_ID> > .deployer/rollup.json
70+
```
7371

74-
After your L1 contracts have been deployed, generate the L2 genesis and rollup configuration files by inspecting the deployer's `state.json`
72+
### Step 4: Verify the generated files
73+
74+
Examine the generated files to ensure they contain the expected configuration:
7575

7676
```bash
77-
./bin/op-deployer inspect genesis --workdir .deployer <L2_CHAIN_ID> > .deployer/genesis.json
78-
./bin/op-deployer inspect rollup --workdir .deployer <L2_CHAIN_ID> > .deployer/rollup.json
77+
# View the genesis file structure
78+
jq . .deployer/genesis.json | head -20
79+
80+
# View the rollup configuration
81+
jq . .deployer/rollup.json
7982
```
8083

81-
* genesis.json is the file you will provide to your execution client (e.g. op-geth).
82-
* rollup.json is the file you will provide to your consensus client (e.g. op-node).
84+
The `genesis.json` file contains the initial state of your L2 blockchain, including:
85+
86+
* Chain configuration parameters
87+
* Initial account states
88+
* Genesis block properties
89+
90+
The `rollup.json` file contains the rollup protocol parameters, including:
8391

84-
### Step 3: Initialize your off-chain components
92+
* L1 contract addresses
93+
* Sequencing settings
94+
* Protocol upgrade activation times
8595

86-
Once you have `genesis.json` and `rollup.json`:
96+
## Troubleshooting
8797

88-
1. Initialize op-geth using genesis.json.
89-
2. Configure op-node with rollup.json.
90-
3. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/operators/chain-operators/architecture).
98+
If you encounter issues with the generated files:
99+
100+
* [Verify](/operators/chain-operators/tools/op-deployer#verify-verify-contract-source-code-on-block-explorers) that your L1 contract deployment was successful
101+
* Check that you're using the correct **L2 chain ID** in the generation commands
102+
* Ensure your `state.json` file is up-to-date with your latest deployment
103+
104+
<Callout type="warning">
105+
Never manually edit the generated genesis or rollup files unless you fully understand the implications. Incorrect configurations can lead to consensus failures or chain security issues.
106+
</Callout>
91107

92108
## Next steps
93109

94-
* Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file)
95-
`op-geth` with your `genesis.json` file.
96-
* Learn how to [initialize](/operators/node-operators/configuration/base-config#configuring-op-node) `op-node` with your `rollup.json` file.
97-
* Learn more about the off chain [architecture](/operators/chain-operators/architecture).
110+
* Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file) `op-geth` with your `genesis.json` file
111+
* Learn how to [configure](/operators/node-operators/configuration/base-config#configuring-op-node) `op-node` with your `rollup.json` file
112+
* Learn more about the off-chain [architecture](/operators/chain-operators/architecture)

pages/operators/chain-operators/deploy/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: OP Stack deployment overview
2+
title: Deployment overview
33
lang: en-US
44
description: Learn about the different components of deploying a standard OP Stack chain.
55
content_type: guide
@@ -20,7 +20,7 @@ is_imported_content: 'false'
2020

2121
import { Callout } from 'nextra/components'
2222

23-
# OP Stack deployment overview
23+
# Deployment overview
2424

2525
When deploying a **standard OP Stack chain**, you'll be setting up several key
2626
components. It's useful to understand what each of these components does before

pages/operators/chain-operators/deploy/smart-contracts.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: OP Stack Smart Contract Deployment
2+
title: Smart contract deployment
33
lang: en-US
44
description: Learn how to deploy the OP Stack L1 smart contracts.
55
content_type: guide
@@ -20,12 +20,10 @@ is_imported_content: 'false'
2020

2121
import { Callout, Steps } from 'nextra/components'
2222

23-
# OP Stack smart contract deployment
23+
# Overview
2424

2525
This guide outlines the process for deploying the OP Stack L1 smart contracts using `op-deployer`.
2626

27-
## Overview
28-
2927
Deploying OP Stack L1 contracts is a critical step in setting up your rollup.
3028

3129
<Callout type="warning">

pages/operators/chain-operators/deploy/validate-deployment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Validating your OP Stack deployment
2+
title: Validate your contract deployment
33
lang: en-US
44
description: Learn how to validate your OP Stack deployment using op-validator
55
content_type: guide

0 commit comments

Comments
 (0)