Skip to content

Commit dc0b374

Browse files
authored
Update v1.2-instruction.md
1 parent ea536f6 commit dc0b374

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

changelog/v1.2-instruction.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

2-
## Instruction for mainnet v1.2.0 upgrade
3-
First, go to the `iotex-var` folder on your node (where it has 3 sub-folders
4-
`etc`, `data`, `log`)
2+
## Instruction for Mainnet v1.2.0 Upgrade
3+
First, go to the `iotex-var` folder on your node (where it has 3 sub-folders `etc`, `data`, `log`)
54
```
65
export IOTEX_HOME=$PWD
76
```
@@ -11,7 +10,7 @@ docker stop iotex
1110
docker rm iotex
1211
```
1312

14-
#### Option 1: (node running without API gateway)
13+
#### Option 1 - if you are running the node WITHOUT API gateway enabled
1514
Check files under `$IOTEX_HOME/data`, if you don't see a file named `index.db`,
1615
then your node is **not** running as gateway. In this case, simply start the
1716
node using image v1.2.0.
@@ -29,12 +28,10 @@ docker run -d --restart on-failure --name iotex \
2928
-genesis-path=/etc/iotex/genesis.yaml
3029
```
3130

32-
If your node is syncing blocks very slow, see [here](#slow-sync)
31+
**If your node is syncing blocks very slow, see [here](#slow-sync)**
3332

34-
#### Option 2: (node running as API gateway)
35-
Otherwise, the node is running as a gateway. In this case, you'll need to wipe
36-
out the data and start from latest snapshot, due to some index file in v1.2 is
37-
not backward-compatible.
33+
#### Option 2 - if you are running the node WITH API gateway enabled
34+
In this case, you'll need to wipe out the data and start from latest snapshot, due to index file in v1.2 is not backward-compatible.
3835
```
3936
rm -rf $IOTEX_HOME/data
4037
curl -L https://t.iotex.me/mainnet-data-with-idx-latest > $IOTEX_HOME/data.tar.gz
@@ -61,40 +58,41 @@ recommend you do the upgrade in an epoch when the node is not chosen as active
6158
delegate. This would prevent your node from being possibly probated and lose
6259
productivity.
6360

64-
If your node is syncing blocks very slow, see [here](#slow-sync)
61+
**If your node is syncing blocks very slow, see [here](#slow-sync)**
6562

66-
## Instruction for testnet v1.2.0 upgrade
67-
To upgrade to testnet v1.2.0, the procedure is same as that of mainnet, except
68-
these 2:
63+
## Instruction for Testnet v1.2.0 Upgrade
64+
To upgrade to testnet v1.2.0, the procedure is same as that of mainnet, except these 2:
6965

70-
1. In Option 2, download the snapshot from `https://t.iotex.me/testnet-data-with-idx-latest`
71-
2. Run Step 0 below first
66+
1. Download the snapshot from `https://t.iotex.me/testnet-data-with-idx-latest` if needed
67+
2. Update the config and genesis files like below
7268

73-
#### Step 0:
74-
1. Save the private key and external IP address, i.e., the `producerPrivKey:`
75-
and `externalHost` line in file `$IOTEX_HOME/etc/config.yaml`
76-
2. Upgrade the config and genesis yaml
77-
```
78-
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/config_testnet.yaml > $IOTEX_HOME/etc/config.yaml
79-
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/genesis_testnet.yaml > $IOTEX_HOME/etc/genesis.yaml
69+
* Save the private key and external IP address, i.e., the `producerPrivKey:` and `externalHost` line in file `$IOTEX_HOME/etc/config.yaml`
8070

81-
```
82-
set the private key and external IP back into `$IOTEX_HOME/etc/config.yaml`, then
83-
continue onto Option 1 or 2.
71+
* Get the new config and genesis files
72+
```
73+
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/config_testnet.yaml > $IOTEX_HOME/etc/config.yaml
74+
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/genesis_testnet.yaml > $IOTEX_HOME/etc/genesis.yaml
75+
```
76+
77+
* Set the private key and external IP back into `$IOTEX_HOME/etc/config.yaml`
78+
79+
80+
**If your node is syncing blocks very slow, see [here](#slow-sync)**
81+
82+
### <a name="slow-sync"/>Troubleshoot for Slow Sync
8483

85-
If your node is syncing blocks very slow, see [here](#slow-sync)
84+
Under certain network conditions, the node may sync slower as it should be. Follow the steps below to config it the sync mechanism to be more aggresive.
8685

87-
#### <a name="slow-sync"/>solution for slow-sync
88-
stop the node
86+
1. stop the node
8987
```
9088
docker stop iotex
9189
```
92-
open file `$IOTEX_HOME/etc/config.yaml`, add the following line under
90+
2. open file `$IOTEX_HOME/etc/config.yaml`, add the following line under
9391
`blockSync:`
9492

9593
![image](/changelog/sync-interval.png)
9694

97-
restart the node
95+
3. restart the node
9896
```
9997
docker restart iotex
10098
```

0 commit comments

Comments
 (0)