TRON officially offers database snapshots regularly for quick node deployment. A data snapshot is a compressed file of the database backup of a TRON network node at a certain time. Developers can download and use the data snapshot to speed up the node synchronization process.
The following table shows the download address of Fullnode data snapshots. Please select a suitable data snapshot according to the location and node database type, and whether you need to query historical internal transactions.
|Fullnode Data Source||Download site||Description|
|Official data source (North America: Virginia)||http://188.8.131.52/||LevelDB, , exclude internal transactions (About 609G on 28 Oct. 2021)|
|Official data source (North America: Virginia)||http://184.108.40.206:18811/||RocksDB, exclude internal transactions (About 601G on 28 Oct. 2021)|
|Official data source (Singapore)||http://220.127.116.11/||LevelDB, exclude internal transactions (About 609G on 28 Oct. 2021)|
|Official data source (Singapore)||http://18.104.22.168/saveInternalTx/||LevelDB, include internal transactions (About 769G on 28 Oct. 2021)|
|Data sources provided by TronGrid Community||https://backups.trongrid.io/||LevelDB, include internal transactions (About 815G on 28 Oct. 2021)|
Note：The data of LevelDB and RocksDB are not allowed to be mixed. The database can be specified in the config file of the full node, set db.engine to LEVELDB or ROCKSDB.
The Tron Public Chain has supported the type of the Lite FullNode since the version of GreatVoyage-v4.1.0 release. All the data required by the Lite FullNode for running is whole of the status data and a little essential block data, so, it is much more lightweight (smaller database and faster startup) than the normal FullNode. TRON officially offers database snapshots of the Lite FullNode.
|Lite Fullnode Data Source||Download site||Description|
|Official data source (North America: Virginia)||http://22.214.171.124/||LevelDB, At present, the download of Lite Fullnode data snapshot has been closed, and it is expected to open at the version of GreatVoyage-V4.5.0|
Tips: You can split the data from the whole data with the help of the Lite FullNode Tool.
The steps for using data snapshots are as follows:
- Download the corresponding compressed backup database according to your needs.
- Decompress the compressed file of the backup database to the output-directory directory or to the corresponding directory according to your needs.
- Startup the node. The node reads the output-directory directory by default. If you need to specify another directory，please add the
-d directoryparameter when the node starts.
Lite FullNode Tool is used to split the database of a FullNode into a
Snapshot dataset and a
Snapshot dataset: the minimum dataset for quick startup of the Lite FullNode.
History dataset: the archive dataset that used for historical data queries.
Before using this tool for any operation, you need to stop the currently running FullNode process first. This tool provides the function of splitting the complete data into two datasets according to the current
latest block height (latest_block_number). Lite FullNode launched from snapshot datasets do not support querying historical data prior to this block height. The tool also provides the ability to merge historical datasets with snapshot datasets.
For more design details, please refer to: TIP-128.
LiteFullNodeTool.jar can be obtained by compiling the java-tron source code, the steps are as follows:
Obtain java-tron source code
$ git clone https://github.com/tronprotocol/java-tron.git $ git checkout -t origin/master
$ cd java-tron $ ./gradlew clean build -x test
LiteFullNodeTool.jarwill be generated in the
This tool provides independent cutting of
Snapshot Dataset and
History Dataset and a merge function.
--operation | -o: [ split | merge ] specifies the operation as either to split or to merge
--type | -t: [ snapshot | history ] is used only with
splitto specify the type of the dataset to be split; snapshot refers to Snapshot Dataset and history refers to History Dataset.
--fn-data-path: FullNode database directory
--dataset-path: dataset directory, when operation is
dataset-pathis the path that store the
dataset-pathshould be the
Start a new FullNode using the default config, then an
output-directory will be produced in the current directory.
output-directory contains a sub-directory named
database which is the database to be split.
Split and get a
First, stop the FullNode and execute:
// just for simplify, locate the snapshot into `/tmp` directory, $ java -jar LiteFullNodeTool.jar -o split -t snapshot --fn-data-path output-directory/database --dataset-path /tmp
snapshotdirectory will be generated in
/tmp, pack this directory and copy it to somewhere that is ready to run a Lite Fullnode.
Do not forget rename the directory from
(the default value of the storage.db.directory is
database, make sure rename the snapshot to the specified value)
Split and get a
If historical data query is needed,
History datasetshould be generated and merged into Lite FullNode.
// just for simplify, locate the history into `/tmp` directory, $ java -jar LiteFullNodeTool.jar -o split -t history --fn-data-path output-directory/database --dataset-path /tmp
historydirectory will be generated in
/tmp, pack this directory and copy it to a Lite Fullnode.
History datasetalways take a large storage, make sure the disk has enough volume to store the
Snapshot Datasethave an info.properties file to identify the block height from which they are segmented.
Make sure that the
History Datasetis not less than the corresponding value in the
After getting the
History dataset, the Lite FullNode can merge the
History datasetand become a real FullNode.
// just for simplify, assume `History dataset` is locate in /tmp $ java -jar LiteFullNodeTool.jar -o merge --fn-data-path output-directory/database --dataset-path /tmp/history
Updated 6 months ago