Skip to content

Conversation

@0xniha
Copy link

@0xniha 0xniha commented Oct 17, 2025

Description

Inconsistency between standard chain validation and genesis deployment requirements in op-deployer. The standard intent type (configType = "standard") validation rejects superchain roles, but the genesis deployment target requires them. This makes it impossible to deploy a standard chain using the genesis target.

Steps to Reproduce

  1. Install op-deployer following the guide: op-deployer/book/src/user-guide/installation.md

  2. Initialize a standard chain configuration.

    e.g:

    op-deployer init \
    --l1-chain-id 1 \
    --l2-chain-ids 10 \
    --outdir ./test-standard \
    --intent-type standard
  3. Specify configuration on ./test-standard/intent.toml.

    e.g:

    configType = "standard"
    l1ChainID = 1
    opcmAddress = "0x8123739C1368C2DEDc8C564255bc417FEEeBFF9D"
    fundDevAccounts = false
    l1ContractsLocator = "embedded"
    l2ContractsLocator = "embedded"
    
     [[chains]]
     id = "0x000000000000000000000000000000000000000000000000000000000000000a"
     baseFeeVaultRecipient = "0x0000000000000000000000000000000000000005"
     l1FeeVaultRecipient = "0x0000000000000000000000000000000000000006"
     sequencerFeeVaultRecipient = "0x0000000000000000000000000000000000000007"
     eip1559DenominatorCanyon = 250
     eip1559Denominator = 50
     eip1559Elasticity = 6
     gasLimit = 60000000
     operatorFeeScalar = 0
     operatorFeeConstant = 0
     minBaseFee = 0
     [chains.roles]
     l1ProxyAdminOwner = "0x5a0aae59d09fccbddb6c6cceb07b7279367c3d2a"
     l2ProxyAdminOwner = "0x6b1bae59d09fccbddb6c6cceb07b7279367c4e3b"
     systemConfigOwner = "0x0000000000000000000000000000000000000001"
     unsafeBlockSigner = "0x0000000000000000000000000000000000000002"
     batcher = "0x0000000000000000000000000000000000000003"
     proposer = "0x0000000000000000000000000000000000000004"
     challenger = "0x9ba6e03d8b90de867373db8cf1a58d2f7f006b3a"
    
  4. Attempt to deploy using genesis target:

    op-deployer apply --workdir ./test-standard --deployment-target genesis
  5. Observe error: "superchain roles must be set for genesis strategy"

  6. Add superchain roles to intent.toml:

    [superchainRoles]
    SuperchainProxyAdminOwner = "0x5a0aae59d09fccbddb6c6cceb07b7279367c3d2a"
    SuperchainGuardian = "0x0000000000000000000000000000000000000009"
    ProtocolVersionsOwner = "0x000000000000000000000000000000000000000b"
    Challenger = "0x9ba6e03d8b90de867373db8cf1a58d2f7f006b3a"
  7. Observe new error: "chain contains incompatible config value"

Expected behavior

Should be able to deploy a standard chain using the genesis target without configuration conflicts. The validation rules should be consistent between deployment targets and intent types.

Additional context

The issue stems from conflicting validations in:

  1. pipeline/init.go: InitGenesisStrategy requires superchain roles for genesis deployment.

    if intent.SuperchainRoles == nil {
        return fmt.Errorf("superchain roles must be set for genesis strategy")
    }
  2. state/intent.go: validateStandardValues rejects superchain roles for standard intent type.

    if c.SuperchainRoles != nil {
        return ErrIncompatibleValue
    }

Proposed Solution

Remove the superchain roles validation for standard intent type in state/intent.go.

The pipeline/init.go check remains as the superchain roles are required for executing DeploySuperchain function.

Note: This change only affects the genesis deployment target. The live deployment target (InitLiveStrategy) is unaffected because:

  1. For standard intent type, validateStandardValues requires OPCM address to be set.

  2. When OPCM address is set, InitLiveStrategy requires SuperchainRoles to be set too:

if hasPredeployedOPCM {
   //...
   if intent.SuperchainRoles != nil {
   return fmt.Errorf("cannot set superchain roles for predeployed OPCM")
   }
}

@0xniha 0xniha requested a review from a team as a code owner October 17, 2025 15:38
@0xniha 0xniha requested a review from tynes October 17, 2025 15:38
@tynes
Copy link
Contributor

tynes commented Oct 17, 2025

/ci authorize 6d98183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants