We create 2 types of snapshots
- Pruned – pruned snapshots are smaller and faster to download. They’re intended to quickly get your Comdex node up and running within the hour. Pruned snapshots are created daily.
- Full – full snapshots include the entire chain from genesis. They can be used to query historical data like past delegators at a certain block height or for other analytics. They contain the entire chain and thus are larger and longer to download. Full snapshots are created once a month
|Type||Protocol Version||Size||Snapshot Timestamp||Download URL|
|Pruned 50/0/10||comdex v0.1.1||45 Gb||2022-11-26||comdex-pruned.tar.lz4|
|Full archive||comdex v0.1.1||209 Gb||Work in progress…||comdex-full.tar.lz4|
The download URL is a permalink. The link will remain the same even though the daily file will be updated. The permalink allows you to incorporate it into your node creation automation script.
To use our snapshot, you’ll need to match your node settings to our snapshot setting initially in order to start syncing. Once your node is synced to latest block height, you can then change your pruning setting to other settings you desire.
Using Pruned snapshot
To use our pruned node snapshot, change the following settings
app.toml – file located in your .comdex/config folder
pruning = “custom”
pruning-keep-recent = “50”
pruning-keep-every = “0”
pruning-interval = “10”
config.toml – file located in your .comdex/config folder
indexer = “null”
Note that the default indexer setting is “kv”.
Using Full snapshot
To use our full node snapshot, change the following settings. Note that if you only need to run a validator node and don’t need to query data for development purposes, you can use the Pruned snapshot above to save space and get up running faster.
pruning = “nothing”
If you have other custom pruning specified previously such as pruning-keep-recent and pruning-keep-every, it won’t matter here since we’re pruning nothing. As a clean code practice, however, it’s best to set those custom settings back to 0.
config.toml – verify that the indexer is the default “kv” setting. This contains an index of the data to enable data querying
indexer = “kv”
*This is the default indexer setting. If you have not changed the indexer setting before, you can leave it by the default “kv” setting.
How to use snapshot
1. Download the appropriate snapshot, either pruned or full. The links to the snapshots are permanent links.
Pruned snapshot (pruned 50/0/10)
2. Stop your node and reset data folder
If you’re running comdex binary directly using comdex.service systemd file, stop the comdex service directly
sudo systemctl stop comdex
If you’re running comdex via cosmovisor binary using cosmovisor.service systemd file, stop the cosmovisor service
sudo system stop cosmovisor
Reset your node’s data
3. Unpack snapshot
Unpack the tar file into your data folder. If you follow the default setup, your data folder is located either in your home/<user>/.comdex/data folder or /root/.comdex and can be accessed via ~/.comdex. Depending on if you’re using the pruned or full snapshot, copy the command to unpack the appropriate snapshot below.
lz4 -c -d comdex-pruned.tar.lz4 | tar -x -C ~/.comdex
lz4 -c -d comdex-full.tar.lz4 | tar -x -C ~/.comdex
4. Verify permission – optional step
Once you’ve unpacked the snapshot, verify and update the ownership of the data folder to the user you’re using as needed.
5. Restart your node node and sync to latest block