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:
- Standardization - Your chain adheres to the Superchain standards
- Interoperability - Your chain will properly interact with other Superchain components
- Security - Your deployment follows best practices and security guidelines
- Upgradeability - Your chain can receive future protocol upgrades
Prerequisites
- Completed deployment of L1 smart contracts using op-deployer.
- Generated genesis and rollup files.
- op-validator installed.
Validation process
Install op-validator
If you haven't already installed op-validator, follow the installation instructions.
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:
# 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:
./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:
./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:
- Understand the errors - Review the error codes and descriptions.
- Consider redeployment - For critical issues, redeploying with corrected parameters may be necessary.
Next Steps
- If you plan to join the Superchain, follow the Standard Rollup Charter.
- Configure monitoring and maintenance