Validator Setup
Set up and manage your Starknet validator node using starknode-kit.
⚠️ Important
Running a validator requires significant responsibility. Make sure you understand the requirements and risks before proceeding.
Prerequisites
Before setting up a validator, ensure you have:
- ✅ A fully synced Juno (Starknet) node
- ✅ A Starknet wallet with sufficient funds for staking
- ✅ Stable internet connection with 99.9%+ uptime
- ✅ Understanding of validator responsibilities
Installation
The validator client is managed through starknode-kit. First, ensure you have starknode-kit installed and configured.
Validator Commands
Check Validator Status
Check the status of your validator:
starknode-kit validator status
Get Validator Version
Check the installed version of the validator client:
starknode-kit validator --version
Set Juno RPC Endpoint
Configure the Juno RPC endpoint for your validator:
starknode-kit validator --rpc http://localhost:6060
Or use a remote Juno node:
starknode-kit validator --rpc https://your-juno-node.example.com
Configuration
Validator configuration is stored in your starknode-kit config file. Key settings include:
is_validator_node: true wallet: name: "my-validator" reward_address: "0x..." commision: "10" # 10% commission wallet: address: "${STARKNET_WALLET}" private_key: "${STARKNET_PRIVATE_KEY}" public_key: "${STARKNET_PUBLIC_KEY}" class_hash: "${STARKNET_CLASS_HASH}" salt: "${STARKNET_SALT}" deployed: false legacy: false validator_config: provider_config: juno_rpc_http: "http://localhost:6060" juno_rpc_ws: "ws://localhost:6060" signer: operational_address: "0x..." privateKey: "${STARKNET_PRIVATE_KEY}"
Setting Up Environment Variables
Store sensitive validator data in environment variables:
export STARKNET_WALLET="0x..." export STARKNET_PRIVATE_KEY="0x..." export STARKNET_PUBLIC_KEY="0x..." export STARKNET_CLASS_HASH="0x..." export STARKNET_SALT="0x..."
Add these to your ~/.bashrc
or ~/.zshrc
to make them persistent.
Starting Your Validator
Step 1: Ensure Juno is Running
Your Juno node must be fully synced and running:
starknode-kit run juno
Step 2: Verify Configuration
Check your validator configuration:
starknode-kit config show --all
Step 3: Start the Validator
Start your validator client:
starknode-kit validator start
Monitoring Your Validator
Monitor your validator status:
# Check validator status starknode-kit validator status # Monitor all services starknode-kit monitor
Validator Responsibilities
- Uptime - Maintain high availability (99.9%+)
- Security - Keep your keys secure and never share them
- Updates - Keep your validator software up to date
- Monitoring - Actively monitor your validator performance
- Backup - Maintain secure backups of your keys
Security Best Practices
- ✅ Use hardware wallets when possible
- ✅ Store keys in environment variables, not in config files
- ✅ Use firewall to restrict access to validator ports
- ✅ Enable SSH key-based authentication
- ✅ Keep your server updated with security patches
- ✅ Monitor for unusual activity
- ✅ Have a disaster recovery plan
- ❌ Never share your private keys
- ❌ Don't run validators on shared hosting
- ❌ Avoid storing keys in version control
Staking and Commission
Configure your validator's commission rate:
starknode-kit config set wallet commision="10"
This sets a 10% commission on staking rewards. Validators typically charge 5-15% commission.
Troubleshooting
Validator Not Connecting to Juno
Check that:
- Juno is running:
starknode-kit status
- RPC endpoint is correct in config
- Firewall allows connections to Juno port
Keys Not Loading
Verify environment variables are set:
echo $STARKNET_PRIVATE_KEY
If empty, add to your shell profile and reload.
Validator Offline
If your validator goes offline:
- ✅ Check system resources
- ✅ Check network connectivity
- ✅ Review validator logs
- ✅ Restart validator if needed
Performance Metrics
Monitor these key metrics:
- Attestation rate - Percentage of successful attestations
- Block proposals - Number of blocks proposed
- Uptime - Validator availability percentage
- Rewards - Staking rewards earned
Validator Economics
Understand the economics:
- Minimum Stake - Required amount to become a validator
- Rewards - Earned from successful validation
- Commission - Your fee for running the validator
- Penalties - For downtime or malicious behavior
💡 Tip
Start on the testnet (Sepolia) to familiarize yourself with validator operations before running on mainnet.