Setup Standalone Validator Node Manually
Video Walk Through
Overview
For this Demo we’ll be installing Sifnode on Ubuntu 20.04 but this can be done on most modern Linux distributions and the latest versions of Mac OS.
Update OS and Install Prerequisites
Before installing Sifnode, there are a few prerequisites that need to be installed. The following command will update the local package list and install any available updates:
This next command will install essential tools and ensure accurate time synchronization:
Install Go
Cosmos SDK is built with GoLang and so we need to install Go in order to execute the sifnode app. The following website will give you the download instructions for your operating system https://go.dev/doc/install.
The current version as of the last update of this document is v1.18. We can download this version to our node by executing the following:
Once downloaded we can install to the /usr/local directory:
Let's add Go to our path. Within the profile file (~/.profile) add the following:
After updating the file, execute the following command so the changes can take effect:
You can test that Go is installed by executing:
This command should show the version number of Go installed.
Install Sifnode
Now we are going to build Sifnode from source. First clone the Sifnode github repository by executing the following:
We can then compile and install a non-archive node by executing the following inside the sifnode directory:
Check that the installation was successful by executing:
This should print the version number of sifnoded.
Setup Cosmovisor
Cosmovisor is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. The latest version of Cosmovisor is not compatible with Cosmos SDK versions older than v0.45. To install the latest version of cosmovisor, execute the following:
If the latest version of Sifnode is using a version of Cosmos SDK prior to v0.45 then install version 1.0.0 of Cosmovisor using the following:
Check that the installation was successful by executing the following:
This should print out some details about Cosmovisor.
Configure Cosmovisor
First, create the required directories by executing the following commands:
Then copy the sifnoded binanry to the genesis/bin folder:
Now we need to add some environment variables that Cosmovisor is dependent on. One option is to add these variables to the profile that will be running Cosmovisor. Edit the ~/.profile file and add the following:
Initialize and Configure Sifnode
Now let's initialize the node by executing the following:
where "test-node" is the moniker and "sichain-1" the chain id.
Download the Latest Genesis File
Go to the config director
Download the latest genesis file in this directory by using the following:
Unzip the genesis file by using the following:
Select “Y” to overwrite the old genesis file.
Setup Persistent Peers
Execute the following command:
Setup the node’s External Address
Next we need to set up the external address which is the public IP address of the node. Change the <bind_ip_address> to the address of your node:
Download the Snapshot
Instead of syncing from Genesis we can download a current snapshot of the database to speed up the synchronization process . Let's download the current snapshot provided by one of our community members. Set the snapshot file name using the following:
Change to the data directory:
and then download the snapshot using:
After the file is downloaded unpack using the following:
Note: The download and unpacking of the snapshot will still take several hours. Just keep calm and be patient while the node syncs with the state of the chain :)
Setup Cosmovisor as a Service
Create the following service file:
Add the following content to the file. Make sure to change the <your-user>, <path-to-cosmovisor> and <path-to-sifnoded> values:
Let's try to start cosmovisor. First reload the systemctl daemon:
Then enable the Cosmovisor service:
We can now start Cosmovisor:
We can check that the service is running by executing:
Stake the Node
In order to participate in consensus, you'll need to stake your node. Let's generate a new key:
where "test-node" is the name of your node.
NB: Please ensure that you save the mnemonic generated and the keyring password you entered somewhere secure.
Finally stake the node by executing the following, making sure to change the moniker, from and chain-id and other values as required:
Your node should now be accessible on Mintscan. You can delegate more tokens to your node using Keplr as needed.
Last updated