Skip to content

Commit 693c1f3

Browse files
commit first chunk
1 parent e32d1fa commit 693c1f3

File tree

2 files changed

+87
-1
lines changed

2 files changed

+87
-1
lines changed

docs/cdk/how-to/migration/7-8.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,88 @@
11
## Summary
22

3+
4+
5+
## Test the process locally
6+
7+
### Build Docker dev geth with fork 7
8+
9+
1. Clone `zkevm-contracts`, checkout branch `v4.0.0-fork.7`, and install.
10+
11+
```sh
12+
git clone https://github.com/0xPolygonHermez/zkevm-contracts
13+
cd zkevm-contracts/
14+
git checkout v4.0.0-fork.7
15+
npm install
16+
```
17+
18+
2. Edit the `docker/scripts/v2/deploy_parameters_docker.json` file to change the following:
19+
20+
```json
21+
"minDelayTimelock": 3600, -> "minDelayTimelock": 1,
22+
```
23+
24+
3. Edit the `docker/scripts/v2/create_rollup_parameters_docker.json` file and change `"consensusContract": "PolygonZkEVMEtrog",` to the following:
25+
26+
```json
27+
"consensusContract": "PolygonValidiumEtrog",
28+
```
29+
30+
And add the following parameter:
31+
32+
```json
33+
"dataAvailabilityProtocol": "PolygonDataCommittee",
34+
```
35+
36+
4. Run the following command:
37+
38+
```sh
39+
cp docker/scripts/v2/hardhat.example.paris hardhat.config.ts
40+
```
41+
42+
5. Edit the `docker/scripts/v2/deploy-docker.sh` file to add the following line:
43+
44+
```sh
45+
sudo chmod -R go+rxw docker/gethData before docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .
46+
```
47+
48+
6. Uncomment the following lines from `deployment/v2/4_createRollup.ts`:
49+
50+
```sh
51+
// Setup data commitee to 0
52+
await (await polygonDataCommittee?.setupCommittee(0, [], "0x")).wait();
53+
```
54+
55+
7. Build the image:
56+
57+
```sh
58+
npm run docker:contracts
59+
```
60+
61+
8. Tag the image:
62+
63+
```sh
64+
docker image tag hermeznetwork/geth-zkevm-contracts hermeznetwork/geth-zkevm-contracts:test-upgrade-7
65+
```
66+
67+
## Build the genesis file for the node
68+
69+
1. Clone the `cdk-validium-node` repo and checkout the `v0.5.13+cdk.6` branch.
70+
71+
```sh
72+
git clone https://github.com/0xPolygon/cdk-validium-node
73+
git checkout v0.5.13+cdk.6
74+
```
75+
76+
2. Edit the `test/config/test.genesis.config.json` file with values in the output files in the `zkevm-contracts/docker/deploymentOutput` directory.
77+
78+
```txt
79+
l1Config.polygonZkEVMAddress ==> rollupAddress @ create_rollup_output.json
80+
l1Config.polygonRollupManagerAddress ==> polygonRollupManager @ deploy_output.json
81+
l1Config.polTokenAddress ==> polTokenAddress @ deploy_output.json
82+
l1Config.polygonZkEVMGlobalExitRootAddress ==> polygonZkEVMGlobalExitRootAddress @ deploy_output.json
83+
rollupCreationBlockNumber ==> createRollupBlock @ create_rollup_output.json
84+
rollupManagerCreationBlockNumber ==> deploymentBlockNumber @ deploy_output.json
85+
root ==> root @ genesis.json
86+
genesis ==> genesis @ genesis.json
87+
```
88+

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ nav:
8484
- Connect to CDK testnet: cdk/get-started/connect-testnet.md
8585
- How to:
8686
- Migrate:
87-
- Fork 7 to 8: ckd/how-to/migration/7-8.md
87+
- Fork 7 to 8: cdk/how-to/migration/7-8.md
8888
- Use a native token: cdk/how-to/use-native-token.md
8989
- Manage allowlists with policies: cdk/how-to/manage-policies.md
9090
- Quickly test a running stack: cdk/how-to/quick-test-stack.md

0 commit comments

Comments
 (0)