Validator Node
Validators query miners, score their outputs, and participate in Yuma consensus. This guide covers hardware requirements, scoring implementation, commit-reveal submission, and monitoring.
Overview
A validator node:
Queries Miners: Sends inference tasks to all active miners in a subnet
Scores Outputs: Evaluates responses based on accuracy, latency, consistency
Commits Scores: Submits
hash(scores + salt)on-chainReveals Scores: Reveals plaintext scores and salt
Earns Rewards: Receives 41% of subnet emissions (trust-weighted)
Software Setup
Prerequisites
Copy
# Ubuntu 22.04
sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io docker-compose git curl
# Add user to docker group
sudo usermod -aG docker $USER
newgrp dockerInstall Tensora Validator Client
Copy
Example .env:
Copy
Docker Compose
docker-compose.yml:
Copy
Start:
Copy
Validator Logic
Pseudocode
Copy
Task Generation
Tasks should be:
Objective: Ground truth verifiable (e.g., known translations, labeled images)
Diverse: Cover model capabilities
Representative: Match real-world usage
Example (Linguista NLP):
Copy
Scoring Metrics
Linguista (NLP)
BLEU Score (translation quality):
Copy
Combined Score:
Copy
Visiona (Vision)
CLIP Score (image-text alignment):
Copy
Predictia (Forecasting)
RMSE (prediction accuracy):
Copy
On-Chain Registration
Stake TORA
Copy
Register as Validator
Copy
Verify Registration
Copy
Should return your stake amount and active=true.
Commit-Reveal Implementation
Commit Phase (Off-chain Node.js example)
Copy
Reveal Phase
Copy
Timing
Validator client should:
Commit within blocks 0–1000 of epoch
Reveal within blocks 1001–1100 of epoch
Cron Schedule (6-hour epochs):
Copy
Monitoring
Metrics to Track
MetricDescriptionAlert Threshold
Uptime
% of epochs participated
<95%
Trust Score
Consensus alignment
<0.5
Commit Success Rate
% commits confirmed
<98%
Reveal Success Rate
% reveals confirmed
<98%
Gas Cost per Epoch
BNB or TORA spent
>0.01 BNB
Earnings per Epoch
TORA received
Decreasing trend
Prometheus Exporter
Add to validator client:
Copy
Grafana Dashboard
Queries:
Trust score over time:
validator_trust_scoreCommit success rate:
rate(validator_commits_success[1h]) / (rate(validator_commits_success[1h]) + rate(validator_commits_failed[1h]))APY estimate:
(validator_earnings * 76 * 100) / stake_amount
Alerts
Discord Webhook:
Copy
Common Pitfalls
Late Reveal
Symptom: Reveal transaction reverts, 3% slashed.
Solution: Submit reveals early in window (blocks 1001–1010, not 1090–1100) to account for network delays.
Salt Mismatch
Symptom: Reveal fails, 5% slashed.
Cause: Salt not stored correctly, or different salt used in commit.
Solution: Use deterministic salt generation:
Copy
Scoring All Identical
Symptom: All miners get same score (e.g., 80).
Cause: Scoring logic not differentiated.
Solution: Use objective metrics with natural variance (BLEU, CLIP, RMSE).
Low Trust Score
Symptom: Trust score drops to 0.3, earnings drop 50%.
Cause: Scores diverge from consensus.
Solution:
Verify ground truth accuracy
Check if other validators use different metrics
Adjust scoring weights to align with consensus
Insufficient Gas
Symptom: Commit/reveal transactions fail with "insufficient funds".
Solution: Maintain 0.1 BNB (or equivalent TORA for Paymaster) buffer.
Multi-Subnet Validation
Run multiple validator instances for different subnets:
Copy
Stake and register separately for each subnet.
Earnings Estimation
Assumptions:
Subnet: Linguista
Stake: 15,000 TORA (30% of total subnet stake)
Trust score: 0.75
Validator pool: 172.2 TORA per epoch
Effective weight: (0.30 × 0.75) / (sum of all effective weights)
Simplified:
Your share: ~25% (example)
Reward per epoch: 172.2 × 0.25 = 43 TORA
Annual:
Epochs per year: 76
Annual reward: 43 × 76 = 3,268 TORA
APY: (3,268 / 15,000) × 100 = 21.8%
Plus delegator commission (if you accept delegations):
Delegator pool for your share: 172.2 × 0.25 = 43 TORA
Commission (10%): 4.3 TORA per epoch
Annual commission: 4.3 × 76 = 327 TORA
Total annual: 3,268 + 327 = 3,595 TORA (23.97% APY)
Security Best Practices
Private Key Security
Store in encrypted keystore, not plaintext
.envUse hardware wallet (Ledger) for high-stake validators
Separate hot wallet (small amount) for commits/reveals
Server Security
Copy
Backup
Copy
Last updated