Commit 16a82b98 authored by Mark Tyneway's avatar Mark Tyneway

op-chain-ops: cleanup default gas limit

Use a single default value for when configuring the genesis
value of the block gas limit for both L1 and L2 when it is not
set in the deploy config. The value defaults to 30 million when
it is not explicitly set.

This PR is slowly moving changes out of https://github.com/ethereum-optimism/optimism/pull/6123
into their own smaller PRs so that they can be merged in independently
of the final functionality.
parent a19535eb
......@@ -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")
......@@ -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 {
......@@ -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 {
......
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