> For the complete documentation index, see [llms.txt](https://stavr-team.gitbook.io/nodes-guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stavr-team.gitbook.io/nodes-guides/archive/persistence-t-halt/sync-checker.md).

# Sync Checker

```bash
RPC_PORT=$(grep '^laddr' $HOME/.persistenceCore/config/config.toml | head -n 1 | awk -F':' '{print $NF}' | tr -d '"')
while true; do
    local_height=$(curl -s localhost:$RPC_PORT/status | jq -r '.result.sync_info.latest_block_height')
    network_height=$(curl -s https://persistence.rpc.t.stavr.tech/status | jq -r '.result.sync_info.latest_block_height')
    blocks_left=$((network_height - local_height))
    estimated_time=$(echo "$blocks_left * 1.60" | bc)
    hours=$(echo "$estimated_time / 3600" | bc)
    minutes=$(echo "($estimated_time % 3600) / 60" | bc)
    echo -e "\033[1;38mYour height:\033[0m \033[1;32m$local_height\033[0m | \033[1;35mNetwork height:\033[0m \033[1;36m$network_height\033[0m | \033[1;29mBlocks left:\033[0m \033[1;31m$blocks_left\033[0m | \033[1;33mEstimated time: $hours hours $minutes minutes\033[0m"
    sleep 5
done
```
