This guide covers everything you need to know about running a KnexCoin validator node, from requirements to optimization.
Validators secure the KnexCoin network by:
- Verifying transaction signatures and balances
- Attesting to block validity
- Providing bandwidth to the network
- Participating in consensus
In return, validators earn KNEX rewards proportional to their stake, bandwidth contribution, and uptime.
| Resource | Minimum | Recommended |
|---|---|---|
| Stake | 10,000 KNEX | 100,000+ KNEX |
| CPU | 4 cores | 8+ cores |
| RAM | 8 GB | 16+ GB |
| Storage | 100 GB SSD | 500+ GB NVMe |
| Bandwidth | 100 Mbps | 1 Gbps |
| Uptime | 95% | 99.9% |
| Port | Protocol | Purpose | Required |
|---|---|---|---|
| 26656 | TCP | P2P networking | Yes |
| 26657 | TCP | RPC interface | Optional |
| 9090 | TCP | gRPC | Optional |
| 26660 | UDP | Fast relay | Yes |
| 7076 | HTTP | Node API | Optional |
# Ubuntu/Debian
sudo apt update
sudo apt install -y build-essential curl git
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env# Clone repository
git clone https://github.com/knexcoin/knexcoin.git
cd knexcoin
# Build release binary
cd "Knex Project/node"
cargo build --release
# Binary location
./target/release/knex-node --versionCreate configuration file at ~/.knex/config.toml:
[node]
data_dir = "~/.knex/data"
log_level = "info"
[network]
listen_addr = "0.0.0.0:26656"
external_addr = "YOUR_PUBLIC_IP:26656"
seeds = [
"seed1.knexcoin.io:26656",
"seed2.knexcoin.io:26656"
]
max_peers = 50
[rpc]
enabled = true
listen_addr = "127.0.0.1:26657"
[validator]
enabled = true
stake_address = "knex_YOUR_VALIDATOR_ADDRESS"
bandwidth_target_mbps = 100# Generate new keypair
./knex-node keygen --output ~/.knex/validator.key
# View public key
./knex-node show-address --keyfile ~/.knex/validator.keyTransfer at least 10,000 KNEX to your validator address to meet minimum stake requirements.
# Start in foreground
./knex-node start --config ~/.knex/config.toml
# Or run as systemd service
sudo systemctl start knex-validatorCreate /etc/systemd/system/knex-validator.service:
[Unit]
Description=KnexCoin Validator Node
After=network.target
[Service]
Type=simple
User=knex
ExecStart=/home/knex/knexcoin/target/release/knex-node start --config /home/knex/.knex/config.toml
Restart=always
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reload
sudo systemctl enable knex-validator
sudo systemctl start knex-validator
# Check status
sudo systemctl status knex-validator
# View logs
sudo journalctl -u knex-validator -fWhen your node has sufficient balance (≥10,000 KNEX), it automatically registers as a validator:
INFO validator registered: stake=10000 KNEX, active=true
./knex-node validator register \
--stake 10000 \
--bandwidth 100 \
--keyfile ~/.knex/validator.key./knex-node validator statusOutput:
Validator Status
================
Address: knex_3abc...xyz
Stake: 10,000 KNEX
Status: Active
Reputation: 95/100
Uptime: 99.5%
Validations: 12,345
Failures: 2
Tier Eligibility: 1, 2
# Add more stake (instant)
./knex-node validator stake add --amount 5000# Reduce stake (7-day unlock period)
./knex-node validator stake reduce --amount 5000# Exit validator role (14-day unlock period)
./knex-node validator exit| Stake Amount | Tier Eligibility |
|---|---|
| 10,000+ KNEX | Tier 1, 2 |
| 100,000+ KNEX | Tier 1, 2, 3 |
| 1,000,000+ KNEX | Tier 1, 2, 3, 4 |
| 10,000,000+ KNEX | All tiers |
Daily Reward = BaseReward × StakeWeight × BandwidthWeight × UptimeWeight
Where:
- BaseReward = Daily emission / Active validators
- StakeWeight = Your stake / Total stake
- BandwidthWeight = Your bandwidth / Average bandwidth
- UptimeWeight = Your uptime % / 100
| Stake | Bandwidth | Uptime | Est. Daily Reward |
|---|---|---|---|
| 10,000 KNEX | 100 Mbps | 95% | ~5-10 KNEX |
| 100,000 KNEX | 500 Mbps | 99% | ~50-100 KNEX |
| 1,000,000 KNEX | 1 Gbps | 99.9% | ~500-1000 KNEX |
Estimates vary based on network conditions and total validator count.
Rewards are distributed every epoch (1 hour):
INFO epoch 12345 rewards distributed: 8.5 KNEX
# Check node status
./knex-node status
# View peer connections
./knex-node peers
# Check sync status
./knex-node sync-statusEnable in config:
[metrics]
prometheus_enabled = true
prometheus_addr = "127.0.0.1:9090"Key metrics:
knex_validator_uptime_secondsknex_validator_validations_totalknex_validator_stake_amountknex_validator_reputationknex_bandwidth_mbps
Set up alerts for:
- Node offline (uptime < 95%)
- Peer count low (< 5 peers)
- Missed validations
- Bandwidth below threshold
- Network issues random challenge
- Validator must relay data packets
- Latency and throughput measured
- Results recorded on-chain
[bandwidth]
target_mbps = 100 # Target bandwidth
test_interval = 300 # Seconds between tests
min_peers_for_test = 3 # Minimum peers required- Use quality hosting provider
- Enable QoS for validator traffic
- Monitor network utilization
- Avoid shared bandwidth
# Backup validator key
cp ~/.knex/validator.key /secure/backup/
# Use hardware security module (HSM) if available
./knex-node validator set-hsm --device /dev/hsm0# Allow P2P
sudo ufw allow 26656/tcp
sudo ufw allow 26660/udp
# Allow RPC (localhost only)
# Do NOT expose to public
# Enable firewall
sudo ufw enable- Use dedicated server - Don't run other services
- Keep software updated - Apply security patches
- Monitor logs - Watch for anomalies
- Secure keys - Use HSM or encrypted storage
- Geographic diversity - Run in different regions
| Violation | Penalty | Detection |
|---|---|---|
| Bandwidth spoofing | 100% stake | Failed PoB verification |
| Collusion | 75% stake | Conflicting attestations |
| Attestation fraud | 50% stake | Invalid signature |
| Extended downtime | Reputation decay | Missed epochs |
- Ensure stable network connection
- Monitor bandwidth capacity
- Never run multiple validators with same key
- Keep node software updated
If slashed, you can:
- Investigate the cause
- Fix the issue
- Wait for unlock period
- Re-register with new stake
# Check peer connections
./knex-node peers
# Clear database and resync
./knex-node unsafe-reset-all
./knex-node start- Check uptime percentage
- Verify bandwidth capacity
- Review validation failure logs
- Ensure clock is synchronized
# Test connectivity
nc -zv seed1.knexcoin.io 26656
# Check firewall
sudo ufw status
# Verify external IP
curl ifconfig.me# Tune in config
[database]
cache_size_mb = 512 # Reduce if needed
max_open_files = 256Q: When do I start earning rewards? A: Immediately after registration and your first validation.
Q: Can I run multiple validators? A: Yes, but each needs unique stake and infrastructure.
Q: What happens if my node goes offline? A: Reputation decays, reducing reward share. Extended offline results in deactivation.
Q: How do I upgrade my node? A: Build new version, stop service, replace binary, restart.
Q: Can I change my stake address? A: Yes, use the CHANGE block type to update.