Installing and Running Starknet Validator Attestation
This guide describes how to build, configure, and run the Starknet Validator Attestation service — which performs validator attestations for the Starknet Mainnet.
Requirements
Before starting, make sure you have:
- A running Starknet node (e.g., Pathfinder) with support for the JSON-RPC v0.9.0 API.
- Staking contracts properly set up and registered with Staking v2.
- Sufficient STRK balance in the operational account to pay for attestation transactions.
- Linux host with at least:
- 2+ CPU cores
- 4 GB RAM
- 20 GB free disk space
Install Rust
Rust is required to build the attestation binary from source.
The following commands install Rust, enable it in your shell, and add the rustfmt component (for code formatting and compatibility).
Build Binary
Check the latest release tag on the official Equilibrium Labs repository: 👉 https://github.com/eqlabs/starknet-validator-attestation
Set the desired tag (replace with the latest stable release):
Clone the repository:
Checkout the specified version:
Compile the binary with CPU optimizations for your machine. This may take several minutes depending on your hardware.
Create directories for versioned releases and copy the compiled binary:
Create a systemd Service
Set up a systemd unit file to run the attestation service in the background. This ensures automatic restart and log integration. ⚠️ Important: Fill in the environment variables:
VALIDATOR_ATTESTATION_OPERATIONAL_PRIVATE_KEY— private key of your operational accountVALIDATOR_ATTESTATION_STAKER_OPERATIONAL_ADDRESS— corresponding account address
The attestation service exposes a Prometheus monitoring endpoint at:
Start Attestation Service
Enable the service to start automatically on boot and start it immediately:
Monitor logs to confirm successful startup:
Expected output should indicate successful attestation rounds and RPC connections.
Prometheus Metrics
The service exposes a /metrics endpoint compatible with Prometheus.
It provides live data about:
- Attestation success/failure counts
- RPC latency and health
- Process uptime and status
Example configuration for your Prometheus prometheus.yml: