Commit 1a24329e authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #4145 from ethereum-optimism/fix/deploy-config-validation

op-chain-ops: check for transition block config
parents 1743dba4 34584e10
......@@ -185,10 +185,16 @@ func (d *DeployConfig) Check() error {
return fmt.Errorf("%w: OptimismPortalProxy cannot be address(0)", ErrInvalidDeployConfig)
}
if d.EIP1559Denominator == 0 {
return fmt.Errorf("EIP1559Denominator cannot be 0")
return fmt.Errorf("%w: EIP1559Denominator cannot be 0", ErrInvalidDeployConfig)
}
if d.EIP1559Elasticity == 0 {
return fmt.Errorf("EIP1559Elasticity cannot be 0")
return fmt.Errorf("%w: EIP1559Elasticity cannot be 0", ErrInvalidDeployConfig)
}
if d.L2GenesisBlockGasLimit == 0 {
return fmt.Errorf("%w: L2 genesis block gas limit cannot be 0", ErrInvalidDeployConfig)
}
if d.L2GenesisBlockBaseFeePerGas == nil {
return fmt.Errorf("%w: L2 genesis block base fee per gas cannot be nil", ErrInvalidDeployConfig)
}
return nil
}
......
......@@ -2,7 +2,6 @@ package genesis
import (
"bytes"
"errors"
"fmt"
"math/big"
......@@ -54,10 +53,6 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m
}, nil
}
if config.L2GenesisBlockBaseFeePerGas == nil {
return nil, errors.New("must configure L2 genesis block base fee per gas")
}
// Ensure monotonic timestamps
if uint64(config.L2OutputOracleStartingTimestamp) <= header.Time {
return nil, fmt.Errorf(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment