Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
9c4eeaaa
Unverified
Commit
9c4eeaaa
authored
Apr 06, 2023
by
OptimismBot
Committed by
GitHub
Apr 06, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5365 from ethereum-optimism/fix/better-gaslimit-checks
op-chain-ops: sanity check gas limit
parents
dd99bea7
4880f4b1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
config.go
op-chain-ops/genesis/config.go
+5
-0
genesis.go
op-chain-ops/genesis/genesis.go
+2
-1
mainnet.json
packages/contracts-bedrock/deploy-config/mainnet.json
+2
-2
mainnet.ts
packages/contracts-bedrock/deploy-config/mainnet.ts
+1
-1
No files found.
op-chain-ops/genesis/config.go
View file @
9c4eeaaa
...
...
@@ -208,6 +208,11 @@ func (d *DeployConfig) Check() error {
if
d
.
L2GenesisBlockGasLimit
==
0
{
return
fmt
.
Errorf
(
"%w: L2 genesis block gas limit cannot be 0"
,
ErrInvalidDeployConfig
)
}
// When the initial resource config is made to be configurable by the DeployConfig, ensure
// that this check is updated to use the values from the DeployConfig instead of the defaults.
if
uint64
(
d
.
L2GenesisBlockGasLimit
)
<
uint64
(
defaultResourceConfig
.
MaxResourceLimit
+
defaultResourceConfig
.
SystemTxMaxGas
)
{
return
fmt
.
Errorf
(
"%w: L2 genesis block gas limit is too small"
,
ErrInvalidDeployConfig
)
}
if
d
.
L2GenesisBlockBaseFeePerGas
==
nil
{
return
fmt
.
Errorf
(
"%w: L2 genesis block base fee per gas cannot be nil"
,
ErrInvalidDeployConfig
)
}
...
...
op-chain-ops/genesis/genesis.go
View file @
9c4eeaaa
...
...
@@ -15,7 +15,8 @@ import (
"github.com/ethereum/go-ethereum/params"
)
const
defaultL2GasLimit
=
15
_000_000
// defaultL2GasLimit represents the default gas limit for an L2 block.
const
defaultL2GasLimit
=
30
_000_000
// NewL2Genesis will create a new L2 genesis
func
NewL2Genesis
(
config
*
DeployConfig
,
block
*
types
.
Block
)
(
*
core
.
Genesis
,
error
)
{
...
...
packages/contracts-bedrock/deploy-config/mainnet.json
View file @
9c4eeaaa
...
...
@@ -25,7 +25,7 @@
"governanceTokenName"
:
"Optimism"
,
"governanceTokenSymbol"
:
"OP"
,
"governanceTokenOwner"
:
"0x90F79bf6EB2c4f870365E785982E1f101E93b906"
,
"l2GenesisBlockGasLimit"
:
"0x1
7D784
0"
,
"l2GenesisBlockGasLimit"
:
"0x1
c9c38
0"
,
"l2GenesisBlockCoinbase"
:
"0x4200000000000000000000000000000000000011"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x3b9aca00"
,
"gasPriceOracleOverhead"
:
2100
,
...
...
packages/contracts-bedrock/deploy-config/mainnet.ts
View file @
9c4eeaaa
...
...
@@ -37,7 +37,7 @@ const config: DeployConfig = {
governanceTokenSymbol
:
'
OP
'
,
governanceTokenOwner
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
l2GenesisBlockGasLimit
:
'
0x1
7D784
0
'
,
l2GenesisBlockGasLimit
:
'
0x1
c9c38
0
'
,
l2GenesisBlockCoinbase
:
'
0x4200000000000000000000000000000000000011
'
,
l2GenesisBlockBaseFeePerGas
:
'
0x3b9aca00
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment