Creating a validator node for Archway

Staking4All
5 min readMay 4, 2022

--

The Archway blockchain will, in future, make it easy to deploy smart contracts on Cosmos. The smart contract platform is owned, operated, and governed by the Archway developer community. The more impactful, highly used open-source dapps developers build, the more money they earn.

Below we have put together a video explaining and showing you how to create your own validator node on Archway.

Continue reading to see all the steps and commands used in the video.

Step 1 — Install base node and setup ubuntu

Create a node on your favourite cloud provider and install your preferred Linux operating system. For this guide we used Ubuntu version 20.04 LTS. To follow this guide easily, we recommend also using Ubuntu. Make sure to update the packages. It is important to set up a firewall and add any ports we may need.

sudo apt-get update
sudo apt-get upgrade
sudo apt install htop
sudo apt-get install screen
--add firewall
sudo apt-get install ufw
sudo ufw allow 22/tcp
sudo ufw allow 26656/tcp
sudo ufw enable
sudo ufw status

Install Git as well as the other packages required for the Archway node set up.

--install git
sudo apt-get install git
--install pre-requisites
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y

Step 2— Create a user

We create a user that we will utilise for the rest of the installation. It is not good practice to use the root user.

--create user
sudo adduser archway
sudo usermod -a -G sudo archway
su — archway

Step 3— Install binary

We start by installing the latest version of Go

ver="1.17.2"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version

Next we clone the Archway code repository and build the binary

git clone https://github.com/archway-network/archway
cd archway
git checkout main
make install

Step 4 — Configure Validator

Create your validator wallet and be sure to save your mnemonic key and your wallet address. *It is very important to save this in a safe place.

archwayd keys add <wallet.name>

Initialise data in daemon’s home directory and then download the genesis file.

--Initialise
archwayd init staking4all --chain-id torii-1
--Download genesis
wget -qO- https://torii-1.archway.tech/genesis| jq ."result"."genesis" > ~/.archway/config/genesis.json

Now we add the persistent peers in the config file. You will need to scroll down quite far to find the persistent peers parameter. The persistent peers parameter value for the incentivised testnet is: dcc82542a94ab6407733802dd50c098da6f27f72@35.184.247.99:26656

nano ~/.archway/config/config.toml

Step 5 — Start and test the node, then create a service

We start and test our node on the command line to make sure it is working. It will start looking for peers and then start syncing.

archwayd start

Once we see it is working, we stop the node by typing Ctrl+c . Then create a systemd service that can run in the background.

sudo nano /etc/systemd/system/archway.service [Unit]
Description=archway
Requires=network-online.target
After=network-online.target
[Service]
User=archway
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
ExecStart=/home/archway/go/bin/archwayd --home=/home/archway/.archway/ start
[Install]
WantedBy=multi-user.target

Start the service and check service status

sudo service archway start
sudo service archway status

This command is used to check the logs of the node that is now running in the background.

journalctl -f -u archway.service

Step 6 — Wait for your node to sync

We use this command to check the node sync status, pay attention to the ‘latest block height’ parameter, it will increment as you sync new blocks. You will see that the ‘catching up’ parameter is true, this means that the node is not yet in sync with the Archway network. It will take several hours for your node to sync.

You can run this command again every few hours to check your node sync status. When you see that the ‘catching up’ parameter is ‘false’ and the ‘latest block height’ parameter is the same as Archway network’s latest block, your node is in sync.

archwayd status status 2>&1 | jq .SyncInfo

It is possible to sync the node faster using other means, we do not cover this in this guide.

Step 7 — Get testnet tokens

We need to get testnet tokens for our wallet. Let’s check our wallet balance, you will see that the balance is zero.

archwayd query bank balances archway <insert.your.wallet.address>

Go to the Archway faucet to collect testnet tokens. Just follow the steps. Now check your wallet balance again to make sure you have received the tokens.

Step 8 — Create validator

Now that we have our testnet tokens, we can create our validator. Remember to replace <wallet.name> with your own wallet name that you created earlier.

archwayd tx staking create-validator \
--from $(archwayd keys show <wallet.name> -a) \
--amount 1000000utorii \
--min-self-delegation 1000000 \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--pubkey $(archwayd tendermint show-validator) \
--chain-id torii-1

You can visit the Archway explorer and view the active validators in the validator section. Your node will only be visible here when you have accumulated enough delegations to be in the top 100. Navigate to the ‘inactive’ section and search for your validator name. Your validator will be visible here until you get enough delegations to move to the ‘active’ list.

About Staking4All

Staking4All provides non-custodial delegation services to Proof-of-Stake public blockchains. We enable cryptocurrency holders to take part in decentralized governance while holding onto and earning interest from their cryptocurrencies.

We are an experienced staking service provider for blockchain projects. Join our community today and earn rewards for helping secure networks.

Visit our Website, Twitter or our Blog to learn more about Staking4all.

--

--

No responses yet