Node Overview
Introduction
Running an OPN node allows you to directly interact with the blockchain, validate transactions, and contribute to network decentralization. This guide covers everything you need to know about operating nodes on OPN Chain.
Node Types
1. Full Node
Full nodes maintain a complete copy of recent blockchain data and can serve RPC requests.
Characteristics:
Stores recent blockchain history (configurable)
Can validate all transactions
Serves RPC/API requests
Default pruning keeps ~100,000 blocks
Storage: ~1.5TB
Use Cases:
DApp backends
Personal use
Development
Light validator operations
2. Archive Node
Archive nodes store the complete history of all states and transactions.
Characteristics:
Complete historical data
Can query any past state
No pruning
Storage: ~3TB and growing
Higher RAM requirements
Use Cases:
Block explorers
Analytics platforms
Historical data queries
Research and analysis
3. Validator Node
Validator nodes participate in consensus and produce blocks.
Characteristics:
Requires staking OPN tokens
Participates in consensus
Earns rewards
Higher uptime requirements
Needs reliable infrastructure
Use Cases:
Earning staking rewards
Securing the network
Governance participation
4. Light Node (Planned)
Light nodes will store only block headers and request data as needed.
Characteristics:
Minimal storage (<1GB)
Cannot serve others
Relies on full nodes
Fast sync
Use Cases:
Wallets
Simple verification
Resource-constrained environments
Quick Comparison
Storage Required
~1.5TB
~3TB
~1.5TB
RAM Required
16GB
32GB
16GB
Can Validate TXs
✅
✅
✅
Historical Queries
Limited
✅
Limited
Earns Rewards
❌
❌
✅
Produces Blocks
❌
❌
✅
Setup Complexity
Medium
Medium
High
Why Run a Node?
Benefits
Independence
No reliance on third-party services
Direct blockchain access
Enhanced privacy
Performance
Lower latency
No rate limits
Custom configuration
Support Network
Increase decentralization
Improve network resilience
Contribute to ecosystem
Earn Rewards (Validators)
Staking rewards
Transaction fees
Governance participation
Considerations
Resources
Hardware costs
Bandwidth usage
Electricity costs
Maintenance time
Technical Knowledge
Linux administration
Network configuration
Security practices
Troubleshooting skills
Reliability Requirements
Uptime monitoring
Backup strategies
Update management
Security updates
Node Architecture
┌─────────────────────────────────────┐
│ JSON-RPC API Layer │
│ (HTTP/WebSocket Endpoints) │
├─────────────────────────────────────┤
│ Application Layer │
│ (EVM, Transaction Processing) │
├─────────────────────────────────────┤
│ Consensus Layer │
│ (Tendermint BFT) │
├─────────────────────────────────────┤
│ P2P Network │
│ (Peer Communication) │
├─────────────────────────────────────┤
│ Storage Layer │
│ (LevelDB/RocksDB) │
└─────────────────────────────────────┘
Key Components
1. Tendermint Core
Handles consensus
Manages P2P networking
Produces blocks
Ensures Byzantine fault tolerance
2. Application Layer
Processes transactions
Manages state
Executes smart contracts
Handles queries
3. Storage Backend
Stores blockchain data
Manages state database
Handles pruning
Provides query interface
4. RPC Server
Serves API requests
WebSocket subscriptions
Rate limiting
Request routing
Network Topology
┌─────────────┐
│ Seed Nodes │
└──────┬──────┘
│
┌──────────────────┼──────────────────┐
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│Validator│ │Validator│ │Validator│
│ Node │◄─────►│ Node │◄─────►│ Node │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└──────────┬───────┴───────┬──────────┘
│ │
┌────▼────┐ ┌────▼────┐
│Full Node│ │Full Node│
└────┬────┘ └────┬────┘
│ │
┌────▼────┐ ┌────▼────┐
│RPC Node │ │RPC Node │
└─────────┘ └─────────┘
Operational Requirements
Network Requirements
Bandwidth
100 Mbps
1 Gbps
Monthly Data
2 TB
Unlimited
Latency
< 100ms
< 50ms
Packet Loss
< 0.1%
0%
Uptime Requirements
Full Node
None
None
Archive Node
95%+
Service degradation
Validator
99%+
Slashing risk
Security Requirements
Firewall Configuration
Only expose necessary ports
Implement DDoS protection
Regular security updates
Key Management
Secure key storage
Regular backups
Access controls
Monitoring
Real-time alerts
Performance metrics
Security monitoring
Getting Started
Prerequisites Check
# Check system resources
df -h # Disk space
free -h # RAM
nproc # CPU cores
uname -a # OS version
# Check network
ping -c 4 testnet-rpc.iopn.tech
curl -s https://testnet-rpc.iopn.tech | jq '.'
Quick Start Options
Binary Installation (Easiest)
wget https://github.com/ chmod +x opn-node ./opn-node init
Docker (Recommended)
docker run -d \ --name opn-node \ -p 26656:26656 \ -p 26657:26657 \ -v opn-data:/root/.opn \ opnchain/node:latest
Build from Source (Advanced)
git clone https://github.com/opn/opn-chain cd opn-chain make install
Choosing Node Configuration
Decision Tree
Do you need historical data?
├─ Yes → Archive Node
└─ No
└─ Do you want to earn rewards?
├─ Yes → Validator Node
└─ No
└─ Do you need high availability?
├─ Yes → Multiple Full Nodes
└─ No → Single Full Node
Configuration Examples
Development Node:
# Aggressive pruning for development
pruning = "everything"
pruning-keep-recent = "100"
pruning-interval = "10"
Production Full Node:
# Balanced configuration
pruning = "default"
pruning-keep-recent = "100000"
pruning-interval = "1000"
Archive Node:
# No pruning
pruning = "nothing"
index-events = ["tx.hash", "tx.height"]
Monitoring Your Node
Key Metrics
Node Health
curl localhost:26657/health
Sync Status
curl localhost:26657/status | jq '.result.sync_info'
Peer Count
curl localhost:26657/net_info | jq '.result.n_peers'
Monitoring Stack
# docker-compose.yml
services:
prometheus:
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
Common Operations
Starting Your Node
# Start with systemd
sudo systemctl start opn-node
# Start manually
opn-node start --home ~/.opn
# Start with specific config
opn-node start --p2p.seeds "node1@ip:26656,node2@ip:26656"
Checking Sync Progress
#!/bin/bash
while true; do
CURRENT=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height')
NETWORK=$(curl -s https://testnet-rpc.iopn.tech/status | jq -r '.result.sync_info.latest_block_height')
BEHIND=$((NETWORK - CURRENT))
echo "Current: $CURRENT | Network: $NETWORK | Behind: $BEHIND blocks"
sleep 5
done
Backing Up
# Backup keys
cp ~/.opn/config/node_key.json ./backup/
cp ~/.opn/config/priv_validator_key.json ./backup/
# Backup data (stop node first)
systemctl stop opn-node
tar -czf opn-backup-$(date +%Y%m%d).tar.gz ~/.opn/data
systemctl start opn-node
Troubleshooting
Node Won't Sync
Check peers:
curl localhost:26657/net_info
Add more peers:
opn-node tendermint show-node-id # Share your id@ip:26656 with others
Reset state:
opn-node tendermint unsafe-reset-all
High Resource Usage
Enable pruning:
pruning = "custom" pruning-keep-recent = "100" pruning-interval = "10"
Limit peers:
max_num_inbound_peers = 20 max_num_outbound_peers = 10
Reduce cache:
cache_size = 10000
Best Practices
Security
Use Firewall
sudo ufw allow 26656/tcp # P2P sudo ufw allow 26657/tcp # RPC (only if needed) sudo ufw enable
Secure Keys
chmod 600 ~/.opn/config/*_key.json
Regular Updates
# Check for updates curl https://api.github.com/repos/opn/opn-chain/releases/latest
Performance
Use SSD Storage
NVMe preferred
RAID not required
Regular TRIM
Optimize Database
db_backend = "rocksdb" db_dir = "data"
Network Optimization
send_rate = 5120000 recv_rate = 5120000
Need help? Join our Channel on Discord!
Last updated