This document offers guidance for validators looking to move thier node instance to another one, for example in case of changing VPS provider or something like this.
The main tool required for this is cheqd's interactive installer.
Before completing the move, ensure the following checks are completed:
Check that your config
directory and data/priv_validator_state.json
are copied to a safe place where they will cannot affected by the migration
If you are using cosmosvisor, use systemctl stop cheqd-cosmovisor
For all other cases, use systemctl stop cheqd-noded
.
This step is of the utmost important
If your node is not stopped correctly and two nodes are running with the same private keys, this will lead to a double signing infraction which results in your node being permemently jailed (tombstoned) resulting in a 5% slack of staked tokens.
You will also be required to complete a fresh setup of your node.
Only after you have completed the preparation steps to shut down the previous node, the installation should begin.
In general, the installer allows you to install the binary and download/extract the latest snapshot from https://snapshots.cheqd.net/.
Once this has been completed, you will be able to move your existing keys back and settings.
The answers for installer quiestion could be:
1) v0.6.0
2) v0.6.0-rc3
3) v0.6.0-rc2
4) v0.6.0-rc1
5) v0.5.0
Choose the appropriate list option number above to select the version of cheqd-node to install [default: 1]:
Here you can pick up the version what you want.
Set path for cheqd user's home directory [default: /home/cheqd]:
.
This is essentialy a question about where the home directory, cheqdnode
, is located or will be.
It is up to operator where they want to store data
, config
and log
directories.
Do you want to setup a new cheqd-node? (yes/no) [default: yes]:
Here the expected answer is No
.
The main idea is that our old config
directory will be used and data
will be restored from the snapshot.
We don't need to setup the new one.
Select cheqd network to join (testnet/mainnet) [default: mainnet]:
For now, we have 2 networks, testnet
and mainnet
.
Type whichever chain you want to use or just keep the default by clicking Enter
.
Install cheqd-noded using Cosmovisor? (yes/no) [default: yes]:
.
This is also up to the operator.
CAUTION: Downloading a snapshot replaces your existing copy of chain data. Usually safe to use this option when doing a fresh installation. Do you want to download a snapshot of the existing chain to speed up node synchronisation? (yes/no) [
default: yes
].
On this question we recommend to answer Yes
, cause it will help you to catchup with other nodes in the network. That is the main feature from this installer.
********* Latest stable cheqd-noded release version is Name: v0.6.0
********* List of cheqd-noded releases:
1) v0.6.0
2) v0.6.0-rc3
3) v0.6.0-rc2
4) v0.6.0-rc1
5) v0.5.0
Choose list option number above to select version of cheqd-node to install [default: 1]:
1
Set path for cheqd user's home directory [default: /home/cheqd]:
Do you want to setup a new cheqd-node? (yes/no) [default: yes]:
no
Select cheqd network to join (testnet/mainnet) [default: mainnet]:
mainnet
********* INFO: Installing cheqd-node with Cosmovisor allows for automatic unattended upgrades for valid software upgrade proposals.
Install cheqd-noded using Cosmovisor? (yes/no) [default: yes]:
yes
CAUTION: Downloading a snapshot replaces your existing copy of chain data. Usually safe to use this option when doing a fresh installation. Do you want to download a snapshot of the existing chain to speed up node synchronisation? (yes/no) [default: yes]:
yes
If the installation process was successful, the next step is to get back the configurations from preparation steps:
- Copy
config
directory to theCHEQD_HOME_DIRECTORY/.cheqdnode/
- Copy
data/priv_validator_state.json
to theCHEQD_HOME_DIRECTORY/.cheqdnode/data
- Make sure that permissions are
cheqd:cheqd
forCHEQD_HOME_DIRECTORY/.cheqdnode
directory. For setting it the next command can help$ sudo chown -R cheqd:cheqd CHEQD_HOME_DIRECTORY/.cheqdnode
Where CHEQD_HOME_DIRECTORY
is the home directory for cheqd
user. By default it's /home/cheqd
or what you answered during the installation for the second question.
You need to specify here new external address by calling the next command under the cheqd
user:
sudo su cheqd
cheqd-noded configure p2p external-address <your-new-external-address>
The latest thing in this doc is to run the service and check that all works fine.
sudo systemctl start <service-name>
where <service-name>
is a name of service depending was Install Cosmovisor
selected or not.
cheqd-cosmovisor
if Cosmovisor was installed.cheqd-noded
in case of keepingcheqd-noded
as was with debian package approach.
For checking that service works, please run the next command:
systemctl status <service-name>
where <service-name>
has the same meaning as above.
The status should be Active(running)