Skip to content
Merged
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
1 change: 1 addition & 0 deletions pages/operators/chain-operators/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This section provides information on chain monitoring options, deploying a block
<Card title="Chain monitoring options" href="/operators/chain-operators/tools/chain-monitoring" />
<Card title="Fjord fee parameter calculator" href="/operators/chain-operators/tools/fee-calculator" />
<Card title="Deploying a block explorer" href="/operators/chain-operators/tools/explorer" />
<Card title="Validating a Standard OP Stack chain" href="/operators/chain-operators/tools/op-validator" />
<Card title="How to configure challenger for your chain" href="/operators/chain-operators/tools/op-challenger" />
<Card title="Conductor" href="/operators/chain-operators/tools/op-conductor" />

Expand Down
1 change: 1 addition & 0 deletions pages/operators/chain-operators/tools/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"op-challenger": "op-challenger",
"op-conductor": "op-conductor",
"op-deployer": "op-deployer",
"op-validator": "op-validator",
"op-txproxy": "op-txproxy",
"proxyd": "proxyd",
"fee-calculator": "Fee calculator"
Expand Down
115 changes: 115 additions & 0 deletions pages/operators/chain-operators/tools/op-validator.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: op-validator
description: Learn how to use op-validator to validate chain configurations and deployments.
lang: en-US
content_type: tutorial
topic: op-validator
personas:
- chain-operator
- protocol-developer
categories:
- tools
- op-validator
is_imported_content: 'false'
---

import {Callout, Steps} from 'nextra/components'

# op-validator

<Callout type="info">
Currently, `op-validator` is only available on Sepolia networks.
</Callout>

The `op-validator` is a tool for validating Standard OP Stack chain configurations and deployments to ensure they're in compliance with the [Standard Rollup Charter](/superchain/blockspace-charter#the-standard-rollup-charter). It works by calling into the `StandardValidator` smart contracts (`StandardValidatorV180` and `StandardValidatorV200`). These then perform a set of checks, and return error codes for any issues found.

These checks include:

* Contract implementations and versions
* Proxy configurations
* System parameters
* Cross-component relationships
* Security settings

## How to use op-validator

<Steps>
### Clone the monorepo

```bash
git clone https://github.com/ethereum-optimism/optimism.git
```

### Build the `op-validator` binary

```bash
cd optimism/op-validator
just build
```

### Run the `op-validator` binary

```bash
./bin/op-validator validate v1.8.0 \
--l1-rpc-url "https://ethereum-sepolia-rpc.publicnode.com" \
--absolute-prestate "0x03f89406817db1ed7fd8b31e13300444652cdb0b9c509a674de43483b2f83568" \
--proxy-admin "0x189aBAAaa82DfC015A588A7dbaD6F13b1D3485Bc" \
--system-config "0x034edD2A225f7f429A63E0f1D2084B9E0A93b538" \
--l2-chain-id "11155420" \
--fail
```

### Understanding the output

In the previous command, we provided a non-standard absolute prestate. The `op-validator` returned the following output to describe the discrepancies between the provided absolute prestate and the expected prestate in the L1 smart contracts:

```
| ERROR | DESCRIPTION |
|-----------------|--------------------------------|
| PDDG-40 | Permissioned dispute game |
| | absolute prestate mismatch |
| PDDG-ANCHORP-40 | Permissioned dispute game |
| | anchor state registry root |
| | hash mismatch |
| PLDG-40 | Permissionless dispute game |
| | absolute prestate mismatch |
| PLDG-ANCHORP-40 | Permissionless dispute game |
| | anchor state registry root |
| | hash mismatch |

Validation errors found
```
</Steps>

## Usage

The validator supports different protocol versions through subcommands:

```bash
op-validator validate [version] [flags]
```

Choose a version based on your `op-contracts` version:

* `v1.8.0` - For validating `op-contracts/1.8.0`
* `v2.0.0` - For validating `op-contracts/2.0.0`

### Flags

| Option | Description | Required/Optional |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| `--l1-rpc-url` | L1 RPC URL (can also be set via `L1_RPC_URL` environment variable) | Required |
| `--absolute-prestate` | Absolute prestate as hex string | Required |
| `--proxy-admin` | Proxy admin address as hex string. This should be a specific chain's proxy admin contract on L1. It is not the proxy admin owner or the superchain proxy admin. | Required |
| `--system-config` | System config proxy address as hex string | Required |
| `--l2-chain-id` | L2 chain ID | Required |
| `--fail` | Exit with non-zero code if validation errors are found (defaults to true) | Optional |

### Example

```bash
op-validator validate v2.0.0 \
--l1-rpc-url "L1_RPC_URL" \
--absolute-prestate "0x1234..." \
--proxy-admin "0xabcd..." \
```
9 changes: 6 additions & 3 deletions pages/superchain/standard-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,15 @@ The [Superchain Registry](/superchain/superchain-registry) is the authoritative
Familiarize yourself with the [OP Stack specifications](https://specs.optimism.io/protocol/configurability.html) and the Blockspace Charter.

2. **Use op-deployer:**
Leverage op-deployer to ensure your chain aligns with standard configurations.
Leverage [op-deployer](/operators/chain-operators/tools/op-deployer) to ensure your chain aligns with standard configurations.

3. **Seek guidance:**
3. **Verify deployment with op-validator:**
Use [op-validator](/operators/chain-operators/tools/op-validator) to verify your chain's deployment.

4. **Seek guidance:**
Consult the [developer support](https://github.com/ethereum-optimism/developers/discussions) team for clarifications on standardization.

4. **Contribute to the ecosystem:**
5. **Contribute to the ecosystem:**
Engage with the [Optimism Collective](https://community.optimism.io/) to share feedback and propose improvements.

## References
Expand Down
1 change: 1 addition & 0 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ETHERBASE
etherbase
Ethernity
Ethernow
ethpandaops
ETHSTATS
ethstats
EVMTIMEOUT
Expand Down