Selendra

Documentation

Maintenance

Regular maintenance for Selendra nodes

Regular maintenance ensures optimal node performance and prevents issues. Critical for validators.

Maintenance Schedule

TaskFrequencyDowntimePriority
Binary UpdatesAs released2-5 minHigh
Security PatchesWeekly1-10 minCritical
Log RotationAutomatedNoneMedium
Database CheckQuarterly10-30 minLow
Disk SpaceWeeklyNoneHigh
Backup VerifyMonthlyNoneMedium

Binary Updates

# Check versions
selendra --version
curl -s https://api.github.com/repos/selendra/selendra/releases/latest | grep "tag_name"

# Update procedure
sudo systemctl stop selendra
sudo cp /usr/local/bin/selendra /usr/local/bin/selendra.backup-$(date +%Y%m%d)

cd /tmp
wget https://github.com/selendra/selendra/releases/latest/download/selendra
chmod +x selendra && ./selendra --version
sudo mv selendra /usr/local/bin/

sudo systemctl start selendra
sudo journalctl -u selendra -f

Validators: Announce updates in Telegram. Stagger updates across hours to maintain network security. Monitor block production after restart.

Notifications: Watch GitHub releases (github.com/selendra/selendra → Watch → Releases).


Security Patches

OS Updates

# Weekly security updates
sudo apt update && sudo apt upgrade -y
sudo reboot  # If kernel updated

# Automatic updates (optional)
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades

Firewall Review

Monthly verification:

sudo ufw status numbered
sudo ss -tulpn | grep LISTEN

Required ports only:

  • 30333: P2P (required)
  • 9933/9944: RPC (restrict/disable on validators)
  • 9615: Metrics (restrict to monitoring system)

Log Management

Rotation Configuration

Create /etc/systemd/journald.conf.d/selendra.conf:

[Journal]
SystemMaxUse=2G
SystemMaxFileSize=200M
MaxRetentionSec=604800
SystemMaxFiles=20
sudo systemctl restart systemd-journald

Log Analysis

# Weekly review
sudo journalctl -u selendra -p err --since "1 week ago"
sudo journalctl -u selendra | grep -i "warn\|peer"

# Archive logs
sudo journalctl -u selendra --since "30 days ago" > selendra-logs-$(date +%Y%m).log
gzip selendra-logs-$(date +%Y%m).log

Database Maintenance

Health Monitoring

# Check size and growth
du -sh /var/lib/selendra/chains/selendra/db

# Verify pruning
sudo journalctl -u selendra | grep -i "pruning"

Clean Shutdowns

Always use: sudo systemctl stop selendra
Never use: kill -9 $(pidof selendra)

Prevention: UPS for power protection, periodic filesystem checks.

Reset After Corruption

sudo systemctl stop selendra
sudo cp -r /var/lib/selendra/chains/selendra/keystore ~/keystore-backup
sudo rm -rf /var/lib/selendra/chains/selendra/db
sudo cp -r ~/keystore-backup /var/lib/selendra/chains/selendra/keystore
sudo systemctl start selendra

Resync time: 4-8 hours.


Disk Space Management

Automated Monitoring

Create /usr/local/bin/check-disk-space.sh:

#!/bin/bash
THRESHOLD=80
USAGE=$(df -h /var/lib/selendra | tail -1 | awk '{print $5}' | sed 's/%//')

if [ $USAGE -gt $THRESHOLD ]; then
    echo "Disk usage at ${USAGE}%" | mail -s "Disk Alert" admin@example.com
fi
sudo chmod +x /usr/local/bin/check-disk-space.sh
echo "0 */6 * * * /usr/local/bin/check-disk-space.sh" | sudo crontab -

Expand Storage

Add second drive:

sudo mkfs.ext4 /dev/nvme1n1
sudo mkdir /mnt/selendra-new
sudo systemctl stop selendra
sudo rsync -avP /var/lib/selendra /mnt/selendra-new
# Update base-path in systemd service
sudo systemctl daemon-reload && sudo systemctl start selendra

Resize existing (cloud):

sudo growpart /dev/nvme0n1 1
sudo resize2fs /dev/nvme0n1p1

Free space quickly:

sudo journalctl --vacuum-time=7d
sudo apt clean && sudo apt autoremove -y

Backup Strategies

Validator Keys (Critical)

# Backup and encrypt
sudo tar -czf selendra-keystore-$(date +%Y%m%d).tar.gz \
    -C /var/lib/selendra/chains/selendra keystore
gpg -c selendra-keystore-$(date +%Y%m%d).tar.gz
# Store securely: offline USB or encrypted cloud

Test restore annually.

Configuration Backup

mkdir ~/selendra-config-backup
sudo cp /etc/systemd/system/selendra.service ~/selendra-config-backup/
sudo ufw status numbered > ~/selendra-config-backup/firewall-rules.txt
tar -czf selendra-config-$(date +%Y%m%d).tar.gz ~/selendra-config-backup

Database Backup

Not recommended for full nodes (resync faster than restore). For archive nodes:

# Using LVM snapshots
sudo systemctl stop selendra
sudo lvcreate -L 50G -s -n selendra-snapshot /dev/vg/selendra-data
sudo systemctl start selendra
sudo dd if=/dev/vg/selendra-snapshot | gzip > selendra-backup-$(date +%Y%m%d).img.gz &
sudo lvremove /dev/vg/selendra-snapshot

Performance Monitoring

Monthly Review Metrics

MetricOptimalAlert Threshold
CPU usage<70% avg>80% sustained
RAM free>20%<10%
Disk I/O<80% util>90%
Peers25-50<5
Block sync50-100 blocks/sec<10 blocks/sec

Optimization

More cache (if RAM available):

# In systemd service
--state-cache-size 8  # For 32GB+ RAM

Network tuning (validators):

# Add to /etc/sysctl.conf
net.core.rmem_max=26214400
net.core.wmem_max=26214400
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216

sudo sysctl -p

Storage: SATA SSD → NVMe = 5-10x improvement.


Disaster Recovery

Recovery Procedures

ScenarioStepsTime
Hardware failureRestore/rebuild → Sync from network → Restore keys4-8 hours
Database corruptionDelete DB → Restore keys → Resync4-8 hours
Key compromiseRotate session keys immediately → Update on-chain → InvestigateMinutes
Network issuesVerify ISP → Test backup connection → Check firewallMinutes

Annual Recovery Test

  1. Setup test node with testnet
  2. Restore keys from backup
  3. Start node and verify operation
  4. Measure recovery time
  5. Update documentation

Planned Maintenance

Scheduling

Announce: 24-48 hours advance in Telegram
Timing: Weekends, late night/early morning, avoid major events
Coordination: Maintain 2/3 validators online

Checklist

Pre-maintenance:

  • Announce in community
  • Backup validator keys
  • Verify backup restore works
  • Document current metrics

During:

  • Stop node gracefully
  • Perform maintenance
  • Verify changes
  • Start and monitor

Post-maintenance:

  • Verify sync status
  • Confirm block production (validators)
  • Check peer connectivity
  • Review resource usage

Run Full Node | Run Validator | Monitoring | Troubleshooting

Community

Telegram: t.me/selendranetwork | X: @selendranetwork | GitHub: github.com/selendra/selendra

Coordinate validator maintenance windows in Telegram.

Contribute

Found an issue or want to contribute?

Help us improve this documentation by editing this page on GitHub.

Edit this page on GitHub