-
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 security, interoperability and chain abstraction.
- Hardware requirements
- TrustedPoint Services
- Installation guide
- 1. Install required packages
- 2. Install Go
- 3. Build
wardend
binary - 4. Set up variables
- 5. Initialize the node
- 6. Download genesis.json
- 7. Add seeds and peers to the config.toml
- 8. Change ports (Optional)
- 9. Configure prunning to save storage (Optional)
- 10. Set min gas price
- 11. Enable indexer (Optional)
- 12. Create a service file
- 13. Start the node
- 14. Create a wallet for your validator
- 15. Request tokens from the faucet
- 16. Check wallet balance
- 18. Create JSON file
- 19. Make sure everything is correct
- 19. Create a validator
- State sync
- Download fresh addrbook.json
- Add fresh persistent peers
- Download Snapshot
- Useful commands
- Check node status
- Query your validator
- Query missed blocks counter & jail details of your validator
- Unjail your validator
- Delegate tokens to your validator
- Get your p2p peer address
- Edit your validator
- Send tokens between wallets
- Query your wallet balance
- Monitor server load
- Query active validators
- Query inactive validators
- Check logs of the node
- Restart the node
- Stop the node
- Upgrade the node
- Delete the node from the server
- Example gRPC usage
- Example REST API query
- Memory: 8 GB RAM
- CPU: 4 cores
- Disk: 200 GB NVME
- Bandwidth: 1 Gbps
- Linux amd64 arm64 (Ubuntu LTS release)
Parameter | Value |
---|---|
indexing | kv |
pruning | custom (100/17) |
min-retain-blocks | 0 |
snapshot-interval | 2000 |
snapshot-keep-recent | 2 |
minimum-gas-prices | 0.01uward |
- RPC: https://rpc-warden-testnet.trusted-point.com:443
- REST API: https://api-warden-testnet.trusted-point.com:443
- WSS: wss://rpc-warden-testnet.trusted-point.com:443/websocket
- P2P Persistent Peer: b314f4b177c5d52a831d2829fdb9d4f069475dca@peer-warden-testnet.trusted-point.com:29472
- State sync: Guide
- Fresh Snapshot: URL / Guide (Being updated every 10 hours)
- Fresh addrbook: URL / Guide (Being updated every 5 minutes)
- Genesis: URL / Guide
- Live Peers scanner: URL / Guide (Being updated every 5 minutes)
sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
git clone https://github.com/warden-protocol/wardenprotocol
cd wardenprotocol
git checkout v0.3.0
make install
wardend version
# Customize if you need
echo 'export MONIKER="My_Node"' >> ~/.bash_profile
echo 'export CHAIN_ID="buenavista-1"' >> ~/.bash_profile
echo 'export WALLET_NAME="wallet"' >> ~/.bash_profile
echo 'export RPC_PORT="26657"' >> ~/.bash_profile
source $HOME/.bash_profile
cd $HOME
wardend init $MONIKER --chain-id $CHAIN_ID
wardend config set client chain-id $CHAIN_ID
wardend config set client node tcp://localhost:$RPC_PORT
wardend config set client keyring-backend os # You can set it to "test" so you will not be asked for a password
wget https://rpc-warden-testnet.trusted-point.com/genesis.json -O $HOME/.warden/config/genesis.json
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:11256,[email protected]:666,[email protected]:26656,[email protected]:29482,[email protected]:30504,[email protected]:26656" && \
SEEDS="" && \
sed -i \
-e "s/^seeds *=.*/seeds = \"$SEEDS\"/" \
-e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" \
"$HOME/.warden/config/config.toml"
# Customize if you need
EXTERNAL_IP=$(wget -qO- eth0.me) \
PROXY_APP_PORT=26658 \
P2P_PORT=26656 \
PPROF_PORT=6060 \
API_PORT=1317 \
GRPC_PORT=9090 \
GRPC_WEB_PORT=9091
sed -i \
-e "s/\(proxy_app = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$PROXY_APP_PORT\"/" \
-e "s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$RPC_PORT\"/" \
-e "s/\(pprof_laddr = \"\)\([^:]*\):\([0-9]*\).*/\1localhost:$PPROF_PORT\"/" \
-e "/\[p2p\]/,/^\[/{s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$P2P_PORT\"/}" \
-e "/\[p2p\]/,/^\[/{s/\(external_address = \"\)\([^:]*\):\([0-9]*\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/; t; s/\(external_address = \"\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/}" \
$HOME/.warden/config/config.toml
sed -i \
-e "/\[api\]/,/^\[/{s/\(address = \"tcp:\/\/\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$API_PORT\4/}" \
-e "/\[grpc\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_PORT\4/}" \
-e "/\[grpc-web\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_WEB_PORT\4/}" \
$HOME/.warden/config/app.toml
sed -i \
-e "s/^pruning *=.*/pruning = \"custom\"/" \
-e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" \
-e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" \
"$HOME/.warden/config/app.toml"
sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.01uward\"/" $HOME/.warden/config/app.toml
sed -i "s/^indexer *=.*/indexer = \"kv\"/" $HOME/.warden/config/config.toml
sudo tee /etc/systemd/system/warden.service > /dev/null <<EOF
[Unit]
Description=Warden Node
After=network.target
[Service]
User=$USER
Type=simple
ExecStart=$(which wardend) start --home $HOME/.warden
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && \
sudo systemctl enable wardend && \
sudo systemctl restart wardend && \
sudo journalctl -u wardend -f -o cat
P.S. Consider downloading snapshot or using state-sync for the quick sync.
wardend keys add $WALLET_NAME
# DO NOT FORGET TO SAVE THE SEED PHRASE
# You can add --recover flag to restore existing key instead of creating
curl --data '{"address": "'$(wardend keys show $WALLET_NAME --bech acc -a)'"}' https://faucet.alfama.wardenprotocol.org
Make sure your node is fully synced unless it won't work.
wardend status | jq .SyncInfo.catching_up
wardend q bank balances $(wardend keys show $WALLET_NAME -a)
- Define variables to create validator.json file. Modify values if needed
pubkey=$(wardend tendermint show-validator)
amount="1000000uward"
moniker="MyNode"
identity="00000000"
website="https://google.com"
security="[email protected]"
details="Warden Validator"
commission_rate="0.1"
commission_max_rate="0.2"
commission_max_change_rate="0.01"
min_self_delegation="1"
cat <<EOF > $HOME/.warden/config/validator.json
{
"pubkey": $pubkey,
"amount": "$amount",
"moniker": "$moniker",
"identity": "$identity",
"website": "$website",
"security": "$security",
"details": "$details",
"commission-rate": "$commission_rate",
"commission-max-rate": "$commission_max_rate",
"commission-max-change-rate": "$commission_max_change_rate",
"min-self-delegation": "$min_self_delegation"
}
EOF
echo "validator.json file created successfully."
cat $HOME/.warden/config/validator.json
wardend tx staking create-validator $HOME/.warden/config/validator.json \
--chain-id=$CHAIN_ID \
--fees 30000uward \
--gas 2000000 \
--from $WALLET_NAME \
-y
Do not forget to save priv_validator_key.json
file located in $HOME/.warden/config/
sudo systemctl stop wardend
cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup
wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book
PEERS="b314f4b177c5d52a831d2829fdb9d4f069475dca@peer-warden-testnet.trusted-point.com:29472" && \
RPC="https://rpc-warden-testnet.trusted-point.com:443" && \
LATEST_HEIGHT=$(curl -s --max-time 3 --retry 2 --retry-connrefused $RPC/block | jq -r .result.block.header.height) && \
TRUST_HEIGHT=$((LATEST_HEIGHT - 1500)) && \
TRUST_HASH=$(curl -s --max-time 3 --retry 2 --retry-connrefused "$RPC/block?height=$TRUST_HEIGHT" | jq -r .result.block_id.hash) && \
if [ -n "$PEERS" ] && [ -n "$RPC" ] && [ -n "$LATEST_HEIGHT" ] && [ -n "$TRUST_HEIGHT" ] && [ -n "$TRUST_HASH" ]; then
sed -i.bak \
-e "/\[statesync\]/,/^\[/{s/\(enable = \).*$/\1true/}" \
-e "/^rpc_servers =/ s|=.*|= \"$RPC,$RPC\"|;" \
-e "/^trust_height =/ s/=.*/= $TRUST_HEIGHT/;" \
-e "/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" \
-e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" \
$HOME/.warden/config/config.toml
echo -e "\nLATEST_HEIGHT: $LATEST_HEIGHT\nTRUST_HEIGHT: $TRUST_HEIGHT\nTRUST_HASH: $TRUST_HASH\nPEERS: $PEERS\n\nALL IS FINE"
else
echo -e "\nError: One or more variables are empty. Please try again or change RPC\nExiting...\n"
fi
mv $HOME/.warden/priv_validator_state.json.backup $HOME/.warden/data/priv_validator_state.json
sudo systemctl restart wardend && sudo journalctl -u wardend -f -o cat
You should see the following logs. It may take up to 5 minutes for the snapshot to be discovered. If doesn't work, try downloading snapshot
2:39PM INF sync any module=statesync msg="Discovering snapshots for 15s" server=node
2:39PM INF Discovered new snapshot format=3 hash="?^��I��\r�=�O�E�?�CQD�6�\x18�F:��\x006�" height=602000 module=statesync server=node
2:39PM INF Discovered new snapshot format=3 hash="%���\x16\x03�T0�v�f�C��5�<TlLb�5��l!�M" height=600000 module=statesync server=node
2:42PM INF VerifyHeader hash=CFC07DAB03CEB02F53273F5BDB6A7C16E6E02535B8A88614800ABA9C705D4AF7 height=602001 module=light server=node
After some time you should see the following logs. It make take 5 minutes for the node to catch up the rest of the blocks
2:43PM INF indexed block events height=602265 module=txindex server=node
2:43PM INF executed block height=602266 module=state num_invalid_txs=0 num_valid_txs=0 server=node
2:43PM INF commit synced commit=436F6D6D697449447B5B31313720323535203139203132392031353920313035203136352033352031353320313220353620313533203139352031372036342034372033352034372032333220373120313939203720313734203620313635203338203336203633203235203136332039203134395D3A39333039417D module=server
2:43PM INF committed state app_hash=75FF13819F69A523990C3899C311402F232FE847C707AE06A526243F19A30995 height=602266 module=state num_txs=0 server=node
2:43PM INF indexed block events height=602266 module=txindex server=node
2:43PM INF executed block height=602267 module=state num_invalid_txs=0 num_valid_txs=0 server=node
2:43PM INF commit synced commit=436F6D6D697449447B5B323437203134322032342031313620323038203631203138362032333920323238203138312032333920313039203336203420383720323238203236203738203637203133302032323220313431203438203337203235203133302037302032343020313631203233372031312036365D3A39333039427D module=server
wardend status | jq .SyncInfo
sed -i.bak -e "/\[statesync\]/,/^\[/{s/\(enable = \).*$/\1false/}" $HOME/.warden/config/app.toml
sudo systemctl stop wardend && \
wget -O $HOME/.warden/config/addrbook.json https://rpc-warden-testnet.trusted-point.com/addrbook.json
sudo systemctl restart wardend && sudo journalctl -u wardend -f -o cat
wardend status | jq .SyncInfo
The file is being updated every 5 minutes
PEERS=$(curl -s --max-time 3 --retry 2 --retry-connrefused "https://rpc-warden-testnet.trusted-point.com/peers.txt")
if [ -z "$PEERS" ]; then
echo "No peers were retrieved from the URL."
else
echo -e "\nPEERS: "$PEERS""
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" "$HOME/.warden/config/config.toml"
echo -e "\nConfiguration file updated successfully.\n"
fi
sudo systemctl restart wardend && sudo journalctl -u wardend -f -o cat
wardend status | jq .SyncInfo
Peers are being updated every 5 minutes
wget https://rpc-warden-testnet.trusted-point.com/latest_snapshot.tar.lz4
sudo systemctl stop wardend
cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup
wardend tendermint unsafe-reset-all --home $HOME/.warden --keep-addr-book
lz4 -d -c ./latest_snapshot.tar.lz4 | tar -xf - -C $HOME/.warden
mv $HOME/.warden/priv_validator_state.json.backup $HOME/.warden/data/priv_validator_state.json
sudo systemctl restart wardend && sudo journalctl -u wardend -f -o cat
wardend status | jq .SyncInfo
Snapshot is being updated every 3 hours
wardend status | jq
wardend q staking validator $(wardend keys show $WALLET_NAME --bech val -a)
wardend q slashing signing-info $(wardend tendermint show-validator)
wardend tx slashing unjail --from $WALLET_NAME --gas 2000000 --fees 30000uward -y
wardend tx staking delegate $(wardend keys show $WALLET_NAME --bech val -a) <AMOUNT>uward --from $WALLET_NAME --gas 2000000 --fees 30000uward -y
wardend status | jq -r '"\(.NodeInfo.id)@\(.NodeInfo.listen_addr)"'
wardend tx staking edit-validator --website="<WEBSITE>" --details="<DESCRIPTION>" --moniker="<NEW_MONIKER>" --from=$WALLET_NAME --gas 2000000 --fees 30000uward -y
wardend tx bank send $WALLET_NAME <TO_WALLET> <AMOUNT>uward --gas 2000000 --fees 30000uward -y
wardend q bank balances $WALLET_NAME
sudo apt update
sudo apt install htop -y
htop
wardend q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
wardend q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
sudo journalctl -u wardend -f -o cat
sudo systemctl restart wardend
sudo systemctl stop wardend
cd wardenprotocol
git fetch
git checkout tags/<version>
make install
wardend version
# Restrt the node
sudo systemctl restart wardend && sudo journalctl -u wardend -f -o cat
# !!! IF YOU HAVE CREATED A VALIDATOR, MAKE SURE TO BACKUP `priv_validator_key.json` file located in $HOME/.warden/config/
sudo systemctl stop wardend
sudo systemctl disable wardend
sudo rm /etc/systemd/system/wardend.service
rm -rf $HOME/.warden $HOME/wardenprotocol
wget https://github.com/fullstorydev/grpcurl/releases/download/v1.7.0/grpcurl_1.7.0_linux_x86_64.tar.gz
tar -xvf grpcurl_1.7.0_linux_x86_64.tar.gz
chmod +x grpcurl
./grpcurl -plaintext localhost:$GRPC_PORT list
### MAKE SURE gRPC is enabled in app.toml
# grep -A 3 "\[grpc\]" $HOME/.warden/config/app.toml
curl localhost:$API_PORT/cosmos/staking/v1beta1/validators
### MAKE SURE API is enabled in app.toml
# grep -A 3 "\[api\]" $HOME/.warden/config/app.toml