|
1 | 1 | ## Summary |
2 | 2 |
|
| 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 | + |
0 commit comments