Skip to content

Guide for validating OP Stack deployments with op-validator #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 2025
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
2 changes: 2 additions & 0 deletions pages/operators/chain-operators/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ This section provides information on OP Stack genesis creation, deployment overv
<Card title="Op stack deployment overview" href="/operators/chain-operators/deploy/overview" />

<Card title="Op stack smart contract deployment" href="/operators/chain-operators/deploy/smart-contracts" />

<Card title="Learn how to validate your OP Stack deployment using op-validator" href="/operators/chain-operators/deploy/validate-deployment" />
</Cards>
3 changes: 2 additions & 1 deletion pages/operators/chain-operators/deploy/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"overview": "Overview",
"smart-contracts": "Contract deployment",
"genesis": "Genesis creation"
"genesis": "Genesis creation",
"validate-deployment": "Validate contract deployment"
}

128 changes: 128 additions & 0 deletions pages/operators/chain-operators/deploy/validate-deployment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
title: Validating your OP Stack deployment
lang: en-US
description: Learn how to validate your OP Stack deployment using op-validator
content_type: guide
topic: deployment-validation
personas:
- chain-operator
categories:
- standardization
- validation
- op-validator
- chain-deployment
- rollup-configuration
- genesis-configuration
- deployment-configuration
is_imported_content: 'false'
---

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

# Overview

After deploying the L1 smart contracts for your OP Stack chain, it's crucial to verify that your deployment conforms to the standard configuration.
This guide walks you through using `op-validator` to validate your deployment against the Superchain standard.

## Why validate your deployment?

Validating your deployment ensures:

1. **Standardization** - Your chain adheres to the Superchain standards
2. **Interoperability** - Your chain will properly interact with other Superchain components
3. **Security** - Your deployment follows best practices and security guidelines
4. **Upgradeability** - Your chain can receive future protocol upgrades

## Prerequisites

* Completed deployment of L1 smart contracts using [op-deployer](/operators/chain-operators/deploy/smart-contracts).
* Generated [genesis and rollup](/operators/chain-operators/deploy/genesis) files.
* [op-validator](/operators/chain-operators/tools/op-validator) installed.

## Validation process

<Steps>
### Install op-validator

If you haven't already installed op-validator, follow the [installation instructions](/operators/chain-operators/tools/op-validator#installation).

### Gather required information

You'll need the following information to validate your deployment:

* **L1 RPC URL:** A reliable RPC endpoint for your L1 network
* **Absolute prestate:** The absolute prestate hash of your deployment
* **Proxy admin address:** Your chain's proxy admin contract address (not the proxy admin owner)
* **System config address:** Your chain's SystemConfig contract address
* **L2 chain ID:** The chain ID of your L2 network

With op-deployer, you can retrieve some of this information with:

```bash
# Get deployment information
op-deployer inspect l1 --workdir .deployer <l2-chain-id>

# For the absolute prestate
op-deployer inspect prestates --workdir .deployer <l2-chain-id>
```

### Run validation for your contract version

Run the op-validator with the appropriate version parameter matching your deployed contracts:

**For op-contracts v1.8.0:**

```bash
./bin/op-validator validate v1.8.0 \
--l1-rpc-url "<YOUR_L1_RPC_URL>" \
--absolute-prestate "<YOUR_ABSOLUTE_PRESTATE>" \
--proxy-admin "<YOUR_PROXY_ADMIN_ADDRESS>" \
--system-config "<YOUR_SYSTEM_CONFIG_ADDRESS>" \
--l2-chain-id "<YOUR_L2_CHAIN_ID>" \
--fail
```

**For op-contracts v2.0.0:**

```bash
./bin/op-validator validate v2.0.0 \
--l1-rpc-url "<YOUR_L1_RPC_URL>" \
--absolute-prestate "<YOUR_ABSOLUTE_PRESTATE>" \
--proxy-admin "<YOUR_PROXY_ADMIN_ADDRESS>" \
--system-config "<YOUR_SYSTEM_CONFIG_ADDRESS>" \
--l2-chain-id "<YOUR_L2_CHAIN_ID>" \
--fail
```

### Review the validation results

The validator will check multiple aspects of your deployment against the standard configuration:

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

If validation passes, you'll see a success message. If there are issues, you'll see error codes with descriptions like:

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

### Address any validation errors

If your deployment has validation errors:

1. Understand the errors - Review the error codes and descriptions.
2. Consider redeployment - For critical issues, redeploying with corrected parameters may be necessary.
</Steps>

## Next Steps

* If you plan to join the Superchain, follow the [Standard Rollup Charter](/superchain/blockspace-charter).
* Configure [monitoring and maintenance](/operators/chain-operators/tools/chain-monitoring)
2 changes: 2 additions & 0 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ alphanet
Alphanets
alphanets
altda
ANCHORP
ANDI
Ankr
Apeworx
Expand Down Expand Up @@ -276,6 +277,7 @@ opstack
outfile
Pausability
pcscdpath
PDDG
Pectra
pectra
Pectra's
Expand Down