chainweb.dnns.es - Monitor y Control del Nodo Chainweb
# Descargar scripts de instalación git clone https://github.com/tu-usuario/kadena-chainweb-node cd kadena-chainweb-node # Dar permisos de ejecución chmod +x install.sh chainweb-manager.sh snapshot-sync.sh monitor.sh # Ejecutar instalación automática sudo ./install.sh # Sincronizar con snapshot (2-4 horas vs 7-14 días) ./snapshot-sync.sh # Iniciar el nodo ./chainweb-manager.sh start # Verificar estado ./chainweb-manager.sh status
# Control del servicio ./chainweb-manager.sh start # Iniciar nodo ./chainweb-manager.sh stop # Detener nodo ./chainweb-manager.sh restart # Reiniciar nodo ./chainweb-manager.sh status # Ver estado # Logs y monitoreo ./chainweb-manager.sh logs -f # Ver logs en tiempo real journalctl -u chainweb -f # Logs del sistema # Mantenimiento ./chainweb-manager.sh backup # Crear backup ./chainweb-manager.sh update # Actualizar a última versión ./chainweb-manager.sh clean-logs # Limpiar logs antiguos # Información ./chainweb-manager.sh info # Info del nodo ./chainweb-manager.sh peers # Ver peers conectados ./chainweb-manager.sh health-check # Verificación de salud
# Monitor en tiempo real ./monitor.sh # Monitor con actualización rápida ./monitor.sh --interval 1 # Estado de sincronización ./chainweb-manager.sh sync-status # API Tests curl -s https://chainweb.dnns.es/api/health-check curl -s https://chainweb.dnns.es/api/chainweb/0.0/mainnet01/cut | jq '.height' curl -s https://chainweb.dnns.es/api/chainweb/0.0/mainnet01/peer | jq '. | length' # Recursos del sistema htop -p $(pgrep chainweb-node) iotop -p $(pgrep chainweb-node) # Conexiones de red ss -tunap | grep chainweb netstat -tlnp | grep -E "1789|1848"
# /opt/chainweb/config.yaml
chainweb:
chainwebVersion: mainnet01
# P2P Configuration
p2p:
peer:
hostaddress:
hostname: 0.0.0.0
port: 1848
peers:
- hostaddress:
hostname: us-e1.chainweb.com
port: 443
- hostaddress:
hostname: eu-fr1.chainweb.com
port: 443
- hostaddress:
hostname: jp1.chainweb.com
port: 443
# Database Configuration (Optimized for Mining)
databaseDirectory: /opt/chainweb/data/0
fullHistoricPactState: false # ← Importante: false para minería
pruneChainDatabase: true # ← Habilitar pruning
# Mining Configuration
mining:
enabled: true
coordination:
enabled: true
limit: 1200 # Límite de requests/segundo
miners: [] # Lista vacía = todos permitidos
# API Service
serviceApi:
enabled: true
interface: 0.0.0.0
port: 1789
# Performance
rocksDb:
threads: 8 # Ajustar según CPU cores
compression: lz4 # Compresión rápida
maxOpenFiles: 2048
# 🔴 Base de datos corrupta ./chainweb-manager.sh fix-db # Si persiste: systemctl stop chainweb rm -rf /opt/chainweb/data/0/* ./snapshot-sync.sh # 🔥 Alto uso de CPU (>80%) ./chainweb-manager.sh limit-cpu 80 # O manualmente: cpulimit -p $(pgrep chainweb-node) -l 80 # 🌐 Pocos peers o sin conexión ./chainweb-manager.sh restart-fresh # Verificar firewall: sudo ufw allow 1789/tcp sudo ufw allow 1848/tcp # 💾 Uso de SWAP (sistema lento) sudo swapoff -a sudo sysctl vm.swappiness=1 ./chainweb-manager.sh optimize-memory # 🚨 Parada de emergencia ./chainweb-manager.sh emergency-stop # 🔄 Recuperación completa ./chainweb-manager.sh full-recovery # 📊 Verificar salud del nodo ./chainweb-manager.sh health-check