This repository has been archived by the owner on Mar 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Update stuck node or Jumpstart chain sync
Etienne Napoleone edited this page Feb 13, 2019
·
30 revisions
The following commands are step by step instructions for Tomo masternode operators that can be used for two major use-cases:
- Fixing nodes that are stuck; evidenced by a node that stays on a block and doesn't progress
- Jumpstarting a newly setup masternode; avoid waiting a week for synchronization
Basically, you download a compressed version of the last-known "good" chaindata. This comes from Tomochain Ptd on a weekly basis. You remove the nodes old data and update it with the newly downloaded data. Finally you restart the sync-process from this known-good checkpoint.
Note: Assure that you have enough disk space for both the tar file AND its uncompressed contents. Double the space or more.
# Login as user that has access to tmn
# Download Tomo's chaindata archive (make sure you have enough disk space available)
wget https://chaindata.sgp1.cdn.digitaloceanspaces.com/2019-02-11.tar -P /tmp
# Stop your node
tmn stop
# Remove your node old data
node_name=$(tmn inspect | head -n1 | awk '{print $2}') #get tomochain container name
sudo rm -rf /var/lib/docker/volumes/${node_name}_chaindata/_data/data/tomo/chaindata
# Extract the data
cd /tmp
sudo tar xvC /var/lib/docker/volumes/${node_name}_chaindata/_data/data/tomo/ -f 2019-02-11.tar
# Start your node back
tmn start
# If you're really running out of space, remove the tar file
# keeping it might be a good idea if you get stuck further before a new snapshot is released
rm /tmp/2019-02-11.tar