Skip to content

Warden

Installation

Terminal window
# install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Terminal window
# install go, if needed
cd $HOME
VER="1.22.5"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
# set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export WARDEN_CHAIN_ID="chiado_10010-1"" >> $HOME/.bash_profile
echo "export WARDEN_PORT="18"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# download binary
cd $HOME
rm -rf bin
mkdir bin && cd bin
wget https://github.com/warden-protocol/wardenprotocol/releases/download/v0.5.4/wardend_Linux_x86_64.zip
unzip wardend_Linux_x86_64.zip
chmod +x wardend
mv $HOME/bin/wardend $HOME/go/bin
# config and init app
wardend init $MONIKER
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${WARDEN_PORT}657\"|" $HOME/.warden/config/client.toml
# download genesis and addrbook
wget -O $HOME/.warden/config/genesis.json https://server-4.itrocket.net/testnet/warden/genesis.json
wget -O $HOME/.warden/config/addrbook.json https://server-4.itrocket.net/testnet/warden/addrbook.json
# set seeds and peers
SEEDS="8288657cb2ba075f600911685670517d18f54f3b@warden-testnet-seed.itrocket.net:18656"
PEERS="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,248a90408700cca7acc2f449252dc67ab3f9aec5@65.109.30.35:19656,cd62842978a2a35207d6790494d69916a0f539f6@144.76.70.103:13656,1351dc805a024c762ba913fbb1c74839924bf40c@185.16.38.165:18656,42f57439739621cccdece7d92bf15a653471c0b7@163.172.64.81:26656,fa924f15269701ca13f88046b97c56b3de26e173@46.4.94.60:26656,29dfeed0f7933111c5452a1af4ca67b2fe4346f5@198.27.80.53:26656,6e8d8cb0c1c3ccd6bb3ebbe06aea32ae9f881f84@62.169.25.226:33656,2f99ac7e72cc8c1f951e027d6088b8a920163237@65.109.111.234:18656,5c6e4b58ffdf77c4052419dd661ad76db276e992@2.58.82.159:11956,de9e8c44039e240ff31cbf976a0d4d673d4e4734@188.165.213.192:26656,a6889db081dd21407b0f4c5fc2f6816295a905ff@100.42.177.205:26656,9a08ee57be6a0a603d9c1f388c502a1838eca6d5@45.159.230.250:656,271f42834c69804887e887a3672105850cc8f1d3@135.181.215.60:12656,26943d39c1a2c39b87d14cafaad1c323e1960291@65.109.84.33:27356,208b9d568c787d9be1dfd4a6de663c852424f8f4@91.227.33.18:18656,33afcd959a69de3f613955b383a6935846670a69@135.181.228.89:19656,8405984f8a96676bce6f45fee80ca65e42ae6511@65.109.69.117:10656,954ff2f073e8c1db596da47230a8904f480b2f16@65.108.100.31:11856,e5b0d4ae06d5dd9042bdd8ed246f1e1d40a1f48b@195.201.122.194:26656,d5126141e065986f97e568c360b7b517ed2dc52a@5.75.159.246:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.warden/config/config.toml
# set custom ports in app.toml
sed -i.bak -e "s%:1317%:${WARDEN_PORT}317%g;
s%:8080%:${WARDEN_PORT}080%g;
s%:9090%:${WARDEN_PORT}090%g;
s%:9091%:${WARDEN_PORT}091%g;
s%:8545%:${WARDEN_PORT}545%g;
s%:8546%:${WARDEN_PORT}546%g;
s%:6065%:${WARDEN_PORT}065%g" $HOME/.warden/config/app.toml
# set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${WARDEN_PORT}658%g;
s%:26657%:${WARDEN_PORT}657%g;
s%:6060%:${WARDEN_PORT}060%g;
s%:26656%:${WARDEN_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${WARDEN_PORT}656\"%;
s%:26660%:${WARDEN_PORT}660%g" $HOME/.warden/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.warden/config/app.toml
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "25000000award"|g' $HOME/.warden/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.warden/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.warden/config/config.toml
# create service file
sudo tee /etc/systemd/system/wardend.service > /dev/null <<EOF
[Unit]
Description=Warden node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.warden
ExecStart=$(which wardend) start --home $HOME/.warden
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# reset and download snapshot
wardend tendermint unsafe-reset-all --home $HOME/.warden
curl https://server-4.itrocket.net/testnet/warden/warden_2025-02-22_1808181_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.warden
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable wardend
sudo systemctl restart wardend && sudo journalctl -u wardend -fo cat

Create Wallet

Terminal window
# to create a new wallet, use the following command. don’t forget to save the mnemonic
wardend keys add $WALLET
# to restore exexuting wallet, use the following command
wardend keys add $WALLET --recover
# save wallet and validator address
WALLET_ADDRESS=$(wardend keys show $WALLET -a)
VALOPER_ADDRESS=$(wardend keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
# check sync status, once your node is fully synced, the output from above will print "false"
wardend status 2>&1 | jq
# before creating a validator, you need to fund your wallet and check balance
wardend query bank balances $WALLET_ADDRESS

Create Validator

Terminal window
cd $HOME
# Create validator.json file
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(wardend comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
\"amount\": \"1000000award\",
\"moniker\": \"test\",
\"identity\": \"\",
\"website\": \"\",
\"security\": \"\",
\"details\": \"\",
\"commission-rate\": \"0.1\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}" > validator.json
# Create a validator using the JSON configuration
wardend tx staking create-validator validator.json \
--from $WALLET \
--chain-id chiado_10010-1 \
--gas auto --gas-adjustment 1.6 --fees 250000000000000award