Skip to content

Commit 09ab22f

Browse files
committed
remove legacy method
1 parent 6de0bae commit 09ab22f

File tree

1 file changed

+0
-82
lines changed

1 file changed

+0
-82
lines changed

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

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -89,88 +89,6 @@ Once you have `genesis.json` and `rollup.json`:
8989
2. Configure op-node with rollup.json.
9090
3. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/operators/chain-operators/architecture).
9191

92-
## Legacy method: using foundry script
93-
94-
The following guide shows you how to generate the L2 genesis file `genesis.json`. This is a JSON
95-
file that represents the L2 genesis. You will provide this file to the
96-
execution client (op-geth) to initialize your network. There is also the rollup configuration file, `rollup.json`, which will be
97-
provided to the consensus client (op-node).
98-
99-
<Callout type="warning">
100-
The following genesis creation information is the legacy method for creating OP Stack configuration files.
101-
This method is not recommended. It's preserved here for historical context.
102-
</Callout>
103-
104-
105-
### Solidity script (Legacy)
106-
107-
You can also use the foundry script
108-
located in the monorepo to generate an "L2 state dump" and then pass this into the op-node genesis subcommand.
109-
The foundry script can be found at
110-
[packages/contracts-bedrock/scripts/L2Genesis.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/L2Genesis.s.sol).
111-
112-
<Callout type="info">
113-
When generating the genesis file, please use the same `op-contracts/vX.Y.Z` release commit used for L1 contract deployments.
114-
</Callout>
115-
116-
### Configuration
117-
118-
Create or modify a file `<network-name>.json` inside the `deploy-config`
119-
folder in the monorepo. The script will read the latest active fork from the
120-
deploy config and the L2 genesis allocs generated will be compatible with this
121-
fork. The automatically detected fork can be overwritten by setting the
122-
environment variable `FORK` either to the lower-case fork name (currently
123-
`delta`, `ecotone`, or `fjord`) or to `latest`, which will select the latest fork
124-
available (currently `fjord`).
125-
126-
By default, the script will dump the L2 genesis allocs (aka "state dump") of the detected or
127-
selected fork only, to the file at `STATE_DUMP_PATH`. The optional environment
128-
variable `OUTPUT_MODE` allows you to modify this behavior by setting it to one of
129-
the following values:
130-
131-
* `latest` (default) - only dump the selected fork's allocs.
132-
* `all` - also dump all intermediary fork's allocs. This only works if
133-
`STATE_DUMP_PATH` is not set. In this case, all allocs will be written to files
134-
`/state-dump-<fork>.json`. Another path cannot currently be specified for this
135-
use case.
136-
* `none` - won't dump any allocs. Only makes sense for internal test usage.
137-
138-
### Creation
139-
140-
* `CONTRACT_ADDRESSES_PATH` represents the deployment artifact that was
141-
generated during a contract deployment.
142-
* `DEPLOY_CONFIG_PATH` represents a path on the filesystem that points to a
143-
deployment config. The same deploy config JSON file should be used for L1 contracts
144-
deployment as when generating the L2 genesis allocs.
145-
* `STATE_DUMP_PATH` represents the filepath at which the allocs will be
146-
written to on disk.
147-
148-
```bash
149-
CONTRACT_ADDRESSES_PATH=<CONTRACT_ADDRESSES_PATH> \
150-
DEPLOY_CONFIG_PATH=<PATH_TO_MY_DEPLOY_CONFIG> \
151-
STATE_DUMP_PATH=<PATH_TO_WRITE_L2_ALLOCS> \
152-
forge script scripts/L2Genesis.s.sol:L2Genesis \
153-
--sig 'runWithStateDump()'
154-
```
155-
156-
## Subcommand (op-node genesis l2)
157-
158-
The genesis file creation is handled by the `genesis l2`
159-
subcommand, provided by the `op-node`. The following is an example of its usage
160-
from [v1.7.6](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.6) --
161-
note that you need to pass the path to the l2 genesis state dump file output by
162-
the foundry script above:
163-
164-
```bash
165-
go run cmd/main.go genesis l2 \
166-
--deploy-config=<Path to deploy config file> \
167-
--l1-deployments=<Path to L1 deployments JSON file as in superchain-registry> \
168-
--l2-allocs=<Path to L2 genesis state dump> \
169-
--outfile.l2=<Path to L2 genesis output file: i.e. ./genesis.json> \
170-
--outfile.rollup=<Path to rollup output file: i.e. ./rollup.json> \
171-
--l1-rpc=<RPC URL for an Ethereum L1 node. Cannot be used with --l1-starting-block>>
172-
```
173-
17492
## Next steps
17593

17694
* Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file)

0 commit comments

Comments
 (0)