Skip to content

Commit

Permalink
Merge pull request #6430 from ethereum-optimism/feat/cleanup-default-…
Browse files Browse the repository at this point in the history
…gaslimit

op-chain-ops: cleanup default gas limit
  • Loading branch information
OptimismBot committed Jul 25, 2023
2 parents a19535e + 494d517 commit 0ecda15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions op-chain-ops/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/ethereum/go-ethereum/params"
)

// defaultL2GasLimit represents the default gas limit for an L2 block.
const defaultL2GasLimit = 30_000_000
// defaultGasLimit represents the default gas limit for a genesis block.
const defaultGasLimit = 30_000_000

// BedrockTransitionBlockExtraData represents the default extra data for the bedrock transition block.
var BedrockTransitionBlockExtraData = []byte("BEDROCK")
Expand Down Expand Up @@ -66,7 +66,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro

gasLimit := config.L2GenesisBlockGasLimit
if gasLimit == 0 {
gasLimit = defaultL2GasLimit
gasLimit = defaultGasLimit
}
baseFee := config.L2GenesisBlockBaseFeePerGas
if baseFee == nil {
Expand Down Expand Up @@ -144,7 +144,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {

gasLimit := config.L1GenesisBlockGasLimit
if gasLimit == 0 {
gasLimit = 15_000_000
gasLimit = defaultGasLimit
}
baseFee := config.L1GenesisBlockBaseFeePerGas
if baseFee == nil {
Expand Down
4 changes: 2 additions & 2 deletions op-chain-ops/genesis/layer_one.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
}
gasLimit := uint64(config.L2GenesisBlockGasLimit)
if gasLimit == 0 {
gasLimit = defaultL2GasLimit
gasLimit = defaultGasLimit
}

data, err = sysCfgABI.Pack(
Expand Down Expand Up @@ -298,7 +298,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
}
gasLimit := uint64(config.L2GenesisBlockGasLimit)
if gasLimit == 0 {
gasLimit = defaultL2GasLimit
gasLimit = defaultGasLimit
}

constructors = append(constructors, []deployer.Constructor{
Expand Down

0 comments on commit 0ecda15

Please sign in to comment.