You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/builders/chain-operators/deploy/genesis.mdx
+37-13
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,14 @@ import { Callout } from 'nextra/components'
8
8
9
9
# OP Stack genesis creation
10
10
11
-
<Callouttype="warning">
12
-
This page has been **updated** to use <strong>op-deployer</strong> for genesis file creation. The foundry-script-based method (described below as "legacy") is no longer recommended for production.
11
+
<Callouttype="info">
12
+
The recommended way to generate genesis and rollup configuration files is using `op-deployer`.
13
+
This ensures standardization and compatibility with the Superchain.
13
14
</Callout>
14
15
16
+
The `op-deployer` tool simplifies the creation of genesis and rollup configuration files (`genesis.json` and `rollup.json`).
17
+
These files are crucial for initializing the execution client (`op-geth`) and consensus client (`op-node`) for your network.
18
+
15
19
The recommended flow for creating a genesis file and rollup configuration file on the OP Stack is as follows:
16
20
17
21
1.**Deploy the L1 contracts** using [op-deployer](/builders/chain-operators/tools/op-deployer).
@@ -22,18 +26,22 @@ The recommended flow for creating a genesis file and rollup configuration file o
22
26
23
27
### Prerequisites
24
28
25
-
1. You have installed the `op-deployer` binary following the instructions in [Deployer docs](/builders/chain-operators/tools/op-deployer).
29
+
1. You have installed the `op-deployer` binary following the instructions in [deployer docs](/builders/chain-operators/tools/op-deployer#installation).
30
+
After installation, extract the `op-deployer` into your `PATH` and `cd op-deployer`.
26
31
2. You have created and customized an intent file in a `.deployer` directory, typically by running:
* genesis.json is the file you will provide to your execution client (e.g. op-geth).
56
64
* rollup.json is the file you will provide to your consensus client (e.g. op-node).
57
65
58
66
### Step 3: Initialize your off-chain components
59
67
60
-
Once you have genesis.json and rollup.json:
68
+
Once you have `genesis.json` and `rollup.json`:
61
69
62
70
1. Initialize op-geth using genesis.json.
63
-
1. Configure op-node with rollup.json.
64
-
1. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/builders/chain-operators/architecture).
71
+
2. Configure op-node with rollup.json.
72
+
3. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/builders/chain-operators/architecture).
73
+
74
+
4.### Step 3: Get data
75
+
76
+
Now that you have your `genesis.json` and `rollup.json` you can spin up a node on your network.
77
+
You can also use the following inspect subcommands to get additional data:
78
+
79
+
```bash
80
+
./bin/op-deployer inspect l1 --workdir .deployer <l2-chain-id># outputs all L1 contract addresses for an L2 chain
81
+
./bin/op-deployer inspect deploy-config --workdir .deployer <l2-chain-id># outputs the deploy config for an L2 chain
82
+
```
65
83
66
84
## Legacy method: using foundry script
67
85
@@ -70,10 +88,16 @@ file that represents the L2 genesis. You will provide this file to the
70
88
execution client (op-geth) to initialize your network. There is also the rollup configuration file, `rollup.json`, which will be
71
89
provided to the consensus client (op-node).
72
90
73
-
## Solidity script
91
+
<Callouttype="warning">
92
+
The following genesis creation information is the legacy method for creating OP Stack configuration files.
93
+
This method is not recommended. It's preserved here for historical context.
94
+
</Callout>
95
+
96
+
97
+
## Solidity script (Legacy)
74
98
75
-
At the time of this writing, the preferred method for genesis generation is to use the foundry script
76
-
located in the monorepo to generate an "L2 state dump" and then pass this into the op-node genesis subcommand.
99
+
You can also use the foundry script
100
+
located in the monorepo to generate an "L2 state dump" and then pass this into the op-node genesis subcommand.
0 commit comments