Warden Protocol

The Warden Protocol is a modular L1 blockchain for omnichain applications, "OApps". Our mission is to empower developers to simply launch secure OApps by giving them modular infrastructure for securit

Resources

Hardware requirements

4 cores

8 GB

150 GB NVME

-

Linux (Ubuntu 22.04 x64)

Installation 💾

Update repositories

apt update && apt upgrade -y

Install dependencies

apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y

Install GO 1.22.2

sudo rm -rf /usr/local/go && \
curl -L https://go.dev/dl/go1.22.2.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local && \
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && \
source .bash_profile && \
go version

Get binaries

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

cd $HOME
mkdir download && cd download
wget https://github.com/warden-protocol/wardenprotocol/releases/download/v0.4.1/wardend_Linux_x86_64.zip
unzip wardend_Linux_x86_64.zip
rm wardend_Linux_x86_64.zip
chmod +x $HOME/download/wardend
sudo mv $HOME/download/wardend $(which wardend)


wardend version --long | grep -e version -e commit
# version: v0.4.1
# commit: 5a8cd6e89d5931cdc131b786d1157431a8b27dc5

Initialize

change the <your-moniker>

wardend init <your-moniker> --chain-id buenavista-1

Download genesis.json

wget -O $HOME/.warden/config/genesis.json "https://raw.githubusercontent.com/warden-protocol/networks/main/testnets/buenavista/genesis.json"

Checksums:

sha256sum ~/.warden/config/genesis.json
# 084571d20aa6bb8c69e59308a19a407035d5fc93ad538feab0211f3e95e4bfc8

Download addrbook.json

wget -O $HOME/.warden/config/addrbook.json https://testnet-files.itrocket.net/warden/addrbook.json

Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers in client.toml

Manually edit client.toml

chain-id = "buenavista-1"

Minimum gas price in app.toml

sed -i.bak -e "s/^minimum-gas-prices =./minimum-gas-prices = "0.0025uward"/;" ~/.warden/config/app.toml

Add seeds/bpeers/peers in config.toml

external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address =./external_address = "$external_address:26656"/" $HOME/.warden/config/config.toml
peers="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,61446070887838944c455cb713a7770b41f35ac5@37.60.249.101:26656,8288657cb2ba075f600911685670517d18f54f3b@65.108.231.124:18656,0be8cf6de2a01a6dc7adb29a801722fe4d061455@65.109.115.100:27060"
sed -i -e "s|^persistent_peers =.|persistent_peers = "$peers"|" $HOME/.warden/config/config.toml

seeds="8288657cb2ba075f600911685670517d18f54f3b@warden-testnet-seed.itrocket.net:18656"
sed -i.bak -e "s/^seeds =.*/seeds = "$seeds"/" $HOME/.warden/config/config.toml

(Optional) Pruning

pruning="custom"
pruning_keep_recent="1000"
pruning_interval="10"
sed -i -e "s/^pruning =./pruning = "$pruning"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-keep-recent =./pruning-keep-recent = "$pruning_keep_recent"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-interval =./pruning-interval = "$pruning_interval"/" $HOME/.warden/config/app.toml

(Optional) Disable indexer

default indexer="kv"

indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.warden/config/config.toml

(Optional) Enable snapshots

default snapshot_interval=0

snapshot_interval=1000
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.warden/config/app.toml

Create a service file

tee /etc/systemd/system/wardend.service > /dev/null <<EOF
[Unit]
Description=wardend
After=network-online.target

[Service]
User=$USER
ExecStart=$(which wardend) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload

(Optional) Start from State sync

If you don't want to wait for a long synchronization you can use it

