> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/starknet/useful-commands.md).

# Useful Commands

Pathfinder and attestation operations for Starknet Sepolia Testnet.

**Sepolia Testnet · `pathfinder-sepolia`**

## Service operations

### Container status

Show the node container.

```bash
sudo docker ps -a --filter name=pathfinder-sepolia
```

### Logs

Follow node logs.

```bash
sudo docker logs --tail 100 -f pathfinder-sepolia
```

### Restart

Restart the same container and configuration.

```bash
sudo docker restart pathfinder-sepolia
```

### Stop

Stop the node cleanly.

```bash
sudo docker stop -t 120 pathfinder-sepolia
```

### Start

Start an existing stopped container.

```bash
sudo docker start pathfinder-sepolia
```

### Resource usage

Inspect CPU and memory use.

```bash
sudo docker stats --no-stream pathfinder-sepolia
```

## JSON-RPC checks

### Network

Query the local versioned endpoint.

```bash
curl -fsS http://127.0.0.1:9546/rpc/v0_10 -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"starknet_chainId","params":[],"id":1}' | jq
```

### Sync status

Query the local versioned endpoint.

```bash
curl -fsS http://127.0.0.1:9546/rpc/v0_10 -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"starknet_syncing","params":[],"id":1}' | jq
```

### Block height

Query the local versioned endpoint.

```bash
curl -fsS http://127.0.0.1:9546/rpc/v0_10 -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"starknet_blockNumber","params":[],"id":1}' | jq
```

### RPC specification

Query the local versioned endpoint.

```bash
curl -fsS http://127.0.0.1:9546/rpc/v0_10 -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"starknet_specVersion","params":[],"id":1}' | jq
```

## Attestation operations

### Attestation logs

Check confirmed attestations and funding errors.

```bash
sudo docker logs --tail 100 -f attest-sepolia
```

### Restart attestations

Restart the existing service.

```bash
sudo docker restart attest-sepolia
```

### Metrics

Read local Prometheus metrics.

```bash
curl -fsS http://127.0.0.1:9091/metrics
```

## Storage

### Database size

Measure the mounted database.

```bash
du -sh "$HOME/pathfinder-sepolia/data"
```

### Free space

Check available filesystem space.

```bash
df -h "$HOME/pathfinder-sepolia/data"
```
