Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pages/builders/app-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@ If you're a developer looking to build on OP Mainnet, you've come to the right p
<Card title="Transactions" href="/builders/app-developers/transactions" />

<Card title="Tutorials" href="/builders/app-developers/tutorials" />

<Card title="Getting started developing for OP Stack chains" href="/builders/app-developers/getting-started" />
<Card title="Testing apps for OP Stack chains" href="/builders/app-developers/testing-apps" />
</Cards>
48 changes: 22 additions & 26 deletions pages/builders/chain-operators/deploy/genesis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Callout } from 'nextra/components'
# OP Stack genesis creation

<Callout type="info">
The recommended way to generate genesis and rollup configuration files is using `op-deployer`.
The recommended way to generate genesis and rollup configuration files is using `op-deployer`.
This ensures standardization and compatibility with the Superchain.
</Callout>

Expand All @@ -18,31 +18,28 @@ These files are crucial for initializing the execution client (`op-geth`) and co

The recommended flow for creating a genesis file and rollup configuration file on the OP Stack is as follows:

1. **Deploy the L1 contracts** using [op-deployer](/builders/chain-operators/tools/op-deployer).
2. **Generate** both the L2 genesis file (`genesis.json`) and the rollup configuration file (`rollup.json`) using op-deployer's `inspect` commands.
3. **Initialize** your off-chain components (e.g., execution client, consensus client).
1. **Deploy the L1 contracts** using [op-deployer](/builders/chain-operators/tools/op-deployer).
2. **Generate** both the L2 genesis file (`genesis.json`) and the rollup configuration file (`rollup.json`) using op-deployers `inspect` commands.
3. **Initialize** your off-chain components (e.g., execution client, consensus client).

## Recommended method: using op-deployer

### Prerequisites

1. You have installed the `op-deployer` binary following the instructions in [deployer docs](/builders/chain-operators/tools/op-deployer#installation).
After installation, extract the `op-deployer` into your `PATH` and `cd op-deployer`.

2. You have created and customized an intent file in a `.deployer` directory, typically by running:

```bash
./bin/op-deployer init --l1-chain-id <YOUR_L1_CHAIN_ID> --l2-chain-ids <YOUR_L2_CHAIN_ID> --workdir .deployer
1. You have installed the `op-deployer` binary following the instructions in [deployer docs](/builders/chain-operators/tools/op-deployer#installation).
After installation, extract the `op-deployer` into your `PATH` and `cd op-deployer`.
2. You have created and customized an intent file in a `.deployer` directory, typically by running:
```bash
./bin/op-deployer init --l1-chain-id <YOUR_L1_CHAIN_ID> --l2-chain-ids <YOUR_L2_CHAIN_ID> --workdir .deployer
```

Replace `<YOUR_L1_CHAIN_ID>` and `<YOUR_L2_CHAIN_ID>` with their respective values, see a list of [`chainIds`](https://chainid.network/).

3. You have edited that intent file to your liking (roles, addresses, etc.).
3. You have edited that intent file to your liking (roles, addresses, etc.).

### Step 1: Deploy the L1 contracts

To deploy your chain to L1, run:

```bash
./bin/op-deployer apply --workdir .deployer \
--l1-rpc-url <RPC_URL_FOR_L1> \
Expand All @@ -51,39 +48,38 @@ To deploy your chain to L1, run:

This command:

* Reads your intent file in `.deployer/.`
* Deploys the OP Stack contracts to the specified L1.
* Updates a local `state.json` file with the results of the deployment.
* Reads your intent file in `.deployer/.`
* Deploys the OP Stack contracts to the specified L1.
* Updates a local `state.json` file with the results of the deployment.

### Step 2: Generate your L2 genesis file and rollup file

After your L1 contracts have been deployed, generate the L2 genesis and rollup configuration files by inspecting the deployer's `state.json.`

After your L1 contracts have been deployed, generate the L2 genesis and rollup configuration files by inspecting the deployer’s `state.json.`
```bash
./bin/op-deployer inspect genesis --workdir .deployer <L2_CHAIN_ID> > .deployer/genesis.json
./bin/op-deployer inspect rollup --workdir .deployer <L2_CHAIN_ID> > .deployer/rollup.json
```

* genesis.json is the file you will provide to your execution client (e.g. op-geth).
* rollup.json is the file you will provide to your consensus client (e.g. op-node).
* genesis.json is the file you will provide to your execution client (e.g. op-geth).
* rollup.json is the file you will provide to your consensus client (e.g. op-node).

### Step 3: Initialize your off-chain components

Once you have `genesis.json` and `rollup.json`:

1. Initialize op-geth using genesis.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](/builders/chain-operators/architecture).
1. Initialize op-geth using genesis.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](/builders/chain-operators/architecture).

### Step 3: Get data

Now that you have your `genesis.json` and `rollup.json` you can spin up a node on your network.
You can also use the following inspect subcommands to get additional data:

````bash
```bash
./bin/op-deployer inspect l1 --workdir .deployer <l2-chain-id> # outputs all L1 contract addresses for an L2 chain
./bin/op-deployer inspect deploy-config --workdir .deployer <l2-chain-id> # outputs the deploy config for an L2 chain
```


## Legacy method: using foundry script

Expand Down Expand Up @@ -147,7 +143,7 @@ DEPLOY_CONFIG_PATH=<PATH_TO_MY_DEPLOY_CONFIG> \
STATE_DUMP_PATH=<PATH_TO_WRITE_L2_ALLOCS> \
forge script scripts/L2Genesis.s.sol:L2Genesis \
--sig 'runWithStateDump()'
````
```

## Subcommand (op-node genesis l2)

Expand Down
3 changes: 0 additions & 3 deletions pages/stack/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ Documentation covering Faq, Pause in the Security section of the OP Stack ecosys
<Card title="Pausing the bridge" href="/stack/security/pause" />

<Card title="Audit report" href="/stack/security/audits-report" />

<Card title="OP Stack security model" href="/stack/security/faq-sec-model" />
<Card title="Security policy and bug bounty program" href="/stack/security/security-policy" />
</Cards>