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
1932d2e5
Commit
1932d2e5
authored
Jan 06, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-chain-ops: transition block extradata check
parent
1f258d90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
db_migration.go
op-chain-ops/genesis/db_migration.go
+9
-1
No files found.
op-chain-ops/genesis/db_migration.go
View file @
1932d2e5
...
...
@@ -20,7 +20,10 @@ import (
)
var
(
abiTrue
=
common
.
Hash
{
31
:
0x01
}
abiTrue
=
common
.
Hash
{
31
:
0x01
}
// BedrockTransitionBlockExtraData represents the extradata
// set in the very first bedrock block. This value must be
// less than 32 bytes long or it will create an invalid block.
BedrockTransitionBlockExtraData
=
[]
byte
(
"BEDROCK"
)
)
...
...
@@ -143,6 +146,11 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m
// Set the amount of gas used so that EIP 1559 starts off stable
gasUsed
:=
(
uint64
)(
config
.
L2GenesisBlockGasLimit
)
*
config
.
EIP1559Elasticity
// Ensure that the extradata is valid
if
size
:=
len
(
BedrockTransitionBlockExtraData
);
size
>
32
{
return
nil
,
fmt
.
Errorf
(
"transition block extradata too long: %d"
,
size
)
}
// Create the bedrock transition block
bedrockHeader
:=
&
types
.
Header
{
ParentHash
:
header
.
Hash
(),
...
...
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