πŸ“· Snapshots

Update every 6 hours

◻️ How to use?

Copy and paste the command on your server.

sudo systemctl stop lavad

cp $HOME/.lava/data/priv_validator_state.json $HOME/.lava/priv_validator_state.json.backup

lavad tendermint unsafe-reset-all --home $HOME/.lava--keep-addr-book
curl https://snapshots-testnet.unitynodes.com/lava-testnet/lava-testnet-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.lava

mv $HOME/.lava/priv_validator_state.json.backup $HOME/.lava/data/priv_validator_state.json

sudo systemctl restart lavad
sudo journalctl -u lavad -f -o cat

◻️ How to check?

After downloading the snapshot, you can use the command to check the synchronization of your node with the network, you will be shown the following information:

local_height=$(lavad status | jq -r .sync_info.latest_block_height); network_height=$(curl -s https://rpc.lava-testnet.unitynodes.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"
  • Your node height - the current block of your node

  • Network height - the last block of the network

  • Blocks left - how many blocks your node has left to sync.

Example:

◻️ How does it work?

When a new node joins a blockchain network, it can use a snapshot to quickly synchronize with the current state of the network. Snapshots are compressed backups of blockchain data that significantly reduce the time required for node synchronization compared to fully verifying the entire transaction history. Conditionally, there are 100,000 blocks in the network. Without a snapshot, you would have to sync and download all of them completely. In the case of using a snapshot, it can be conditionally only the last 10,000 blocks.

Our team provides up-to-date network snapshots that are updated every 6 hours, so you can sync with less of your own time.

β—½ Advantages of using snapshots:

  • Speed: Significantly reduces sync time.

  • Saving resources: reduces the load on server resources and data storage.

  • Convenience: allows you to quickly restore the operation of the node after failures or transfers.

Last updated