Skip to content

Commit abae638

Browse files
Alec Schaeferjcortejoso
authored andcommitted
Write genesis file in state migration (#219)
* squash of #167 * add writeGenesis * open old freezer in readonly mode, fix locking error * remove devAlloc * Revert "open old freezer in readonly mode, fix locking error" This reverts commit e3fddea. * fix locking error * fix lint error, check errors, add comment * remove comment * filter extra genesis fields * fix issue with genesis extra data * update testdata --------- Co-authored-by: Javier Cortejoso <[email protected]>
1 parent bdd3dcf commit abae638

File tree

9 files changed

+961
-59
lines changed

9 files changed

+961
-59
lines changed

op-chain-ops/cmd/celo-migrate/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To minimize migration downtime, the script is designed to run in two stages:
1010

1111
### Pre migration
1212

13-
The `pre migration` consists of two parts that are run in parallel:
13+
The `pre migration` consists of two parts that are run in parallel:
1414
- Copy and transform the ancient / frozen blocks (i.e. all blocks before the last 90000).
1515
- Copy over the rest of the database using `rsync`.
1616

@@ -74,14 +74,14 @@ mv chaindata ./data/alfajores_old
7474
The state migration takes in an allocs file that specifies the l2 state changes to be made during the migration. This file can be generated from the deploy config and l1 contract addresses by running the following from the `contracts-bedrock` directory.
7575

7676
```bash
77-
CONTRACT_ADDRESSES_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/deployment-l1-holesky.json \
78-
DEPLOY_CONFIG_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/deploy-config-holesky-alfajores.json \
79-
STATE_DUMP_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/l2-allocs-alfajores.json \
77+
CONTRACT_ADDRESSES_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/deployment-l1-dango.json \
78+
DEPLOY_CONFIG_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/deploy-config-dango.json \
79+
STATE_DUMP_PATH=../../op-chain-ops/cmd/celo-migrate/testdata/l2-allocs-dango.json \
8080
forge script ./scripts/L2Genesis.s.sol:L2Genesis \
8181
--sig 'runWithStateDump()'
8282
```
8383

84-
This should output the allocs file to `./testdata/l2-allocs-alfajores.json`. If you encounter difficulties with this and want to just continue testing the script, you can alternatively find the allocs file [here](https://gist.github.com/jcortejoso/7f90ba9b67c669791014661ccb6de81a).
84+
This should output the allocs file to `./testdata/l2-allocs-dango.json`. If you encounter difficulties with this and want to just continue testing the script, you can alternatively find the allocs file [here](https://storage.googleapis.com/cel2-rollup-files/alfajores-mvp/l2-allocs.json).
8585

8686
##### Run script with test configuration
8787

@@ -95,11 +95,11 @@ Running the pre-migration script should take ~5 minutes. This script copies and
9595

9696
```bash
9797
go run ./cmd/celo-migrate full \
98-
--deploy-config ./cmd/celo-migrate/testdata/deploy-config-holesky-alfajores.json \
99-
--l1-deployments ./cmd/celo-migrate/testdata/deployment-l1-holesky.json \
98+
--deploy-config ./cmd/celo-migrate/testdata/deploy-config-dango.json \
99+
--l1-deployments ./cmd/celo-migrate/testdata/deployment-l1-dango.json \
100100
--l1-rpc https://ethereum-holesky-rpc.publicnode.com \
101-
--l2-allocs ./cmd/celo-migrate/testdata/l2-allocs-alfajores.json \
102-
--outfile.rollup-config ./cmd/celo-migrate/testdata/rollup-config.json \
101+
--l2-allocs ./cmd/celo-migrate/testdata/l2-allocs-dango.json \
102+
--outfile.rollup-config ./cmd/celo-migrate/testdata/rollup-config-dango.json \
103103
--old-db ./data/alfajores_old \
104104
--new-db ./data/alfajores_new
105105
```

0 commit comments

Comments
 (0)