Archway Validator — Quick Setup Guide
Archway is a Tendermint-based smart contract platform that rewards developers for the value they provide to the network. Developers are rewarded proportional to the usage of the dApps they build and launch.
Currently, Archway is carrying out its testnet, whereby validators are being set up and are run throughout the testing phase of the network before the project moves to mainnet.
In this guide, we will go through the step-by-step process of setting up and running a post-genesis validator.
Let’s begin!
System Requirements
Recommended infrastructure for running a node on the Torii testnet is the following:
- 4 GB RAM, x64 2.0 GHz 2v CPU
- 512 GB SSD
- Stable internet connection
Linux and macOS are supported
M1 Macs are not supported by CosmWasm currently. Read https://github.com/CosmWasm/wasmvm#overview for more information.
You can choose to modify the parameters described here: https://github.com/tendermint/tendermint/blob/master/docs/nodes/running-in-production.md#configuration-parameters
System requirement reference for Tendermint Consensus: https://github.com/tendermint/tendermint/blob/master/docs/nodes/running-in-production.md#hardware
Install Dependencies
- Check for updates, upgrade and install dependencies.
sudo apt-get updatesudo apt-get upgrade -ysudo apt-get install build-essential -ysudo apt-get install jq -y
Install Go
# First remove any existing old Go installationsudo rm -r /usr/local/gosudo rm -r ~/go# Install correct Go versionsudo wget https://golang.org/dl/go1.18.linux-amd64.tar.gzsudo tar -xvf go1.18.linux-amd64.tar.gzsudo rm go1.18.linux-amd64.tar.gzsudo mv go /usr/local
Create a User
2. Create and switch to a user ‘validator’ for running the node:
#(Note: --disabled-login is an alternative and more secure way of creating a user which can be accessed only through root.)sudo adduser validator --disabled-login
su validator
3. Create the GO working path folder for Archway and set the appropriate GO environmental variables to the user’s profile:
mkdir ~/goecho 'GOROOT=/usr/local/go' >> ~/.bashrcecho 'GOPATH=~/go' >> ~/.bashrcecho 'PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc#We use source to make the changes of the file applicablesource .bashrc#Check that GOROOT and GOPATH are correctly setecho $GOROOT
echo $GOPATH
Install Archway binary
4. Retrieve the source code
git clone https://github.com/archway-network/archwaycd archwaygit checkout main
5. Install
make install
Configure the environment
6. Initialize data to generate the config files
archwayd init <your-moniker> --chain-id torii-1
7. Download genesis from https://raw.githubusercontent.com/archway-network/testnets/main/torii-1/genesis.json and put it in the home directory:
wget https://raw.githubusercontent.com/archway-network/testnets/main/torii-1/genesis.jsonmv genesis.json /home/validator/.archway/config
Set Network Parameters
8. Download persistent_peers.txt from archway-network/testnets repository:
curl -sL https://raw.githubusercontent.com/archway-network/testnets/main/torii-1/persistent_peers.txt
Add the returned peer for the above command to your config.toml, which is located in /home/validator/.archway/config
It would be ideal to add other validator peers. These are normally shared on the discord.
# Comma separated list of nodes to keep persistent connections to
persistent_peers = "<add peers here>"
Running as a service
We will now run our executable as a service in order for it to be easily managed. In your system directory as a root user at /etc/systemd/system create a new service file named validator.service
nano validator.service
Use the below service file and change any specific parameters respective to your setup.
[Unit]
Description=Archway Testnet Valdator
After=network-online.target[Service]
User=validator
ExecStart=/home/validator/go/bin/archwayd start
Restart=always
RestartSec=3
LimitNOFILE=4096[Install]
WantedBy=multi-user.target
The following are systemctl commands, used to manage your service:
Enable automatic restart of your daemon
systemctl enable validator.service
To reload your systemd files, run this after you have edited your service file
systemctl daemon-reload
Restart your service
systemctl restart validator.service
Start your service
systemctl start validator.service
Stop your service
systemctl stop validator.service
View logs
journalctl -u validator.service -f
Create keys
archwayd keys add <key-name>
Request utorii from faucet in Discord
You will need sufficient utorii in order to carry out the create validator transaction, which can be requested on the Archway discord server in the #faucet channel
Create Validator
In order to create your validator, make sure you are fully synced to the latest block height of the network.
You can check by using the following command:
curl -s localhost:26657/status | jq .result | jq .sync_info
In the output of the above command make sure catching_up is false
“catching_up”: false
archwayd tx staking create-validator \
--from <wallet name> \
--amount 1000000utorii \
--min-self-delegation 1000000 \
--commission-rate 0.1 \
--commission-max-rate 0.1 \
--commission-max-change-rate 0.01 \
--pubkey $(archwayd tendermint show-validator) \
--chain-id=torii-1 \
That’s it now you can find your validator operator address using the following command, which you can advertise to receive delegations:
archwayd keys show <wallet name> --bech val -a
Check out the following explorer to have a visual representation of all sorts of information and activity going on the Archway testnet network.
Monitoring your node/nodes is key to maintaining uptime and mitigating any shortfalls, which may result in your validator being slashed. You can check out our open source monitoring and alerting solution for Cosmos nodes, PANIC by Simply Staking. It is compatible with any chain built using the Cosmos SDK, such as Archway.
Note that a new release of the new PANIC integration will be available by end of April 2022(this coming week).
Useful Commands
Create a wallet
archwayd keys add <wallet_name>
Recovering a wallet
archwayd keys add <wallet_name> --recover
List all the wallets and their addresses and public keys:
archwayd keys list
Checking wallet balance
archwayd q bank balances <wallet_address>
Show valoper address
archwayd keys show <wallet name> --bech val -a
Check binary version
archwayd version --long
Retrieve the node ID
archwayd tendermint show-node-id
Create a validator
archwayd tx staking create-validator \
--from <wallet name> \
--amount 1000000utorii \
--min-self-delegation 1000000 \
--commission-rate 0.1 \
--commission-max-rate 0.1 \
--commission-max-change-rate 0.01 \
--pubkey $(archwayd tendermint show-validator) \
Check node status
curl localhost:26657/status
Check synchronization status
curl -s localhost:26657/status | jq .result.sync_info.catching_up
Check the maximum number of validators in the active set
archwayd q staking params | grep max_validators
Display a list of Bonded validators
archwayd q staking validators -o json --limit=1000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '.tokens + " - " + .description.moniker' | sort -gr | nl
Display a list of Unbonded validators
archwayd q staking validators -o json --limit=1000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '.tokens + " - " + .description.moniker' | sort -gr | nl
Concluding remarks
Archway relies on a set of validators to secure the network, therefore as a validator your role is to run a full-node and participate in consensus by signing and committing new blocks.
The purpose of the testnet, other than test the durability and functionality of the chain, is for anyone to experience and get acquainted with the process of running a node on the network. Therefore, it is encouraged to ask questions and experiment with different configurations, as it exists for this purpose.
Ultimately, running a validator on Archway is a great opportunity to interact with the chain before it goes live on mainnet and besides that, there are several other challenges available to participate in.
Learn more about Archway here: archway.io.
Stay tuned to Simply Staking for more Archway related guides and documentation:
- Website: https://simply-vc.com.mt
- Twitter: https://twitter.com/SimplyStaking
- Discord: https://discord.gg/Kpzc58Gu9a
- Telegram: https://t.me/SimplyVC