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
bee9147d
Unverified
Commit
bee9147d
authored
Jan 06, 2023
by
mergify[bot]
Committed by
GitHub
Jan 06, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into clabby/e2e/actions-ci
parents
43f92b9d
db23be2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
21 deletions
+49
-21
config.yml
.circleci/config.yml
+35
-15
check.go
op-chain-ops/genesis/check.go
+2
-2
db_migration.go
op-chain-ops/genesis/db_migration.go
+12
-4
No files found.
.circleci/config.yml
View file @
bee9147d
...
...
@@ -109,11 +109,11 @@ jobs:
registry
:
description
:
Docker registry
type
:
string
default
:
"
us-
central1-
docker.pkg.dev"
default
:
"
us-docker.pkg.dev"
repo
:
description
:
Docker repo
type
:
string
default
:
"
bedrock-goerli-development
/images"
default
:
"
oplabs-tools-artifacts
/images"
machine
:
image
:
ubuntu-2204:2022.07.1
resource_class
:
xlarge
...
...
@@ -157,11 +157,11 @@ jobs:
registry
:
description
:
Docker registry
type
:
string
default
:
"
us-
central1-
docker.pkg.dev"
default
:
"
us-docker.pkg.dev"
repo
:
description
:
Docker repo
type
:
string
default
:
"
bedrock-goerli-development
/images"
default
:
"
oplabs-tools-artifacts
/images"
machine
:
image
:
ubuntu-2204:2022.07.1
resource_class
:
xlarge
...
...
@@ -194,11 +194,11 @@ jobs:
registry
:
description
:
Docker registry
type
:
string
default
:
"
us-
central1-
docker.pkg.dev"
default
:
"
us-docker.pkg.dev"
repo
:
description
:
Docker repo
type
:
string
default
:
"
bedrock-goerli-development
/images"
default
:
"
oplabs-tools-artifacts
/images"
docker
:
-
image
:
cimg/python:3.7
resource_class
:
small
...
...
@@ -991,7 +991,7 @@ workflows:
docker_name
:
op-node
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-node-docker-build
-
docker-build
:
...
...
@@ -1005,7 +1005,7 @@ workflows:
docker_name
:
op-batcher
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-batcher-docker-build
-
docker-build
:
...
...
@@ -1019,7 +1019,7 @@ workflows:
docker_name
:
op-proposer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-proposer-docker-build
-
docker-build
:
...
...
@@ -1033,7 +1033,7 @@ workflows:
docker_name
:
op-heartbeat
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-heartbeat-docker-build
-
hive-test
:
...
...
@@ -1064,6 +1064,11 @@ workflows:
jobs
:
-
docker-build
:
name
:
op-node-docker-build
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_file
:
op-node/Dockerfile
docker_name
:
op-node
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
...
...
@@ -1073,11 +1078,16 @@ workflows:
docker_name
:
op-node
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-node-docker-build
-
docker-build
:
name
:
op-batcher-docker-build
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_file
:
op-batcher/Dockerfile
docker_name
:
op-batcher
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
...
...
@@ -1087,11 +1097,16 @@ workflows:
docker_name
:
op-batcher
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-batcher-docker-build
-
docker-build
:
name
:
op-proposer-docker-build
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_file
:
op-proposer/Dockerfile
docker_name
:
op-proposer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
...
...
@@ -1101,11 +1116,16 @@ workflows:
docker_name
:
op-proposer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-proposer-docker-build
-
docker-build
:
name
:
op-migrate-docker-build
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_file
:
op-chain-ops/Dockerfile
docker_name
:
op-migrate
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
...
...
@@ -1115,7 +1135,7 @@ workflows:
docker_name
:
op-migrate
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
gcr
-
oplabs-
gcr
requires
:
-
op-migrate-docker-build
-
docker-tag-op-stack-release
:
...
...
@@ -1130,4 +1150,4 @@ workflows:
-
op-proposer-docker-publish
-
op-batcher-docker-publish
context
:
-
gcr-release
-
oplabs-
gcr-release
op-chain-ops/genesis/check.go
View file @
bee9147d
...
...
@@ -51,8 +51,8 @@ func PostCheckMigratedDB(ldb ethdb.Database, migrationData migration.MigrationDa
header
:=
rawdb
.
ReadHeader
(
ldb
,
hash
,
*
num
)
log
.
Info
(
"Read header from database"
,
"number"
,
*
num
)
if
!
bytes
.
Equal
(
header
.
Extra
,
b
edrockTransitionBlockExtraData
)
{
return
fmt
.
Errorf
(
"expected extra data to be %x, but got %x"
,
b
edrockTransitionBlockExtraData
,
header
.
Extra
)
if
!
bytes
.
Equal
(
header
.
Extra
,
B
edrockTransitionBlockExtraData
)
{
return
fmt
.
Errorf
(
"expected extra data to be %x, but got %x"
,
B
edrockTransitionBlockExtraData
,
header
.
Extra
)
}
prevHeader
:=
rawdb
.
ReadHeader
(
ldb
,
header
.
ParentHash
,
*
num
-
1
)
...
...
op-chain-ops/genesis/db_migration.go
View file @
bee9147d
...
...
@@ -20,8 +20,11 @@ import (
)
var
(
abiTrue
=
common
.
Hash
{
31
:
0x01
}
bedrockTransitionBlockExtraData
=
[]
byte
(
"BEDROCK"
)
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"
)
)
type
MigrationResult
struct
{
...
...
@@ -42,7 +45,7 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m
header
:=
rawdb
.
ReadHeader
(
ldb
,
hash
,
*
num
)
log
.
Info
(
"Read header from database"
,
"number"
,
*
num
)
if
bytes
.
Equal
(
header
.
Extra
,
b
edrockTransitionBlockExtraData
)
{
if
bytes
.
Equal
(
header
.
Extra
,
B
edrockTransitionBlockExtraData
)
{
log
.
Info
(
"Detected migration already happened"
,
"root"
,
header
.
Root
,
"blockhash"
,
header
.
Hash
())
return
&
MigrationResult
{
...
...
@@ -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
(),
...
...
@@ -157,7 +165,7 @@ func MigrateDB(ldb ethdb.Database, config *DeployConfig, l1Block *types.Block, m
GasLimit
:
(
uint64
)(
config
.
L2GenesisBlockGasLimit
),
GasUsed
:
gasUsed
,
Time
:
uint64
(
config
.
L2OutputOracleStartingTimestamp
),
Extra
:
b
edrockTransitionBlockExtraData
,
Extra
:
B
edrockTransitionBlockExtraData
,
MixDigest
:
common
.
Hash
{},
Nonce
:
types
.
BlockNonce
{},
BaseFee
:
big
.
NewInt
(
params
.
InitialBaseFee
),
...
...
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