diff --git a/pages/operators/chain-operators/deploy/genesis.mdx b/pages/operators/chain-operators/deploy/genesis.mdx index e29b79b2c..1ae29e717 100644 --- a/pages/operators/chain-operators/deploy/genesis.mdx +++ b/pages/operators/chain-operators/deploy/genesis.mdx @@ -89,88 +89,6 @@ Once you have `genesis.json` and `rollup.json`: 2. Configure op-node with rollup.json. 3. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/operators/chain-operators/architecture). -## Legacy method: using foundry script - -The following guide shows you how to generate the L2 genesis file `genesis.json`. This is a JSON -file that represents the L2 genesis. You will provide this file to the -execution client (op-geth) to initialize your network. There is also the rollup configuration file, `rollup.json`, which will be -provided to the consensus client (op-node). - - - The following genesis creation information is the legacy method for creating OP Stack configuration files. - This method is not recommended. It's preserved here for historical context. - - - -### Solidity script (Legacy) - -You can also use the foundry script -located in the monorepo to generate an "L2 state dump" and then pass this into the op-node genesis subcommand. -The foundry script can be found at -[packages/contracts-bedrock/scripts/L2Genesis.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/L2Genesis.s.sol). - - -When generating the genesis file, please use the same `op-contracts/vX.Y.Z` release commit used for L1 contract deployments. - - -### Configuration - -Create or modify a file `.json` inside the `deploy-config` -folder in the monorepo. The script will read the latest active fork from the -deploy config and the L2 genesis allocs generated will be compatible with this -fork. The automatically detected fork can be overwritten by setting the -environment variable `FORK` either to the lower-case fork name (currently -`delta`, `ecotone`, or `fjord`) or to `latest`, which will select the latest fork -available (currently `fjord`). - -By default, the script will dump the L2 genesis allocs (aka "state dump") of the detected or -selected fork only, to the file at `STATE_DUMP_PATH`. The optional environment -variable `OUTPUT_MODE` allows you to modify this behavior by setting it to one of -the following values: - -* `latest` (default) - only dump the selected fork's allocs. -* `all` - also dump all intermediary fork's allocs. This only works if - `STATE_DUMP_PATH` is not set. In this case, all allocs will be written to files - `/state-dump-.json`. Another path cannot currently be specified for this - use case. -* `none` - won't dump any allocs. Only makes sense for internal test usage. - -### Creation - -* `CONTRACT_ADDRESSES_PATH` represents the deployment artifact that was - generated during a contract deployment. -* `DEPLOY_CONFIG_PATH` represents a path on the filesystem that points to a - deployment config. The same deploy config JSON file should be used for L1 contracts - deployment as when generating the L2 genesis allocs. -* `STATE_DUMP_PATH` represents the filepath at which the allocs will be - written to on disk. - -```bash -CONTRACT_ADDRESSES_PATH= \ -DEPLOY_CONFIG_PATH= \ -STATE_DUMP_PATH= \ - forge script scripts/L2Genesis.s.sol:L2Genesis \ - --sig 'runWithStateDump()' - ``` - -## Subcommand (op-node genesis l2) - -The genesis file creation is handled by the `genesis l2` -subcommand, provided by the `op-node`. The following is an example of its usage -from [v1.7.6](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.6) -- -note that you need to pass the path to the l2 genesis state dump file output by -the foundry script above: - -```bash -go run cmd/main.go genesis l2 \ - --deploy-config= \ - --l1-deployments= \ - --l2-allocs= \ - --outfile.l2= \ - --outfile.rollup= \ - --l1-rpc=> -``` - ## Next steps * Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file)