Skip to content

Commit 2b6556c

Browse files
committed
Moving upgrade timestamps to envs
1 parent b8fab4b commit 2b6556c

5 files changed

+47
-24
lines changed

.env.sample.mainnet

+7
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,10 @@ OP_ENGINE_RPC=ws://op-geth:8551
6969
OP_ROLLUP_RPC=http://op-node:8547
7070
OP_ENGINE_REPLICA_RPC=ws://op-geth-replica:8551
7171
OP_ROLLUP_REPLICA_RPC=http://op-node-replica:8547
72+
73+
# Block timestamps for upgrades (empty = no upgrade)
74+
OP_OVERRIDE_CANYON=
75+
OP_OVERRIDE_DELTA=
76+
OP_OVERRIDE_ECOTONE=
77+
OP_OVERRIDE_FJORD=
78+
OP_OVERRIDE_GRANITE=

.env.sample.private

+7
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ OP_ENGINE_RPC=ws://op-geth:8551
7777
OP_ROLLUP_RPC=http://op-node:8547
7878
OP_ENGINE_REPLICA_RPC=ws://op-geth-replica:8551
7979
OP_ROLLUP_REPLICA_RPC=http://op-node-replica:8547
80+
81+
# Block timestamps for upgrades (empty = no upgrade)
82+
OP_OVERRIDE_CANYON=
83+
OP_OVERRIDE_DELTA=
84+
OP_OVERRIDE_ECOTONE=
85+
OP_OVERRIDE_FJORD=
86+
OP_OVERRIDE_GRANITE=

.env.sample.testnet

+7
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ OP_ENGINE_RPC=ws://op-geth:8551
6767
OP_ROLLUP_RPC=http://op-node:8547
6868
OP_ENGINE_REPLICA_RPC=ws://op-geth-replica:8551
6969
OP_ROLLUP_REPLICA_RPC=http://op-node-replica:8547
70+
71+
# Block timestamps for upgrades (empty = no upgrade)
72+
OP_OVERRIDE_CANYON=
73+
OP_OVERRIDE_DELTA=
74+
OP_OVERRIDE_ECOTONE=
75+
OP_OVERRIDE_FJORD=
76+
OP_OVERRIDE_GRANITE=

README.md

+16-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repository offers Docker configurations for effortlessly running the Opstac
88
Please follow the steps below to get your Verse up and running. If you encounter any issues while building, please refer to the [QA](#frequently-asked-questions) section.
99

1010
## About Versions
11-
This repository follows semantic versioning with the major version fixed at `v1`(representing Verse V1). Minor version updates correspond to OPStack protocol upgrades(hardforks). Patch version updates are releases focused on bug fixes and parameter changes. It is strongly recommended to pin to a specific version after git cloning, as tracking the main branch would result in automatic application of upgrades.
11+
This repository follows semantic versioning with the major version fixed at `v1`(meaning Verse V1). Minor version updates correspond to OPStack protocol upgrades(hardforks). Patch version updates are releases focused on bug fixes and parameter changes. It is strongly recommended to pin to a specific version after git cloning, as tracking the main branch would result in automatic application of upgrades.
1212
```shell
1313
git checkout <version tag>
1414
```
@@ -128,32 +128,25 @@ docker run --rm -ti -u 65534:65534 -v $PWD/assets:/assets \
128128
--outfile.rollup /assets/rollup.json
129129
```
130130

131-
#### Add upgrade times to rollup.json
132-
Add timestamps for L2 upgrade activation blocks to the `assets/rollup.json` created in the previous step.
133-
134-
```json
135-
"regolith_time": 0,
136-
"canyon_time": <set this value>,
137-
"delta_time": <set this value>,
138-
"ecotone_time": <set this value>,
139-
"fjord_time": <set this value>,
140-
"granite_time": <set this value>,
141-
"batch_inbox_address": "0x...",
131+
#### Add upgrade timestamps to .env
132+
Add block timestamps for L2 upgrades to the `.env` file.
133+
```dotenv
134+
# Block timestamps for upgrades (empty = no upgrade)
135+
OP_OVERRIDE_CANYON=
136+
OP_OVERRIDE_DELTA=
137+
OP_OVERRIDE_ECOTONE=
138+
OP_OVERRIDE_FJORD=
139+
OP_OVERRIDE_GRANITE=
142140
```
143141

144-
Field descriptions:
145-
| name | sample |
146-
| --- | --- |
147-
| canyon_time | Specify `0` |
148-
| delta_time | Specify `0` |
149-
| ecotone_time | Specify `current_time + 600s` (Example command: `expr $(date +%s) + 600`) |
150-
| fjord_time | Specify the same value as `ecotone_time` |
151-
| granite_time | Specify the same value as `ecotone_time` |
142+
The `op-node` and `op-geth` must be started before the specified timestamps, so it's necessary to set this time slightly in the future. For a newly built Verse, it's acceptable to set all values to the same time.
143+
```shell
144+
# Getting a timestamp 10 minutes in the future
145+
expr $(date +%s) + 600
146+
```
152147

153148
> [!IMPORTANT]
154-
> - The above only applies when building a new Verse
155-
> - You must start the chain before the time specified in `ecotone_time`
156-
> - Do not modify these values after the upgrades have been applied, as this may cause unnecessary issues
149+
> **Do not modify timestamps after upgrades have been applied. In particular, never re-change to a future.**
157150
158151
#### Generate the Genesis Block
159152
Ensure the successful generation of the genesis block (number=0):

docker-compose.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
op-geth:
1212
<<: *resident
1313
image: ghcr.io/oasysgames/oasys-op-geth:v1.3.0-18a5e9f31
14-
entrypoint: /bin/sh /assets/op-geth/entrypoint.sh
14+
entrypoint: geth
1515
environment:
1616
GETH_DATADIR: /data
1717
GETH_HTTP: 'true'
@@ -37,6 +37,10 @@ services:
3737
GETH_AUTHRPC_JWTSECRET: /assets/jwt.txt
3838
GETH_TXPOOL_PRICELIMIT: 0
3939
GETH_ROLLUP_SUPERCHAIN_UPGRADES: 'false'
40+
GETH_OVERRIDE_CANYON: $OP_OVERRIDE_CANYON
41+
GETH_OVERRIDE_ECOTONE: $OP_OVERRIDE_ECOTONE
42+
GETH_OVERRIDE_FJORD: $OP_OVERRIDE_FJORD
43+
GETH_OVERRIDE_GRANITE: $OP_OVERRIDE_GRANITE
4044
volumes:
4145
- ./assets:/assets
4246
- ./data/op-geth:/data
@@ -72,6 +76,11 @@ services:
7276
OP_NODE_P2P_DISCOVERY_PATH: memory
7377
OP_NODE_P2P_PEERSTORE_PATH: memory
7478
OP_NODE_P2P_NO_DISCOVERY: 'true'
79+
OP_NODE_OVERRIDE_CANYON: $OP_OVERRIDE_CANYON
80+
OP_NODE_OVERRIDE_DELTA: $OP_OVERRIDE_DELTA
81+
OP_NODE_OVERRIDE_ECOTONE: $OP_OVERRIDE_ECOTONE
82+
OP_NODE_OVERRIDE_FJORD: $OP_OVERRIDE_FJORD
83+
OP_NODE_OVERRIDE_GRANITE: $OP_OVERRIDE_GRANITE
7584
volumes:
7685
- ./assets:/assets
7786
- ./data/op-node:/data

0 commit comments

Comments
 (0)