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
f7e13566
Commit
f7e13566
authored
Jul 13, 2022
by
Joshua Gutow
Committed by
Mark Tyneway
Jul 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devnet: Use later L2 timestamp for network
parent
eb0405cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
devnet-up.sh
ops-bedrock/devnet-up.sh
+1
-1
genesis-l2.ts
packages/contracts-bedrock/tasks/genesis-l2.ts
+7
-3
rollup-config.ts
packages/contracts-bedrock/tasks/rollup-config.ts
+2
-1
No files found.
ops-bedrock/devnet-up.sh
View file @
f7e13566
...
...
@@ -60,7 +60,7 @@ mkdir -p ./.devnet
if
[
!
-f
./.devnet/rollup.json
]
;
then
GENESIS_TIMESTAMP
=
$(
date
+%s | xargs
printf
"0x%x"
)
else
GENESIS_TIMESTAMP
=
$(
jq
'.
genesis.l2_time'
< .devnet/rollup
.json
)
GENESIS_TIMESTAMP
=
$(
jq
'.
timestamp'
< .devnet/genesis-l1
.json
)
fi
# Regenerate the L1 genesis file if necessary. The existence of the genesis
...
...
packages/contracts-bedrock/tasks/genesis-l2.ts
View file @
f7e13566
...
...
@@ -52,6 +52,7 @@ task('genesis-l2', 'create a genesis config')
'
The file to write the output JSON to
'
,
'
genesis.json
'
)
.
addOptionalParam
(
'
l1RpcUrl
'
,
'
The L1 RPC URL
'
,
'
http://127.0.0.1:8545
'
)
.
setAction
(
async
(
args
,
hre
)
=>
{
const
{
computeStorageSlots
,
...
...
@@ -60,6 +61,8 @@ task('genesis-l2', 'create a genesis config')
const
{
deployConfig
}
=
hre
const
l1
=
new
ethers
.
providers
.
StaticJsonRpcProvider
(
args
.
l1RpcUrl
)
// Use the addresses of the proxies here instead of the implementations
// Be backwards compatible
let
ProxyL1CrossDomainMessenger
=
await
hre
.
deployments
.
getOrNull
(
...
...
@@ -256,6 +259,9 @@ task('genesis-l2', 'create a genesis config')
}
}
const
portal
=
await
hre
.
deployments
.
get
(
'
OptimismPortalProxy
'
)
const
l1StartingBlock
=
await
l1
.
getBlock
(
portal
.
receipt
.
blockHash
)
const
genesis
:
OptimismGenesis
=
{
config
:
{
chainId
:
deployConfig
.
genesisBlockChainid
,
...
...
@@ -279,9 +285,7 @@ task('genesis-l2', 'create a genesis config')
},
nonce
:
'
0x1234
'
,
difficulty
:
'
0x1
'
,
timestamp
:
ethers
.
BigNumber
.
from
(
deployConfig
.
startingTimestamp
).
toHexString
(),
timestamp
:
ethers
.
BigNumber
.
from
(
l1StartingBlock
.
timestamp
).
toHexString
(),
gasLimit
:
deployConfig
.
genesisBlockGasLimit
,
extraData
:
deployConfig
.
genesisBlockExtradata
,
optimism
:
{
...
...
packages/contracts-bedrock/tasks/rollup-config.ts
View file @
f7e13566
...
...
@@ -21,6 +21,7 @@ task('rollup-config', 'create a genesis config')
const
l2Genesis
=
await
l2
.
getBlock
(
'
earliest
'
)
const
portal
=
await
hre
.
deployments
.
get
(
'
OptimismPortalProxy
'
)
const
l1StartingBlock
=
await
l1
.
getBlock
(
portal
.
receipt
.
blockHash
)
const
config
:
OpNodeConfig
=
{
genesis
:
{
...
...
@@ -32,7 +33,7 @@ task('rollup-config', 'create a genesis config')
hash
:
l2Genesis
.
hash
,
number
:
0
,
},
l2_time
:
deployConfig
.
startingT
imestamp
,
l2_time
:
l1StartingBlock
.
t
imestamp
,
},
block_time
:
deployConfig
.
l2BlockTime
,
max_sequencer_drift
:
deployConfig
.
maxSequencerDrift
,
...
...
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