Install (with cosmosvisor)

Installation with Cosmovisor

Install Dependencies

command dependencies
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade

Setup Moniker, Wallet, and PORT

change the WALLET, MONIKER, and CUSTOM_PORT environment

command setup bash_profile
echo "export WALLET="<your-wallet-name>"" >> $HOME/.bash_profile
echo "export MONIKER="<your-moniker-name>"" >> $HOME/.bash_profile
echo "export CUSTOM_PORT="<your-custom-port>"" >> $HOME/.bash_profile // Please note that updating the port is optional!
echo "export SIDE_CHAIN_ID="side-testnet-2"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Install Go

command install golang
cd $HOME
VER="1.21.3" // change to the latest version or spesific version
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

Build binary

Cloning project repository & Compile binaries

command donwload binary
cd $HOME
git clone --depth 1 --branch v0.1.0 https://github.com/warden-protocol/wardenprotocol/
cd  wardenprotocol/warden/cmd/wardend
go build

Cosmovisor Setup

command
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Configure cosmovisor

command
cd $HOME
export DAEMON_NAME=wardend
export DAEMON_HOME=$HOME/.warden
cosmovisor init $(which wardend)

Initialize and config node:

command
wardend config chain-id alfama
wardend config keyring-backend test
wardend init "YOUR_MONIKER" --chain-id alfama

Download Genesis and Addressbook

ℹ️

we are still in the process to provide genesis and address book files, we recommend to use files from the official warden protocol or from genznodes.dev below

command
wget https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json

Set minimum gas price & peers

command
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uward"/' app.toml
sed -i 's/persistent_peers = ""/persistent_peers = "6a8de92a3bb422c10f764fe8b0ab32e1e334d0bd@sentry-1.alfama.wardenprotocol.org:26656,7560460b016ee0867cae5642adace5d011c6c0ae@sentry-2.alfama.wardenprotocol.org:26656,24ad598e2f3fc82630554d98418d26cc3edf28b9@sentry-3.alfama.wardenprotocol.org:26656"/' config.toml

Create Service File

script service file
sudo tee /etc/systemd/system/wardend.service > /dev/null <<EOF
[Unit]
Description="Warden Protocol daemon node"
After=network-online.target
 
[Service]
User=$USER
Environment="DAEMON_NAME=wardend"
Environment="DAEMON_HOME=$HOME/.warden"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_PREUPGRADE_MAX_RETRIES=0"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=3
LimitNOFILE=65535
 
[Install]
WantedBy=multi-user.target
EOF

start service

script service file
sudo systemctl daemon-reload
sudo systemctl enable wardend
sudo systemctl start wardend
journalctl -fu wardend -o cat

GOT ERROR ?

If you see logs error like this, pay attention to UPGRADE_NAME:

error
Error: binary not present
stat $HOME/.warden/cosmovisor/upgrades/[${UPGRADE_NAME}]/bin/wardend: no such file or directory"
wardend.service: Main process exited, code=exited, status=1/FAILURE
wardend.service: Failed with result 'exit-code'.

Fix with:

error
export DAEMON_NAME=wardend
export DAEMON_HOME=$HOME/.warden
cosmovisor add-upgrade [${UPGRADE_NAME}] $(which wardend)