Skip to content

Commit 8570d17

Browse files
authored
Merge pull request #791 from ethereum-optimism/geoknee-patch-1
Update genesis.mdx
2 parents 8272eb2 + 30b0387 commit 8570d17

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

pages/builders/chain-operators/deploy/genesis.mdx

+17-10
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ import { Callout } from 'nextra/components'
88

99
# OP Stack Genesis Creation
1010

11-
The following guide shows you how to generate the L2 allocs. This is a JSON
12-
file that represents the L2 genesis state. You will provide this file to the
13-
execution client (op-geth) to initialize your network.
11+
The following guide shows you how to generate the L2 genesis file `genesis.json`. This is a JSON
12+
file that represents the L2 genesis. You will provide this file to the
13+
execution client (op-geth) to initialize your network. There is also the rollup configuration file, `rollup.json`, which will be
14+
provided to the consensus client (op-node).
1415

1516
## Solidity Script
1617

17-
At the time of this writing, the preferred method for genesis generation is to use the foundry script located in the monorepo. It can be found at
18+
At the time of this writing, the preferred method for genesis generation is to use the foundry script
19+
located in the monorepo to generate an "L2 state dump" and then pass this into the op-node genesis subcommand.
20+
The foundry script can be found at
1821
[packages/contracts-bedrock/scripts/L2Genesis.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/L2Genesis.s.sol).
1922

2023
### Configuration
@@ -27,7 +30,7 @@ environment variable `FORK` either to the lower-case fork name (currently
2730
`delta`, `ecotone`, or `fjord`) or to `latest`, which will select the latest fork
2831
available (currently `fjord`).
2932

30-
By default, the script will dump the L2 genesis allocs of the detected or
33+
By default, the script will dump the L2 genesis allocs (aka "state dump") of the detected or
3134
selected fork only, to the file at `STATE_DUMP_PATH`. The optional environment
3235
variable `OUTPUT_MODE` allows you to modify this behavior by setting it to one of
3336
the following values:
@@ -50,7 +53,7 @@ the following values:
5053
written to on disk.
5154

5255
```bash
53-
CONTRACT_ADDRESSES_PATH=deployments/artifact.json \
56+
CONTRACT_ADDRESSES_PATH=<CONTRACT_ADDRESSES_PATH> \
5457
DEPLOY_CONFIG_PATH=<PATH_TO_MY_DEPLOY_CONFIG> \
5558
STATE_DUMP_PATH=<PATH_TO_WRITE_L2_ALLOCS> \
5659
forge script scripts/L2Genesis.s.sol:L2Genesis \
@@ -59,14 +62,17 @@ STATE_DUMP_PATH=<PATH_TO_WRITE_L2_ALLOCS> \
5962

6063
## Subcommand (op-node genesis l2)
6164

62-
Historically, the genesis file creation was handled by the `genesis l2`
65+
The genesis file creation is handled by the `genesis l2`
6366
subcommand, provided by the `op-node`. The following is an example of its usage
64-
from [v1.7.6](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.6).
67+
from [v1.7.6](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.6) --
68+
note that you need to pass the path to the l2 genesis state dump file output by
69+
the foundry script above:
6570

6671
```bash
6772
go run cmd/main.go genesis l2 \
6873
--deploy-config=<Path to deploy config file> \
69-
--l1-deployments value=<Path to L1 deployments JSON file as in superchain-registry> \
74+
--l1-deployments=<Path to L1 deployments JSON file as in superchain-registry> \
75+
--l2-allocs=<Path to L2 genesis state dump> \
7076
--outfile.l2=<Path to L2 genesis output file: i.e. ./genesis.json> \
7177
--outfile.rollup=<Path to rollup output file: i.e. ./rollup.json> \
7278
--l1-rpc=<RPC URL for an Ethereum L1 node. Cannot be used with --l1-starting-bloc>>
@@ -80,5 +86,6 @@ with `--l1-rpc`.
8086
## Next Steps
8187

8288
* Learn how to [initialize](/builders/node-operators/configuration/base-config#initialization-via-genesis-file)
83-
`op-geth` with your genesis file
89+
`op-geth` with your `genesis.json` file.
90+
* Learn how to [initialize](https://docs.optimism.io/builders/node-operators/configuration/base-config#configuring-op-node) `op-node` with your `rollup.json` file.
8491
* Learn more about the off chain [architecture](/builders/chain-operators/architecture).

0 commit comments

Comments
 (0)