1
1
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 ` )
5
4
```
6
5
export IOTEX_HOME=$PWD
7
6
```
@@ -11,7 +10,7 @@ docker stop iotex
11
10
docker rm iotex
12
11
```
13
12
14
- #### Option 1: (node running without API gateway)
13
+ #### Option 1 - if you are running the node WITHOUT API gateway enabled
15
14
Check files under ` $IOTEX_HOME/data ` , if you don't see a file named ` index.db ` ,
16
15
then your node is ** not** running as gateway. In this case, simply start the
17
16
node using image v1.2.0.
@@ -29,12 +28,10 @@ docker run -d --restart on-failure --name iotex \
29
28
-genesis-path=/etc/iotex/genesis.yaml
30
29
```
31
30
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 ) **
33
32
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.
38
35
```
39
36
rm -rf $IOTEX_HOME/data
40
37
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
61
58
delegate. This would prevent your node from being possibly probated and lose
62
59
productivity.
63
60
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 ) **
65
62
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:
69
65
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
72
68
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 `
80
70
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
84
83
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.
86
85
87
- #### <a name =" slow-sync " />solution for slow-sync
88
- stop the node
86
+ 1 . stop the node
89
87
```
90
88
docker stop iotex
91
89
```
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
93
91
` blockSync: `
94
92
95
93
![ image] ( /changelog/sync-interval.png )
96
94
97
- restart the node
95
+ 3 . restart the node
98
96
```
99
97
docker restart iotex
100
98
```
0 commit comments