@@ -7,7 +7,8 @@ time the tx was originally executed.
7
7
The following instrcutions will guide you through setting up an IoTeX archive node
8
8
- [ System Requirements] ( #system )
9
9
- [ Pre-Requisites] ( #requisite )
10
- - [ Prepare Data] ( #prepdata )
10
+ - [ Prepare Home Directory] ( #prephome )
11
+ - [ Download Data] ( #download )
11
12
- [ Build Binary] ( #build )
12
13
- [ Start Node] ( #start )
13
14
- [ Running Node using Docker] ( #docker )
@@ -34,7 +35,7 @@ source ~/.bashrc
34
35
go version
35
36
```
36
37
37
- ## <a name =" prepdata " />Prepare Data
38
+ ## <a name =" prephome " />Prepare Home Directory
38
39
Set up the home directory and download config, genesis, and snapshot data. In
39
40
the instructions below ` /var/iotex-archive ` is used as the home directory, this
40
41
is the same directory as specified in the config yaml file so it will work with
@@ -57,10 +58,78 @@ curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/confi
57
58
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/genesis_mainnet.yaml > $IOTEX_HOME/etc/genesis.yaml
58
59
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/trie.db.patch > $IOTEX_HOME/data/trie.db.patch
59
60
curl https://storage.googleapis.com/blockchain-golden/poll.mainnet.db > $IOTEX_HOME/data/poll.db
60
-
61
- #download snapshot and unzip data
62
- // TODO: add download link
63
61
```
62
+ ## <a name =" download " />Download Data
63
+ Next step is to download the snapshot data. There are 2 files to download. The
64
+ first is the IoTeX blockchain's address/state database file, due to the quite
65
+ large size of this file in archive mode, the file is not compressed and will be
66
+ a direct download. The second is a ` tar.gz ` compressed file containing multiple
67
+ data files (block data, blob storage, and certain indexing files, etc). You will
68
+ need to download and uncompress this file.
69
+
70
+ In the $IOTEX_HOME folder, run the following commands:
71
+ ```
72
+ #download the data files and uncompress it
73
+ curl -LO https://storage.googleapis.com/blockchain-golden/archive/iotex-data.tar.gz
74
+ tar -xzf iotex-data.tar.gz
75
+
76
+ #download the state database file
77
+ cd data
78
+ curl -LO https://storage.googleapis.com/blockchain-golden/archive/archive.db
79
+ ```
80
+ > Note: the state database file has a size of 4.6TB at this moment, it will take
81
+ considerable amount of time (12.8 hours at 100MB/s download speed) to download.
82
+ Please take measures (for example use ` nohup ` at the front) to prevent possible
83
+ interruption of the download process.
84
+
85
+ After successful download and uncompress operations, the $IOTEX_HOME/data folder
86
+ will have these files:
87
+
88
+ data<br >
89
+ ├── archive.db<br >
90
+ ├── blob.db<br >
91
+ ├── bloomfilter.index.db<br >
92
+ ├── candidate.index.db<br >
93
+ ├── chain-00000001.db<br >
94
+ ├── chain-00000002.db<br >
95
+ ├── chain-00000003.db<br >
96
+ ├── chain-00000004.db<br >
97
+ ├── chain-00000005.db<br >
98
+ ├── chain-00000006.db<br >
99
+ ├── chain-00000007.db<br >
100
+ ├── chain-00000008.db<br >
101
+ ├── chain-00000009.db<br >
102
+ ├── chain-00000010.db<br >
103
+ ├── chain-00000011.db<br >
104
+ ├── chain-00000012.db<br >
105
+ ├── chain-00000013.db<br >
106
+ ├── chain-00000014.db<br >
107
+ ├── chain-00000015.db<br >
108
+ ├── chain-00000016.db<br >
109
+ ├── chain-00000017.db<br >
110
+ ├── chain-00000018.db<br >
111
+ ├── chain-00000019.db<br >
112
+ ├── chain-00000020.db<br >
113
+ ├── chain-00000021.db<br >
114
+ ├── chain-00000022.db<br >
115
+ ├── chain-00000023.db<br >
116
+ ├── chain-00000024.db<br >
117
+ ├── chain-00000025.db<br >
118
+ ├── chain-00000026.db<br >
119
+ ├── chain-00000027.db<br >
120
+ ├── chain-00000028.db<br >
121
+ ├── chain-00000029.db<br >
122
+ ├── chain-00000030.db<br >
123
+ ├── chain-00000031.db<br >
124
+ ├── chain-00000032.db<br >
125
+ ├── chain-00000033.db<br >
126
+ ├── chain.db<br >
127
+ ├── consensus.db<br >
128
+ ├── contractstaking.index.db<br >
129
+ ├── index.db<br >
130
+ ├── poll.db<br >
131
+ ├── staking.index.db<br >
132
+ └── trie.db.patch<br >
64
133
65
134
## <a name =" build " />Build Binary
66
135
In the home directory, run the following commands
0 commit comments