# Warden Protocol

<https://twitter.com/wardenprotocol>\
<https://discord.gg/wardenprotocol>

## Public Endpoints

<https://warden-rpc.validatorvn.com/>

<https://warden-api.validatorvn.com/>

warden-grpc.validatorvn.com:19090

Peer Node: <248257ce9c6118a4ef5d49565b8373d6bd750b8d@warden-rpc.validatorvn.com>:19656

## Explorer

<https://explorer.validatorvn.com/Warden-Testnet>

## Snapshots

```
sudo systemctl stop wardend

cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup

rm -rf $HOME/.warden/data $HOME/.warden/wasmPath
curl https://snapshot.validatorvn.com/warden/data.tar.lz4 | lz4 -dc - | 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
```

## State-Sync

```
sudo systemctl stop wardend

SNAP_RPC="https://warden-rpc.validatorvn.com:443"
cp $HOME/.warden/data/priv_validator_state.json $HOME/.warden/priv_validator_state.json.backup
wardend tendermint unsafe-reset-all --home ~/.warden/ --keep-addr-book

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
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\"|" ~/.warden/config/config.toml
more ~/.warden/config/config.toml | grep 'rpc_servers'
more ~/.warden/config/config.toml | grep 'trust_height'
more ~/.warden/config/config.toml | grep 'trust_hash'

sudo mv $HOME/.warden/priv_validator_state.json.backup $HOME/.warden/data/priv_validator_state.json

sudo systemctl restart wardend && journalctl -u wardend -f -o cat
```

## Genesis & Addrbook

```
curl -L https://snapshot.validatorvn.com/warden/addrbook.json > $HOME/.warden/config/addrbook.json
curl -L https://snapshot.validatorvn.com/warden/genesis.json > $HOME/.warden/config/genesis.json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://services.validatorvn.com/warden-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
