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

CPU

4 cores

RAM

8 GB

Storage

150 GB NVME

Network

-

OS

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.24.0.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 bin
mkdir bin && cd bin
wget -O wardend https://github.com/warden-protocol/wardenprotocol/releases/download/v0.6.3/wardend-0.6.3-linux-amd64
chmod +x wardend
mv $HOME/bin/wardend $HOME/go/bin


wardend version --long | grep -e version -e commit
# version: v0.6.3

Set vars (replace Moniker and wallet)

echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="MONIKER"" >> $HOME/.bash_profile
echo "export WARDEN_CHAIN_ID="chiado_10010-1"" >> $HOME/.bash_profile
echo "export WARDEN_PORT="26"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Initialize

change the <your-moniker>

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

Download genesis.json

cd $HOME/.warden/config
wget https://raw.githubusercontent.com/warden-protocol/networks/main/testnets/chiado/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 = "chiado_10010-1"

Minimum gas price in app.toml

sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "2000award"/' 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:{$WARDEN_PORT}656"/" $HOME/.warden/config/config.toml
PEERS="b14f35c07c1b2e58c4a1c1727c89a5933739eeea@warden-testnet-peer.itrocket.net:18656,8a46610d69921c1031ea536cd5dca0a2979cf1b2@168.119.10.134:29479,56f46b5a7fd2c5cdc24d8964cc8d3ec12ee6cc4e@138.201.62.254:27356,73a865805db875019306049cf9bc83a05180ff80@57.128.193.18:20145,8616e56514557f9006f42e19313e50b1776b9435@74.241.250.28:30856,29dfeed0f7933111c5452a1af4ca67b2fe4346f5@198.27.80.53:26656,bc864f9f16ccf5244ed3a0537f5838ffb3c61269@65.108.203.61:39656,8a2624792884eb8135ae7b11b739688388fa2e55@65.109.83.40:27356,4eebb0b81c59639f9c82de3525de18fcfc55318e@5.9.116.21:27356,8a3bde424363d40264f5ea7fc4626108472cd9fd@65.108.227.207:16656,4e0bbc78c8b26926ccc29b59fbde9f935abbcbe8@144.76.70.103:13656,4c54d61784741680d7398367a47c42b6ff32ae7e@38.242.249.55:18656,fa9955b398952c4a1b73f53ca649fd4e9cad9c81@65.108.74.113:11956,3f59e02ff9372caf39186b2ed3e74e328d3f4ca8@65.108.14.235:11956,1b364274f2327ff55c1e5a11566b4e9789dcef82@94.130.143.122:30656,41a3a66993696c5e5d44945de2036227a4578fb3@195.201.241.107:56296,bee9e9daec3ca13b7961115790db642f84e1c277@37.27.97.16:26656,4f721cf7df1ae8833f2c41437e25d8b188a2b3be@65.109.75.155:11956,4291fec222303269daf0cb564f5f321262e84bb4@46.4.169.227:27656,7e886df20e746a360ddc22e622ae9448089bde40@49.12.129.31:26656,e851e59b5fac272f76ccdcbf6cb84ab3d2b070ea@65.108.230.113:21406"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.warden/config/config.toml

sed -i 's/seeds = ""/seeds = "2d2c7af1c2d28408f437aef3d034087f40b85401@52.51.132.79:26656"/' 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

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
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://faucet.chiado.wardenprotocol.org/

Create Validator

get pubkey:

wardend comet show-validator

create validator.json

echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(wardend comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
    \"amount\": \"1000000award\",
    \"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

send tx

wardend tx staking create-validator validator.json \
    --from $WALLET \
    --chain-id chiado_10010-1 \
	--gas auto --gas-adjustment 1.6 --fees 250000000000000award

!!! 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