RPC, Peers, Seed, Addrbook, Genesis
peers:
7233f22a664457479a6b194f590f2db95c726240@namada-testnet-peer.itrocket.net:33656
seed:
59976ccee681325acda4c9e2e77e21b085f88826@namada-testnet-seed.itrocket.net:33656
live peers:
active peers: 0 (upd. every 10 sec)
PEERS="tcp://7233f22a664457479a6b194f590f2db95c726240@namada-testnet-peer.itrocket.net:33656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/config/config.toml
addrbook:
updates every hour
wget -O $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/config/addrbook.json https://server-4.itrocket.net/testnet/namada/addrbook.json
genesis
wget -O $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/config/genesis.json https://server-4.itrocket.net/testnet/namada/genesis.json
Snapshot
## Snapshot is not available yet
updates every 4h
sudo systemctl stop namadad
SNAP_NAME=$(curl -s https://server-4.itrocket.net/testnet/namada/.current_state.json | jq -r '.snapshot_name')
cp $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/data/priv_validator_state.json $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/priv_validator_state.json.backup
rm -rf $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/data $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/{db,wasm}
curl https://server-4.itrocket.net/testnet/namada/$SNAP_NAME | lz4 -dc - | tar -xf - -C $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b
mv $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/priv_validator_state.json.backup $HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/cometbft/data/priv_validator_state.json
sudo systemctl restart namadad && sudo journalctl -u namadad -f
Node Sync Status Checker
#!/bin/bash
rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.local/share/namada/housefire-head.a03c8e8948ed20b/config/config.toml" | cut -d ':' -f 3)
while true; do
local_height=$(curl -s localhost:$rpc_port/status | jq -r '.result.sync_info.latest_block_height')
network_height=$(curl -s https://namada-testnet-rpc.itrocket.net/status | jq -r '.result.sync_info.latest_block_height')
if ! [[ "$local_height" =~ ^[0-9]+$ ]] || ! [[ "$network_height" =~ ^[0-9]+$ ]]; then
echo -e "\033[1;31mError: Invalid block height data. Retrying...\033[0m"
sleep 5
continue
fi
blocks_left=$((network_height - local_height))
if [ "$blocks_left" -lt 0 ]; then
blocks_left=0
fi
echo -e "\033[1;33mYour Node Height:\033[1;34m $local_height\033[0m \033[1;33m| Network Height:\033[1;36m $network_height\033[0m \033[1;33m| Blocks Left:\033[1;31m $blocks_left\033[0m"
sleep 5
done