CLI
The Pye CLI automates reward calculation and distribution for validator-issued Pye Accounts. It is designed to run continuously on a small server, monitoring for epoch changes and executing payouts when required.
Github Repo: https://github.com/pyefi/pye-cli
Requirements
Server: A small, long-running machine (e.g.
t3.nanoort3.microEC2 instance).⚠️ Running multiple instances simultaneously is not supported. Deploy a single dedicated instance per validator.
Keypair: A filesystem keypair with sufficient SOL to cover transaction fees and distributions. The required SOL balance depends on the validator’s stake size and expected epoch rewards.
Dependencies: Rust toolchain and build utilities.
Installation
From a fresh Ubuntu host:
# Update system packages
sudo apt-get update
sudo apt-get install -y build-essential curl
# Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
# Clone and build the CLI
git clone https://github.com/pyefi/pye-cli
cd pye-cli
cargo build --release
The compiled binary will be located at:
Running as a Service
We recommend running the CLI as a persistent systemd service.
Example unit file (/etc/systemd/system/pye-cli.service):
For multiple issuers, provide a comma-separated list in
ISSUERS.
Enable and start:
CLI Usage
Run with:
Common Options
-r, --rpc <RPC>
RPC endpoint. Default: https://api.mainnet-beta.solana.com.
--program-id <PROGRAM_ID>
Pye program ID. Default: PYEQZ2qYHPQapnw8Ms8MSPMNzoq59NHHfNwAtuV26wx.
-v, --vote-pubkey <VOTE_PUBKEY>
Validator’s vote account pubkey.
-i, --issuers <ISSUERS>
Restrict pye_account payments to specific issuers (comma-delimited).
-p, --payer <PAYER>
Path to payer keypair JSON file.
--concurrency <N>
Max concurrent RPC requests. Default: 50.
--dry-run
Calculate rewards without transferring funds.
--cycle-secs <N>
Interval (seconds) between epoch checks. Default: 60.
--block-retry-delay <N>
Retry delay (seconds) for get_block calls. Default: 1800.
-h, --help
Show help.
Notes
The CLI automatically calculates and distributes excess rewards for all Lockups associated with the validator.
Use
--dry-runfor testing without sending transactions.Ensure your payer key has enough SOL to cover transfers and fees.
Last updated