# Ping validator

## Why Use Pinger?

When an RPC receives a transaction message to be included in a block, it must forward the message to the leader. Fast data transmission to the leader is crucial for network efficiency and consensus speed.

<figure><img src="/files/aw95ercipaA3ytzr32zL" alt=""><figcaption><p>Data forwarding from RPCs/validators to the leader</p></figcaption></figure>

Monitoring your validator's ping times ensures it meets leader schedule performance requirements.

## Pinger Dashboard

<figure><img src="/files/Y0iYmmuvfQd4wDKlugA6" alt=""><figcaption><p>X1 Validator Dashboard with Ping Times</p></figcaption></figure>

{% embed url="<http://x1val.online/>" %}

Ping times measure how long it takes for your validator to communicate with the current leader. Since the leader changes every four slots (1.6s), ping time variance (typically 500–3000ms) depends on the distance to the constantly switching leader.

## Installation

{% embed url="<https://github.com/x1-labs/x1-pinger/>" %}

### Configure Keypair

```sh
solana config set -k ~/.config/solana/id.json
```

*Ensure the keypair has funds, as a transaction is sent with each ping.*

### Open Firewall Port (If Enabled)

Enable UFW if it is not already enabled:

```sh
sudo ufw enable
```

Allow traffic on port **3334**:

```sh
sudo ufw allow 3334/tcp
```

### Install and Run Pinger

```sh
# Update and install dependencies
sudo apt update
sudo apt install -y nodejs jq

# Clone the Pinger repository
git clone https://github.com/x1-labs/x1-pinger/
cd x1-pinger
npm install

# Set up the system service
cp system/x1-pinger.service /etc/systemd/system/x1-pinger.service

# If installed in a different directory, update the service file accordingly
# nano /etc/systemd/system/x1-pinger.service

# Enable and start the service
sudo systemctl enable --now x1-pinger
```

### Verify Installation

Check the service status:

```sh
sudo systemctl status x1-pinger
```

View logs to ensure correct operation:

```sh
journalctl -u x1-pinger -f
```

<figure><img src="/files/qiBhyDN35lZDmuHkmuJy" alt=""><figcaption></figcaption></figure>

Once running, your validator will continuously measure and share leader ping times.

## Managing Pinger

### Stop the Pinger

```sh
sudo systemctl stop x1-pinger
```

### Retrieve Ping Metrics

```sh
curl http://localhost:3334/ping_times | jq
```

<figure><img src="/files/PNF0B5DXus7P7zUp71f6" alt=""><figcaption></figcaption></figure>

You can also check your ping times on **x1val.online**:

{% embed url="<http://x1val.online/>" %}


---

# 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://docs.x1.xyz/validating/performance/ping-validator.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.
