This service enables validators to distribute priority fees to their delegators through Jito's priority fee distribution program.
- Clone the repository:
git clone https://github.com/jito-foundation/priority-fee-sharing- Navigate to the priority fee directory:
cd priority-fee-sharingNOTE: To help, you may want to install the Solana CLI if you have not already
The easiest way to set up the Priority Fee Sharing service is to use the automated setup script. First, create and configure your environment file:
Copy the example environment file and fill in your values:
cp .env.example .envEdit the resulting .env file with your configuration. Everything needs to be filled out - if you are unsure about any value, keep the deafult if possible.
vim .envNOTE: If you are using your local RPC, you have to run your validator with --enable-rpc-transaction-history enabled.
| Variable | Required | Description |
|---|---|---|
USER |
Required | System user to run the service (e.g., 'solana') |
CLUSTER |
Required | Cluster mainet, devnet, testnet |
RPC_URL |
Required | RPC endpoint URL that supports get_block |
PRIORITY_FEE_PAYER_KEYPAIR_PATH |
Required | Path to validator identity keypair |
VOTE_AUTHORITY_KEYPAIR_PATH |
Required | Path to vote authority keypair |
VALIDATOR_VOTE_ACCOUNT |
Required | Your validator's vote account public key |
MINIMUM_BALANCE_SOL |
Required | Minimum SOL balance to maintain |
COMMISSION_BPS |
Default | Commission in basis points (5000 = 50%) |
PRIORITY_FEE_DISTRIBUTION_PROGRAM |
Default | Fee distribution program address |
MERKLE_ROOT_UPLOAD_AUTHORITY |
Default | Merkle root upload authority address |
FEE_RECORDS_DB_PATH |
Default | Path for fee records database |
PRIORITY_FEE_LAMPORTS |
Default | Priority fee for transactions (in lamports) |
TRANSACTIONS_PER_EPOCH |
Default | Number of transactions per epoch |
SOLANA_METRICS_CONFIG |
Optional | Solana metrics configuration credentials |
PROMETHEUS_PUSH_GATEWAY |
Optional | Prometheus push gateway URL |
PROMETHEUS_JOB_NAME |
Optional | Prometheus job name |
PROMETHEUS_INSTANCE |
Optional | Prometheus instance |
The installation script will:
- Install/update Rust (minimum version 1.75.0)
- Build and install the Priority Fee Sharing CLI
- Generate a systemd
priority-fee-sharing.serviceservice file from your.envconfiguration - Create the fee records database path
- Run verification and provide next steps
Run the installation script:
./setup_priority_fee_sharing.shAfter the script completes, follow the displayed next steps to set up the systemd service:
# 0. Verify the .env file
priority-fee-sharing run --verify
# 1. Move the generated service file to systemd directory
sudo mv priority-fee-sharing.service
# 2. Reload systemd
sudo systemctl daemon-reload
# 3. Enable service
sudo systemctl enable priority-fee-sharing
# 4. Review the generated service file
systemctl cat priority-fee-sharing.service
# 5. Start service
sudo systemctl start priority-fee-sharing
# 6. Check status
sudo systemctl status priority-fee-sharing
# 7. View logs
sudo journalctl -u priority-fee-sharing.service -fYou can manage the service using the following commands:
# Start the service
sudo systemctl start priority-fee-sharing.service
# Stop the service
sudo systemctl stop priority-fee-sharing.service
# Restart the service
sudo systemctl restart priority-fee-sharing.service
# Check service status
sudo systemctl status priority-fee-sharing.service
# View service logs
sudo journalctl -u priority-fee-sharing.service -fTo update the Priority Fee Sharing service, follow these steps ( do in the priority-fee-sharing directory ):
-
Stop the service
sudo systemctl stop priority-fee-sharing.service
-
Update the repo
git pull
-
Re-run startup script
./setup_priority_fee_sharing.sh
Prometheus is enabled when the corresponding .env variables are provided.
The Priority Fee Sharing service sends metrics to InfluxDB instances managed by Jito Labs. There are two separate datasources:
- Priority Fee Sharing Script (PFS) - Metrics from your validator's fee sharing service
- Priority Fee History (PFH) - Network-wide on-chain priority fee data
To view your metrics, you'll need to:
-
Get Access Credentials
- Contact Jito Labs to receive your InfluxDB credentials
- You'll receive connection details for the PFS datasource
-
Configure SOLANA_METRICS_CONFIG
- Add the provided metrics configuration to your
.envfile - This enables automatic metric submission from your PFS service
SOLANA_METRICS_CONFIG="host=http://tip-router.metrics.jito.wtf:8086,db=priority-fee-sharing,u=validator,p=<PASSWORD>"
- Add the provided metrics configuration to your
We provide a pre-configured Grafana dashboard template to monitor your Priority Fee Sharing service.
-
Access Grafana
- Log into your Grafana instance
- Navigate to Dashboards → Import
-
Import the Dashboard
- Click "Upload dashboard JSON file"
- Select the provided
./grafana.jsonfile - You'll be prompted to configure datasources
-
Configure Datasources
During import, map the following datasources ( Reach out to Jito for datasources ):
Template Variable URL Database User Password Priority Fee Sharing Script http://tip-router.metrics.jito.wtf:8086 priority-fee-sharing validator *Reach out to Jito Priority Fee History http://tip-router.metrics.jito.wtf:8086 priority-fee-history validator *Reach out to Jito -
Configure Dashboard Variables
After import, the dashboard will auto-populate these variables:
- Cluster: Select
mainnetortestnet - Vote Account: Your validator's vote account will appear after datasource connection
- Epoch: Select the epoch you want to monitor
- Cluster: Select
Your dashboard includes four main panels:
- 🟨 PFS Heartbeat: Shows the current epoch your Priority Fee Sharing service is processing
- 🟨 PFS Total Shared: Displays the total SOL distributed to delegators for the selected epoch
- 🟦 PFH Heartbeat: Monitors the on-chain history service availability
- 🟦 PFH Expected Share: Shows the expected SOL distribution based on network data
Note: A small difference between "Total Shared" and "Expected Share" is normal due to transfers near epoch boundaries.
It is reccomeneded to create the following alerting condition in grafana:
PFS Heartbeat Alert
- Alert on PFSHeartbeat on
no data- this is underConfigure no data and error handlingdropdown. Make sure to selectAlerting, for both options. - Alert based off of your
voteaccount
Configure alerts through Grafana's alerting system to notify via your preferred channels (email, Slack, PagerDuty, etc.).
If you encounter issues with the Priority Fee Sharing service:
-
Check the service status and logs
sudo systemctl status priority-fee-sharing.service sudo journalctl -u priority-fee-sharing.service -n 50
-
Run the verify script to ensure the
.envfile is setup correctly + Check all fieldspriority-fee-sharing run --verify