> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tavchain.safeney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor a node

> Check sync, peers, block agreement and host health with native RPC and systemd.

Know whether your full node is ready before using its RPC. A running process is only the first check: it must also follow the correct network, advance with its peers and agree on blocks.

The published [native bundles](https://docs.tavchain.safeney.com/tavchain/operate/node-native.md), [Docker setup](https://docs.tavchain.safeney.com/tavchain/operate/node-docker.md) and [earlier Linux installation](https://docs.tavchain.safeney.com/tavchain/operate/run-full-node.md) expose the local RPC endpoints used below. Run the checks from the node's host. On Windows, open the status URLs in a browser or use `curl.exe` rather than the PowerShell `curl` alias. The Bash examples require a compatible shell; the Python comparison requires Python 3.

The systemd and `/var/lib/tavchain-fullnode` checks apply only to the [earlier service installation](https://docs.tavchain.safeney.com/tavchain/operate/node-service.md). Docker and native bundles do not create that service. The commands below read status; they do not change configuration or submit transactions.

## Check network and sync

```bash theme={null}
set -e
curl --fail --silent --show-error --max-time 15 http://127.0.0.1:29657/status | python3 -m json.tool
curl --fail --silent --show-error --max-time 15 http://127.0.0.1:29657/net_info | python3 -m json.tool
```

| Field | Healthy interpretation |
| - | - |
| `result.node_info.network` | `tavchaintestnet_771002-1` |
| `result.sync_info.latest_block_height` | Increases over repeated observations and catches up toward the network tip |
| `result.sync_info.latest_block_time` | Advances with the height; interpret timestamps using a correctly synchronized host clock |
| `result.sync_info.catching_up` | Becomes `false` after initial sync; use block agreement and progress as additional checks |
| `result.n_peers` from `/net_info` | At least one connected peer is needed for network sync; a nonzero count alone does not prove readiness |
| `result.validator_info.voting_power` | `0` is normal for an unregistered non-validator full node |

Repeat the status request later to check progress. A historical block height or `catching_up: false` from one observation is not a continuing health guarantee. A registered validator with zero voting power needs validator-specific investigation; an observer does not need to unjail itself.

## Check the EVM interface

```bash theme={null}
set -e
curl --fail --silent --show-error --max-time 15 http://127.0.0.1:29645/ -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
curl --fail --silent --show-error --max-time 15 http://127.0.0.1:29645/ -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":2,"method":"eth_blockNumber","params":[]}'
```

Expect chain ID `0xbc3ba` (771002). EVM block numbers are hexadecimal. An HTTP success can still contain a JSON-RPC `error`; inspect the response body. A correct chain ID alone does not prove block agreement.

## Compare a fixed block

Run this with Python 3 while your node is running. It queries the local node and the public Tavchain reference, chooses one common height below both tips and compares that block's hash. It makes no wallet connection or transaction.

```bash theme={null}
python3 - <<'PYCODE'
import json
import urllib.request

local = "http://127.0.0.1:29645/"
reference = "https://api.testnet.tavchain.safeney.com/"

def rpc(url, method, params):
    request = urllib.request.Request(
        url,
        data=json.dumps({"jsonrpc": "2.0", "id": 1, "method": method, "params": params}).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(request, timeout=15) as response:
        body = json.load(response)
    if "error" in body:
        raise RuntimeError(body["error"])
    return body["result"]

for endpoint in (local, reference):
    if int(rpc(endpoint, "eth_chainId", []), 16) != 771002:
        raise SystemExit("Wrong chain ID: stop and inspect the selected endpoint")
local_tip = int(rpc(local, "eth_blockNumber", []), 16)
reference_tip = int(rpc(reference, "eth_blockNumber", []), 16)
height = min(local_tip, reference_tip) - 1
if height < 1:
    raise SystemExit("Not enough blocks yet; wait for sync")
blocks = [rpc(endpoint, "eth_getBlockByNumber", [hex(height), False]) for endpoint in (local, reference)]
if any(block is None for block in blocks):
    raise SystemExit("Block unavailable; inspect sync and endpoint health")
if any(int(block["number"], 16) != height for block in blocks):
    raise SystemExit("Unexpected block height in response")
if blocks[0]["hash"] != blocks[1]["hash"]:
    raise SystemExit("BLOCK MISMATCH: preserve state and investigate before using this node")
print(json.dumps({"local_tip": local_tip, "reference_tip": reference_tip,
                  "compared_height": height, "block_hash": blocks[0]["hash"], "match": True}, indent=2))
PYCODE
```

A matching old block does not prove that the node has reached the tip. Review both reported tips and continuing progress. A mismatch needs investigation; do not reset or erase the node. A reference timeout or rate limit makes this comparison inconclusive. Public RPC may return HTTP 429; avoid rapid polling and retry later.

The public reference is a hosted Tavchain service. Agreement is useful diagnostics, not an independent trust source or an audit of the network.

## Check the process and host

For the published systemd profile:

```bash theme={null}
sudo systemctl status tavchain-fullnode.service --no-pager
sudo systemctl show tavchain-fullnode.service --property=ActiveState,SubState,Result,NRestarts
sudo journalctl -u tavchain-fullnode.service -n 100 --no-pager
sudo df -h /var/lib/tavchain-fullnode
sudo df -i /var/lib/tavchain-fullnode
timedatectl status
```

Inspect repeated errors, unexpected restarts, free disk space, free inodes and clock synchronization. Check the filesystem holding your actual home if you chose another path. The profile retains full history, so plan for continuing storage growth. Set host alerts according to your workload and storage growth; this guide does not prescribe universal capacity thresholds.

Keep a record of normal sync progress and resource use on your host. Investigate sustained lag, stopped block progress, lost peers, recurring errors or shrinking free space before the node becomes unavailable. See [Troubleshoot a node](https://docs.tavchain.safeney.com/tavchain/operate/troubleshooting.md) for symptom-specific checks.

## Dashboards and alerting

The packaged full-node profile leaves its metrics endpoint disabled and does not include a Prometheus/Grafana deployment. The local RPC and systemd checks above are available without a dashboard stack.

Hosting a full node does not automatically enroll it in Tavchain's service monitoring. Arrange monitoring for your own host. A monitor on the same host can fail during the same outage; consider that failure domain when planning availability checks. Keep private node interfaces protected.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.