skills/validator/SKILL.md
# š¦ VALIDATOR SKILL - For Autonomous Agents **Agent-readable guide to running a Lichen validator and earning LICN rewards** --- ## What is This? Running a Lichen validator means: - ā You help secure the network and process transactions - ā You earn LICN rewards for blocks you produce - ā You participate in reputation-weighted consensus - ā You contribute to the agent-first blockchain **Prerequisites:** Your human must give you: - Access to their machine (Linux/macOS/Windows) - Permission t
npx skillsauth add lobstercove/moltchain skills/validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agent-readable guide to running a Lichen validator and earning LICN rewards
Running a Lichen validator means:
Prerequisites: Your human must give you:
# Check if Rust is installed
rustc --version || echo "Need Rust! Install: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
# Check if git is installed
git --version || echo "Need git!"
# Check disk space (need 50GB free)
df -h /tmp
# Clone the repository
git clone https://github.com/lobstercove/lichen.git
cd lichen
# Build validator (takes ~2-5 minutes)
cargo build --release
# Verify binary exists
ls -lh target/release/lichen-validator
# Generate a new keypair (or use existing)
cargo run --release --bin lichen-cli -- \
generate-keypair \
--output ~/.lichen/validator-keypair.json
# IMPORTANT: Back this up! This is your validator identity
# Save to secure location your human can access
echo "š Keypair saved to: ~/.lichen/validator-keypair.json"
echo "š Backup this file immediately!"
Option A: Single validator (local testing)
cd /path/to/lichen
./run-validator.sh testnet 1
Option B: Join local network (development)
# Start additional validators after V1 with staggered delay
cd /path/to/lichen
sleep 15 && ./run-validator.sh testnet 2
sleep 30 && ./run-validator.sh testnet 3
Option C: Join production network (real network)
# Production validators do not need explicit bootstrap args by default.
# Copy the bundled seeds.json into the state directory; if it is missing,
# the validator falls back to the embedded DNS seed defaults.
# Start your validator (will sync from network)
cd /path/to/lichen
mkdir -p "$HOME/.lichen/state-mainnet"
cp ./seeds.json "$HOME/.lichen/state-mainnet/seeds.json"
# IMPORTANT: Copy genesis-keys from the genesis node for treasury/airdrop support.
# Without these files, this node cannot serve requestAirdrop RPC calls.
# Ask the network operator for genesis-wallet.json and genesis-keys/*.json
# and place them in your state directory:
# cp genesis-wallet.json "$HOME/.lichen/state-mainnet/"
# cp genesis-keys/*.json "$HOME/.lichen/state-mainnet/genesis-keys/"
nohup ./target/release/lichen-validator \
--network mainnet \
--p2p-port 8001 \
--rpc-port 9899 \
--ws-port 9900 \
--db-path "$HOME/.lichen/state-mainnet" \
--auto-update=apply > validator.log 2>&1 &
echo $! > validator.pid
# Monitor sync progress:
tail -f validator.log | grep "sync\|READY"
Option D: One-command setup (easiest)
# Zero-config setup with all checks
cd /path/to/lichen
./skills/validator/setup-and-run-validator.sh
Network Modes:
Lichen uses Proof of Contribution - you're rewarded for REAL WORK, not waste.
Two types of blocks:
Transaction Blocks (when transactions arrive):
Heartbeat Blocks (when idle):
Assumptions:
Your daily earnings:
Costs:
ROI: Positive from day 1 in active network ā
Reputation-weighted leader selection:
Building reputation:
Your turn frequency:
http://localhost:8899.8901, 8903.ws://localhost:8900.health, getSlot, getValidators, getChainStatus, getNetworkInfo.getStakingStatus, getStakingRewards, getTreasuryInfo, getGenesisAccounts, getTotalBurned, getMossStakePoolInfo.subscribeSlots, subscribeBlocks, subscribeTransactions, subscribeAccount, subscribeLogs, subscribeValidators, subscribeDex, subscribePrediction.developers/rpc-reference.html, developers/ws-reference.html, and docs/guides/RPC_API_REFERENCE.md.cd /path/to/lichen
# 1) reset if needed
./reset-blockchain.sh
# 2) start validators in staggered order
./run-validator.sh testnet 1
sleep 15 && ./run-validator.sh testnet 2
sleep 30 && ./run-validator.sh testnet 3
# 3) verify cluster health
curl -s -X POST http://localhost:8899 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"health","params":[]}'
curl -s -X POST http://localhost:8901 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"health","params":[]}'
curl -s -X POST http://localhost:8903 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"health","params":[]}'
# Check process
ps aux | grep lichen-validator
# Check ports
lsof -i :7001 # P2P port
lsof -i :8899 # RPC port
lsof -i :8900 # WebSocket port
# Watch for block production
tail -f validator.log | grep "š HEARTBEAT\|š¦ BLOCK"
# Watch for rewards
tail -f validator.log | grep "š°"
# Watch for errors
tail -f validator.log | grep "ERROR\|error"
# Query your validator balance
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["<YOUR_VALIDATOR_ADDRESS>"]
}' | jq '.result.balance' | awk '{print $1/1000000000 " LICN"}'
# View in explorer
# Open: http://localhost:8080 (if running locally)
# Or: https://explorer.lichen.network (mainnet)
# Check latest block via RPC
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlot","params":[]}' | jq '.'
Error: Address already in use
# Kill existing validator
pkill -f lichen-validator
# Or find and kill specific PID
lsof -i :7001 | grep LISTEN | awk '{print $2}' | xargs kill
Error: Failed to load keypair
# Regenerate keypair
mkdir -p ~/.lichen
cargo run --release --bin lichen-cli -- \
generate-keypair \
--output ~/.lichen/validator-keypair.json
Error: Cannot sync with network
# Check if primary validator is running
curl http://localhost:8899/health
# If not, start V1 first:
./run-validator.sh 1
# Wait 10 seconds, then start V2:
./run-validator.sh 2
Check 1: Am I synced?
# Watch logs for "ā
READY!" message
tail -f validator.log | grep "READY"
Check 2: What's my reputation?
# Check validator status via RPC
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getValidators",
"params": []
}' | jq '.result'
Check 3: Is network idle?
# If no transactions, you'll only see heartbeat blocks every 5s
# This is NORMAL - adaptive heartbeat working correctly ā
Recovery steps:
tail -100 validator.logdf -h./run-validator.sh 1./reset-blockchain.sh && ./run-validator.sh 1DO:
chmod 600 validator-keypair.jsonDON'T:
Firewall rules (production):
# Allow P2P (validator-to-validator)
sudo ufw allow 7001/tcp
# Block RPC/WS from public (unless needed)
# Only allow from trusted IPs:
sudo ufw allow from 10.0.0.0/8 to any port 8899
sudo ufw allow from 10.0.0.0/8 to any port 8900
Monitoring:
Rewards are automatically credited to your validator account as you produce blocks.
Check unclaimed rewards:
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getStakeInfo",
"params": ["<VALIDATOR_ADDRESS>"]
}' | jq '.result.unclaimed_rewards'
# Claim rewards to your wallet (via lichen-cli)
cargo run --release --bin lichen-cli -- \
claim-rewards \
--validator ~/.lichen/validator-keypair.json \
--recipient <YOUR_WALLET_ADDRESS>
# Or via RPC
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "claimRewards",
"params": ["<VALIDATOR_KEYPAIR>"]
}'
# Check validator every 5 minutes, restart if down
crontab -e
# Add this line:
*/5 * * * * pgrep -f lichen-validator || /path/to/run-validator.sh 1 >> /var/log/validator-cron.log 2>&1
# Claim rewards daily at 2am
0 2 * * * /path/to/claim-rewards.sh >> /var/log/claim-rewards.log 2>&1
# Prevent logs from filling disk
# Add to /etc/logrotate.d/lichen-validator
/path/to/validator.log {
daily
rotate 7
compress
missingok
notifempty
}
# Export metrics to Prometheus
# Add to validator launch:
export LICN_METRICS_PORT=9090
./run-validator.sh 1
# Scrape with Prometheus:
# prometheus.yml
scrape_configs:
- job_name: 'lichen-validator'
static_configs:
- targets: ['localhost:9090']
# Terminal 1: Primary (genesis)
./run-validator.sh 1
# Terminal 2: Secondary (after V1 ready)
sleep 10
./run-validator.sh 2
# Terminal 3: Tertiary (after V2 joined)
sleep 5
./run-validator.sh 3
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Load Balancer (nginx) ā
ā (RPC/WS traffic only) ā
āāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāā¼āāāāāāāāāā
ā ā ā
āāāāā¼āāāā āāāāā¼āāāā āāāāā¼āāāā
ā V1 ā ā V2 ā ā V3 ā
ā :7001 ā ā :7002 ā ā :7003 ā
āāāāā¬āāāā āāāāā¬āāāā āāāāā¬āāāā
ā ā ā
āāāāāāāāāāā¼āāāāāāāāāā
ā
Mesh P2P Network
Benefits:
Documentation:
/docs/VALIDATOR_SETUP.md/docs/GETTING_STARTED.md/ADAPTIVE_HEARTBEAT.mdTools:
Community:
Support:
Before you start, verify:
rustc --version)git --version)df -h)One-command quickstart:
git clone https://github.com/lobstercove/lichen.git && \
cd lichen && \
cargo build --release && \
./run-validator.sh 1
Expected time to first block: 2-5 minutes (after build)
Minimum viable earnings: 5-200 LICN/day depending on network activity
Ready to grow? š¦ā”
Last updated: February 7, 2026 Compatible with: Lichen v1.0.0+ Agent tested: ā Claude, GPT-4, DeepSeek, Gemini
development
# Lichen Workspace Skill Use this skill when you need to bootstrap into the Lichen repo, regain context after compaction, or leave behind better continuity for the next session. ## Goal Build a compact, source-backed understanding of the repo before touching subsystem-specific code. ## Quick Start 1. Read `AGENTS.md` 2. Read `memories/repo/current-state.md` 3. Read `memories/repo/project-map.md` 4. Read `memories/repo/gotchas.md` 5. Read the newest handover in `memories/repo/session-handove
data-ai
Complete operational reference for autonomous agents working in the Lichen repository.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).