peers="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,61446070887838944c455cb713a7770b41f35ac5@37.60.249.101:26656,dc0122e37c203dec43306430a1f1879650653479@37.27.97.16:26656,8fa927f5255b24b28757008ae279ff6ef9a6eeed@65.21.69.53:18656,6fb5cf2179ca9dd98ababd1c8d29878b2021c5c3@146.19.24.175:26856,aa59909de26202791f252365b6d62fdd766e11df@163.172.64.81:26656,67942b2d748b4e69eba4c09b062c541d2a88bfde@31.220.75.114:18656,bda08962882048fea4331fcf96ad02789671700e@65.21.202.124:35656,8fa48bbd20d316382f339bd00f31d3a2678682d2@144.76.29.90:26656,fe10d13a8e26093384f699b9db9a1d3e9347eb80@113.166.213.91:36656,3c5225cd40fcf3c489e2078896f0bdc816d48dc2@155.133.26.219:18656"  
SNAP_RPC="https://warden-testnet-rpc.itrocket.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.warden/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.warden/config/config.toml
systemctl enable wardend
systemctl restart wardend
journalctl -u wardend -f -o cat

Create or recover wallet

!!! BACKUP YOUR SEED PHRASE !!!

wardend keys add <wallet-name> --keyring-backend os

OR

wardend keys add <wallet-name> --recover --keyring-backend os

Get tokens from faucet 🆓

https://spaceward.buenavista.wardenprotocol.org/

Create Validator

get pubkey:

wardend comet show-validator

edit validator.json. replace <pubkey>, <moniker>

nano $HOME/.warden/validator.json
{
  "pubkey": <{your-pubkey}>,
  "amount": "1000000uward",
  "moniker": "<your-moniker>",
  "identity": "",
  "website": "",
  "security": "",
  "details": "",
  "commission-rate": "0.05",
  "commission-max-rate": "0.5",
  "commission-max-change-rate": "0.5",
  "min-self-delegation": "1"
}

send tx. replace <wallet-name>

wardend tx staking create-validator $HOME/.warden/validator.json \
    --from=<wallet-name> \
    --chain-id=buenavista-1 \
    --fees=500uward

!!! BACKUP YOUR priv_validator_key.json !!!

Useful commands ⚙️

node info

wardend status 2>&1 | jq

logs

sudo journalctl -u wardend -f

start service

sudo systemctl start wardend

stop service

sudo systemctl stop wardend

restart service

sudo systemctl start wardend

enable service

sudo systemctl enable wardend

disable service

sudo systemctl disable wardend

list all wallets

wardend keys list

check balance

wardend q bank balances <wallet-name>

Check valoper-address

wardend keys show <wallet-name> --bech val

Withdraw all rewards (change wallet-name)

wardend tx distribution withdraw-all-rewards --from <wallet-name> --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward 

Withdraw rewards and commission from your validator (change wallet-name and valoper-address)

wardend tx distribution withdraw-rewards <valoper-address> --from <wallet-name> --commission --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward -y 

Delegate to Yourself (change wallet-name twice) (amount 1 token)

wardend tx staking delegate $(wardend keys show <wallet-name> --bech val -a) 1000000uward --from <wallet-name> --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward -y 

Delegate (change <to valoper address> and wallet-name)

wardend tx staking delegate <to-valoper-address> 1000000uward --from <wallet-name> --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward -y 	

Redelegate Stake to Another Validator

wardend tx staking redelegate <valoper-address> <to-valoper-address> 1000000uward --from <wallet-address> --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward -y 

Unbond

wardend tx staking unbond $(wardend keys show <wallet-name> --bech val -a) 1000000uward --from <wallet-name> --chain-id buenavista-1 --gas auto --gas-adjustment 1.5 --fees 600uward -y 

Transfer funds

wardend tx bank send <wallet-name> <to-valoper-address> 1000000uward --gas auto --gas-adjustment 1.5 --fees 600uward -y 

Delete node 🗑️

sudo systemctl stop wardend && sudo systemctl disable wardend
rm /etc/systemd/system/wardend.service
sudo systemctl daemon-reload
cd $HOME
rm -rf wardenprotocol && rm -rf .warden && rm -rf $(which wardend)

Last updated