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="[email protected]:11256"
PEERS="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,[email protected]:16656,[email protected]:35656,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:18656,[email protected]:26656,[email protected]:11256,[email protected]: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

Was this helpful?