Running a full node
What You'll Learn
- Complete setup process for running a full Allora Network validator node
- Two deployment methods: systemd with cosmosvisor (recommended) and Docker Compose
- Network configuration including genesis, peers, and security settings
- Production-grade node management and monitoring best practices
Overview
How to become a Validator on Allora
This guide provides instructions on how to run a full node for the Allora network. There are two primary methods for running an Allora node: using systemd with cosmosvisor for easier upgrade management (recommended) or using docker compose. It's important to choose the method that best suits your environment and needs.
Why Run a Full Node?
Network Participation:
- Validator eligibility: Full nodes can become validators with proper staking
- Network security: Contribute to network decentralization and security
- Data access: Direct access to all blockchain data without third-party dependencies
- Economic opportunity: Earn rewards through validation and staking
Technical Benefits:
- Complete control: Full control over node configuration and operations
- Reliability: Eliminate dependence on external RPC providers
- Performance: Direct blockchain access with minimal latency
- Development support: Essential for blockchain development and testing
Prerequisites
System Requirements:
- Git: Version control system for repository management
- Go (version 1.21 or later): Programming language required for building binaries
- Basic command-line knowledge: Familiarity with terminal operations
- Linux/Unix environment with systemd: Production-grade operating system
- curl and jq utilities: Command-line tools for data retrieval and processing
Infrastructure Considerations:
- Adequate hardware: Sufficient CPU, RAM, and storage for blockchain operations
- Reliable internet: Stable, high-bandwidth connection for peer synchronization
- Security measures: Firewall configuration and key management procedures
- Monitoring tools: System monitoring for production node operations
Method 1: Using systemd with cosmosvisor (Recommended)
Running the Allora node with systemd and cosmosvisor provides production-grade reliability and easier binary upgrade management. This is the recommended approach for validators and production environments.
Why Cosmosvisor is Recommended
Upgrade Management:
- Automated upgrades: Seamless binary upgrades without manual intervention
- Downtime minimization: Reduces node downtime during network upgrades
- Rollback capability: Ability to rollback to previous versions if needed
- Production reliability: Battle-tested upgrade management for Cosmos networks
Operational Benefits:
- Service management: Integration with systemd for proper process management
- Monitoring support: Better integration with system monitoring tools
- Log management: Centralized logging through systemd journal
- Process supervision: Automatic restart on failures and proper signal handling
Step 1: Install cosmosvisor
First, install cosmosvisor, which will manage binary upgrades:
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latestVerify the installation:
cosmovisor versionInstallation Benefits:
- Upgrade automation: Automatic handling of chain upgrades and binary updates
- Version management: Proper versioning and rollback capabilities
- Service integration: Seamless integration with systemd service management
- Community standard: Industry-standard tool for Cosmos SDK networks
Step 2: Install allorad Binary
Download the latest allorad binary from the releases page:
- Navigate to the Allora Chain Releases page (opens in a new tab).
- Download the
alloradbinary appropriate for your operating system (e.g.,allorad-linux-amd64,allorad-darwin-amd64). - Rename and move the binary to a standard location:
# Rename the downloaded binary
mv ./allorad-linux-amd64 ./allorad # Adjust filename as needed
# Move to system path
sudo mv ./allorad /usr/local/bin/allorad
# Make executable
sudo chmod +x /usr/local/bin/alloradBinary Management:
- Version verification: Ensure you're running the correct binary version
- Path configuration: Proper binary placement for system-wide access
- Security: Appropriate permissions for binary execution
- Update process: Clear process for binary updates and upgrades
Step 3: Initialize the Node
Initialize your node (replace <your-moniker> with your desired node name):
allorad init <your-moniker> --chain-id allora-testnet-1Node Initialization Benefits:
- Identity establishment: Create unique node identity on the network
- Configuration setup: Generate initial configuration files and directories
- Key generation: Create validator keys for node operation
- Network preparation: Prepare node for network connection and synchronization
Step 4: Download Network Configuration
Download the testnet configuration files:
# Download genesis.json
curl -s https://raw.githubusercontent.com/allora-network/networks/main/allora-testnet-1/genesis.json > $HOME/.allorad/config/genesis.json
# Download config.toml
curl -s https://raw.githubusercontent.com/allora-network/networks/main/allora-testnet-1/config.toml > $HOME/.allorad/config/config.toml
# Download app.toml
curl -s https://raw.githubusercontent.com/allora-network/networks/main/allora-testnet-1/app.toml > $HOME/.allorad/config/app.tomlConfiguration File Purposes:
- genesis.json: Initial blockchain state and network parameters
- config.toml: Node operational configuration and network settings
- app.toml: Application-specific settings and feature configurations
Step 5: Configure Seeds and Peers
Configure seeds and persistent peers for network connectivity:
# Fetch and set seeds
SEEDS=$(curl -s https://raw.githubusercontent.com/allora-network/networks/main/allora-testnet-1/seeds.txt)
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.allorad/config/config.toml
# Optionally set persistent peers
PEERS=$(curl -s https://raw.githubusercontent.com/allora-network/networks/main/allora-testnet-1/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.allorad/config/config.tomlNetwork Connectivity Strategy:
- Seed nodes: Initial connection points for network discovery
- Persistent peers: Reliable connections maintained throughout operation
- Network discovery: Automatic peer discovery through existing connections
- Redundancy: Multiple connection points for network reliability
Step 6: Configure cosmosvisor
Set up the cosmosvisor directory structure and environment:
# Set environment variables
export DAEMON_NAME=allorad
export DAEMON_HOME=$HOME/.allorad
# Create cosmosvisor directories
cosmovisor init $HOME/go/bin/alloradDirectory Structure Benefits:
- Version management: Organized binary versions for upgrade management
- Configuration isolation: Separate configurations for different versions
- Backup capability: Automatic backup of previous versions
- Service integration: Proper directory structure for systemd service
Step 7: Create systemd Service
Create a systemd service file for the node:
sudo tee /etc/systemd/system/allorad.service > /dev/null <<EOF
[Unit]
Description=Allora Node
After=network.target
[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_NAME=allorad"
Environment="DAEMON_HOME=$HOME/.allorad"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
[Install]
WantedBy=multi-user.target
EOFService Configuration Benefits:
- Automatic startup: Node starts automatically on system boot
- Process management: Proper process supervision and restart handling
- Resource limits: Appropriate resource limits for stable operation
- Environment isolation: Clean environment variables for node operation
Step 8: Enable and Start Service
Enable and start the systemd service:
sudo systemctl daemon-reload
sudo systemctl enable allorad
sudo systemctl start alloradService Management:
- Status monitoring: Check service status with
systemctl status allorad - Log viewing: View logs with
journalctl -fu allorad - Service control: Start, stop, restart with systemctl commands
- Automatic recovery: Service automatically restarts on failures
Method 2: Using Docker Compose
Docker Compose provides an alternative deployment method with containerization benefits. This approach is suitable for development environments and users familiar with Docker.
Docker Benefits
Containerization Advantages:
- Environment isolation: Consistent environment across different systems
- Easy deployment: Single command deployment with all dependencies
- Resource management: Better resource allocation and monitoring
- Development flexibility: Easy to modify and experiment with configurations
Docker Setup Process
Create docker-compose.yml:
version: '3.8'
services:
allora-node:
image: alloranetwork/allora-chain:latest
container_name: allora-validator
ports:
- "26656:26656" # P2P port
- "26657:26657" # RPC port
- "1317:1317" # REST API port
volumes:
- ./data:/root/.allorad
- ./config:/root/.allorad/config
environment:
- MONIKER=your-moniker-name
command: allorad start
restart: unless-stoppedContainer Configuration:
- Port mapping: Expose necessary ports for network communication
- Volume mounting: Persistent data storage outside containers
- Environment variables: Configuration through environment settings
- Restart policy: Automatic container restart on failures
Node Operation and Maintenance
Monitoring Node Health
Key Metrics to Monitor:
- Sync status: Monitor blockchain synchronization progress
- Peer connections: Track number and quality of peer connections
- Block height: Ensure node is keeping up with network
- Resource usage: Monitor CPU, memory, and disk usage
Monitoring Commands:
# Check sync status
allorar status | jq .SyncInfo
# Check peer connections
curl -s localhost:26657/net_info | jq .result.n_peers
# View recent logs
journalctl -fu allorad --lines=100Security Considerations
Node Security:
- Firewall configuration: Only expose necessary ports to the internet
- Key management: Secure storage and backup of validator keys
- Access control: Limit SSH and system access to authorized users
- Regular updates: Keep system and software updated with security patches
Network Security:
- DDoS protection: Implement protection against network attacks
- Monitoring: Set up alerts for unusual network activity
- Backup procedures: Regular backups of node data and configuration
- Disaster recovery: Plans for rapid node recovery in case of failures
Upgrade Procedures
Cosmosvisor Upgrades (Recommended Method):
- Automatic detection: Cosmosvisor automatically detects upgrade proposals
- Binary preparation: New binaries are prepared in advance
- Seamless transition: Upgrade happens at designated block height
- Rollback capability: Can rollback if upgrade fails
Manual Upgrade Process:
- Stop the node: Gracefully stop the running node
- Backup data: Create backup of current node state
- Update binary: Replace binary with new version
- Restart node: Start node with new binary
- Monitor sync: Ensure node syncs properly with network
Troubleshooting Common Issues
Sync Problems:
- State sync: Use state sync for faster initial synchronization
- Peer issues: Check peer connectivity and configuration
- Disk space: Ensure adequate disk space for blockchain data
- Network connectivity: Verify internet connection and firewall settings
Performance Issues:
- Resource allocation: Increase system resources if needed
- Configuration tuning: Optimize node configuration for performance
- Database optimization: Consider database pruning and optimization
- Network optimization: Optimize network settings for better performance
Best Practices
Operational Excellence
Node Management:
- Regular monitoring: Continuous monitoring of node health and performance
- Automated alerting: Set up alerts for critical issues and downtime
- Documentation: Maintain documentation of configurations and procedures
- Change management: Implement proper change management processes
Security Best Practices
Infrastructure Security:
- Key rotation: Regular rotation of security keys and credentials
- Access logging: Log and monitor all access to node systems
- Network segmentation: Isolate node infrastructure from other systems
- Regular audits: Periodic security audits and vulnerability assessments
Performance Optimization
System Tuning:
- Resource monitoring: Continuous monitoring of system resources
- Performance tuning: Regular optimization of system and application settings
- Capacity planning: Plan for future growth and resource needs
- Load balancing: Distribute load across multiple nodes if needed
Prerequisites
- Technical expertise: Strong understanding of blockchain technology and Linux system administration
- Infrastructure access: Adequate server infrastructure with proper specifications
- Network connectivity: Reliable, high-bandwidth internet connection
- Security knowledge: Understanding of security best practices for blockchain nodes
Next Steps
- Learn about validator staking to begin earning rewards
- Study validator operations for ongoing management
- Review system requirements for production deployment
- Explore network parameters to understand validator requirements