Node Installation

Warden Protocol node installation

Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install Go if nedeed

cd $HOME
VER="1.21.3"
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 variables

You can change the variables here as you want.

echo "export WALLET_NAME="MyWallet"" >> $HOME/.bash_profile
echo "export MONIKER="MyNodes"" >> $HOME/.bash_profile
echo "export WARDEN_PORT="212"" >> $HOME/.bash_profile

source $HOME/.bash_profile

Download binary

cd $HOME
rm -rf wardenprotocol
git clone --depth 1 --branch v0.3.0 https://github.com/warden-protocol/wardenprotocol/
cd wardenprotocol
make install

Configure Warden App

wardend init $MONIKER --chain-id buenavista-1
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${WARDEN_PORT}657\"|" $HOME/.warden/config/client.toml

Download genesis and addrbook

curl -Ls https://krews.xyz/snapshots/data/warden/genesis.json > $HOME/.warden/config/genesis.json
curl -Ls https://krews.xyz/snapshots/data/warden/addrbook.json > $HOME/.warden/config/addrbook.json

Set seeds and peers

SEEDS="25ed2cb891b05bd5a28725cd19df601360b7cfdb@warden-seed.krews.xyz:11256"
PEERS="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,7e9adbd0a34fcab219c3a818a022248c575f622b@65.108.227.207:16656,bda08962882048fea4331fcf96ad02789671700e@65.21.202.124:35656,dc0122e37c203dec43306430a1f1879650653479@37.27.97.16:26656,eee54c85c14748f7793738fadbc747ed1511efac@176.9.58.5:46656,8902e6a170e08225023a7fdd8b875c0349fef703@135.181.129.164:26656,0d7dcb4ab5648599d78295ede609f481df9854ea@84.247.161.158:18656,4c5e23584c96cef5b5410aa71797917664afcb7f@213.199.61.1:26656,2f769486f886faafadcfee2d96a889728cf45a94@38.242.237.130:11256,b209b221edc3c8a61c50ad895f6852b08cf718f5@173.212.232.122:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.warden/config/config.toml

Set custom ports

for app.toml
sed -i.bak -e "s%:1317%:${WARDEN_PORT}17%g;
s%:8080%:${WARDEN_PORT}80%g;
s%:9090%:${WARDEN_PORT}90%g;
s%:9091%:${WARDEN_PORT}91%g;
s%:8545%:${WARDEN_PORT}45%g;
s%:8546%:${WARDEN_PORT}46%g;
s%:6065%:${WARDEN_PORT}65%g" $HOME/.warden/config/app.toml
for config.toml
sed -i.bak -e "s%:26658%:${WARDEN_PORT}58%g;
s%:26657%:${WARDEN_PORT}57%g;
s%:6060%:${WARDEN_PORT}60%g;
s%:26656%:${WARDEN_PORT}56%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${WARDEN_PORT}56\"%;
s%:26660%:${WARDEN_PORT}60%g" $HOME/.warden/config/config.toml

Set minimum gas price

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.0025uward"|g' $HOME/.warden/config/app.toml

Configure 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 = \"50\"/" $HOME/.warden/config/app.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=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

Reset node and download snapshot

wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book
if curl -s --head curl https://krews.xyz/snapshots/warden/latest.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
  curl https://krews.xyz/snapshots/warden/latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.warden
    else
  echo snapshot not found
fi

Allow P2P port

sudo ufw allow ${WARDEN_PORT}56/tcp

Enable and start node service

sudo systemctl daemon-reload
sudo systemctl enable wardend
sudo systemctl restart wardend && sudo journalctl -fu wardend

Create wallet

wardend keys add ${WALLET_NAME}
# then faucet your wallet
curl --data '{"address": "Enter-Your-Wallet-Address-Here"}' https://faucet.buenavista.wardenprotocol.org

Create validator

cd $HOME
# Create validator.json file. You can set identity, website, details as you wish.
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(wardend comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
    \"amount\": \"1000000uward\",
    \"moniker\": \"${MONIKER}\",
    \"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_NAME} \
    --chain-id buenavista-1 \
	--gas auto --gas-adjustment 1.5 --fees 600uward \

Delete node

sudo systemctl stop wardend
sudo systemctl disable wardend
sudo rm -rf /etc/systemd/system/wardend.service
sudo rm $(which wardend)
sudo rm -rf $HOME/.warden
sed -i "/WARDEN_/d" $HOME/.bash_profile

Last updated