|
| 1 | +# upgrade testnet rpc fork.9 |
| 2 | +XLayer Testnet has been upgraded to Fork9. You can upgrade permission less rpc nodes in two ways. |
| 3 | + |
| 4 | +For more detailed information, please refer to:https://www.okx.com/zh-hans/xlayer/docs/developer/setup-zknode/setup-production-zknode |
| 5 | +## 1.Re-download the script and snapshot. It will take about 3 hours. (Recommended) |
| 6 | +``` bash |
| 7 | +apt install axel # Parallel download tools |
| 8 | +apt install pigz # Parallel compression tools |
| 9 | +wget https://static.okex.org/cdn/chain/xlayer/snapshot/run_xlayer_testnet.sh && chmod +x run_xlayer_testnet.sh && ./run_xlayer_testnet.sh init && cp ./testnet/example.env ./testnet/.env |
| 10 | +vim ./testnet/.env # Modify XLAYER_NODE_ETHERMAN_URL = "http://your.L1node.url" |
| 11 | +./run_xlayer_testnet.sh restore |
| 12 | +./run_xlayer_testnet.sh start |
| 13 | +``` |
| 14 | + |
| 15 | +## 2.Manual upgrade |
| 16 | +### 2.1 Stop the xlayer-sync and xlayer-rpc services. |
| 17 | +### 2.2 Modify the configuration file. |
| 18 | +Modify the docker-compose.yml file and replace the image version as follows: |
| 19 | +``` |
| 20 | +xlayer-rpc->image: okexchain/xlayer-node:origin_sync-v0.3.6_20240412160714_76857189 |
| 21 | +xlayer-sync->image: okexchain/xlayer-node:origin_sync-v0.3.6_20240412160714_76857189 |
| 22 | +xlayer-prover->image: okexchain/xlayer-prover:origin_release_v0.3.1_20240327040854_458b8d26 |
| 23 | +``` |
| 24 | + |
| 25 | +Modify the config/genesis.config.json file and add the fields rollupCreationBlockNumber and rollupManagerCreationBlockNumber as follows: |
| 26 | +``` |
| 27 | +{ |
| 28 | + ... |
| 29 | + "genesisBlockNumber": 4648290, |
| 30 | +
|
| 31 | + "rollupCreationBlockNumber": 4648290, |
| 32 | + "rollupManagerCreationBlockNumber": 4648290, |
| 33 | +
|
| 34 | + "root": "0xb2fbff62137228e52809081a425bfcd30c0fdc8c1213085278c739676a7669b8", |
| 35 | + ... |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +Modify the vim config/node.config.toml file and add the Fork9UpgradeBatch field as follows: |
| 40 | +``` |
| 41 | +... |
| 42 | +ForkUpgradeBatchNumber=0 |
| 43 | +ForkUpgradeNewForkId=0 |
| 44 | +
|
| 45 | +Fork9UpgradeBatch=476000 |
| 46 | +... |
| 47 | +
|
| 48 | +``` |
| 49 | + |
| 50 | +### 2.3 Start the xlayer-sync and xlayer-rpc services. |
| 51 | + |
0 commit comments