Skip to main content

Side Protocol Testnet Fullnode Setup Guide

This guide will help you set up a full Side Protocol node on the testnet. Follow these steps carefully to ensure a successful deployment.

Prerequisites

System Requirements

  • Operating System: Ubuntu 22.04/24.04 LTS x64
  • CPU: 4 cores minimum
  • Memory: 16GB RAM minimum
  • Storage: 500GB NVMe/SSD Storage
  • Network: Stable internet connection
  • Access: Root or sudo privileges

Network Information

ComponentValueDescription
Chain IDsidechain-testnet-6Testnet identifier
Latest Versionv2.0.0-rc.7Current testnet version
Token SymbolSIDENative token
tip

The following commands are executed as root by default. If you are not a root user, please prepend the commands with sudo.

Initial Setup

Define Environment Variables

First, let's set up all the variables we'll need throughout the setup process:

# Node configuration
export NODE_DIR=/data/side # Node data directory
export NODE_NAME="your-node-name" # Your node's display name (max 70 chars)
export CHAIN_ID="sidechain-testnet-6" # Testnet chain ID
export VERSION="v2.0.0-rc.7" # Side Protocol version

# Network configuration
export MIN_GAS_PRICE="0.001uside" # Minimum gas price
export PORT_PREFIX="2" # Port prefix for custom ports

# Seeds for network connection
export SEEDS="[email protected]:26656,[email protected]:26656"

# Create symbolic link for easier access
export HOME_DIR="$HOME/.side"
info

Variable Explanation:

  • NODE_DIR: Where your blockchain data will be stored
  • NODE_NAME: A friendly name for your node (use only letters, numbers, and hyphens)
  • PORT_PREFIX: Used to avoid port conflicts if running multiple nodes
  • SEEDS: Initial network peers to connect to

Step 1: System Preparation

Update System Packages

# Update package list and install required tools
sudo -i

apt -q update
apt -qy install curl git jq lz4 build-essential aria2 unzip wget git

Install Go 1.23.1

# Remove any existing Go installation
rm -rf /usr/local/go

# Download and install Go 1.23.1
curl -Ls https://go.dev/dl/go1.23.1.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local

# Set up environment variables for Go
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/gobinpath.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | sudo tee /etc/profile.d/gopath.sh)

# Verify Go installation
go version

Step 2: Build Side Protocol

Clone and Build the Software

# Clone the Side Protocol repository
mkdir -pv $NODE_DIR $HOME_DIR && cd /data
git clone https://github.com/sideprotocol/side.git side_src
cd side_src

# Checkout the specific version and build
git checkout $VERSION && make build

# Verify the installation
sided version --long | grep -e version -e commit

Step 3: Initialize Your Node

Create Directory Structure

# Create symbolic link for easier access
ln -sv $NODE_DIR $HOME_DIR

# Initialize the node with your chosen name
sided init $NODE_NAME --chain-id $CHAIN_ID
tip

Node Name Tips:

  • Use a descriptive name like "my-side-node" or "validator-01"
  • Avoid special characters except hyphens
  • Keep it under 70 characters

Step 4: Configure Your Node

Set Custom Ports and Optimize Settings

# Create the port configuration script
cat > portset.sh << 'EOF'
#!/bin/bash

set -euo pipefail

DIR="${1:-}"
MINIGAS="${2:-0uinit}"
PORT="${3:-2}"
ENABLE_INDEXER="${4:-false}"
ENABLE_ABCI_RESPONSE="${5:-false}"

if [[ -z "$DIR" ]]; then
echo "[ERROR] No base directory provided."
echo "Usage: $0 <NODE_DIR> [MINIMUM_GAS_PRICES] [PORT_PREFIX] [ENABLE_INDEXER] [ENABLE_ABCI_RESPONSE]"
exit 1
fi

if [[ ! -d "$DIR/config" ]]; then
echo "[ERROR] Directory $DIR/config does not exist."
exit 1
fi

# Set minimum gas price
grep -q '^minimum-gas-prices' "$DIR/config/app.toml" && \
sed -i.bak -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"${MINIGAS}\"|" "$DIR/config/app.toml"

# Set pruning for efficient storage
sed -i.bak \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
"$DIR/config/app.toml"

# Disable state sync snapshots to save space
sed -i.bak \
-e 's|^snapshot-interval *=.*|snapshot-interval = 0|' \
-e 's|^snapshot-keep-recent *=.*|snapshot-keep-recent = 2|' \
"$DIR/config/app.toml"

# Enable Prometheus monitoring
sed -i.bak \
-e 's|^prometheus *=.*|prometheus = true|' \
"$DIR/config/config.toml"

# Configure transaction indexer (disabled for performance)
if [[ "$ENABLE_INDEXER" == "true" ]]; then
sed -i.bak -e 's|^indexer *=.*|indexer = "kv"|' "$DIR/config/config.toml"
else
sed -i.bak -e 's|^indexer *=.*|indexer = "null"|' "$DIR/config/config.toml"
fi

# Configure ABCI response handling
if [[ "$ENABLE_ABCI_RESPONSE" == "true" ]]; then
sed -i.bak -e 's|^discard_abci_responses *=.*|discard_abci_responses = false|' "$DIR/config/config.toml"
else
sed -i.bak -e 's|^discard_abci_responses *=.*|discard_abci_responses = true|' "$DIR/config/config.toml"
fi

# Set custom ports to avoid conflicts
sed -i.bak -e "s%^proxy_app = \"tcp://.*:26658\"%proxy_app = \"tcp://127.0.0.1:${PORT}6658\"%; s%^laddr = \"tcp://.*:26657\"%laddr = \"tcp://0.0.0.0:${PORT}6657\"%; s%^pprof_laddr = \".*:6060\"%pprof_laddr = \"127.0.0.1:${PORT}6060\"%; s%^laddr = \"tcp://.*:26656\"%laddr = \"tcp://0.0.0.0:${PORT}6656\"%; s%^prometheus_listen_addr = \".*:26660\"%prometheus_listen_addr = \":${PORT}6660\"%" "$DIR/config/config.toml"
sed -i.bak -e "s%^metrics-address = \".*:6065\"%metrics-address = \"127.0.0.1:${PORT}6065\"%; s%^ws-address = \".*:8546\"%ws-address = \"tcp://127.0.0.1:${PORT}8546\"%; s%^address = \".*:8545\"%address = \"127.0.0.1:${PORT}8545\"%; s%^address = \"tcp://.*:1317\"%address = \"tcp://127.0.0.1:${PORT}1317\"%; s%^address = \".*:8080\"%address = \"127.0.0.1:${PORT}8080\"%; s%^address = \".*:9090\"%address = \"127.0.0.1:${PORT}9090\"%; s%^address = \".*:9091\"%address = \"127.0.0.1:${PORT}9091\"%" "$DIR/config/app.toml"
EOF

# Make script executable and run it
chmod +x portset.sh
bash portset.sh $NODE_DIR $MIN_GAS_PRICE $PORT_PREFIX
info

What this script does:

  • Sets minimum gas price for transactions
  • Configures pruning to save disk space
  • Disables snapshots to reduce storage usage
  • Enables monitoring for better node management
  • Sets custom ports to avoid conflicts

Download Genesis File

# Download the genesis file (contains initial network state)
curl -Ls https://github.com/sideprotocol/testnet/raw/main/sidechain-testnet-6/genesis.json > \
$NODE_DIR/config/genesis.json

# Verify the genesis file was downloaded
ls -la $NODE_DIR/config/genesis.json

Configure Network Peers

# Add seed nodes for initial network discovery
sed -i -e 's|^seeds *=.*|seeds = "'$SEEDS'"|' $NODE_DIR/config/config.toml

# Verify the configuration
grep "seeds" $NODE_DIR/config/config.toml

Step 5: Set Up Cosmovisor (Automatic Updates)

Install Cosmovisor

# Install Cosmovisor (handles automatic software updates)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

# Set up Cosmovisor directory structure
mkdir -pv $NODE_DIR/cosmovisor/genesis/bin
ln -sv $NODE_DIR/cosmovisor/genesis $NODE_DIR/cosmovisor/current

# Copy the current binary to Cosmovisor
cp $(which sided) $NODE_DIR/cosmovisor/genesis/bin/
tip

Cosmovisor Benefits:

  • Automatically handles software upgrades
  • Zero-downtime updates
  • Rollback capability if needed

Create System Service

# Create systemd service file for automatic startup
tee /etc/systemd/system/sided.service > /dev/null << EOF
[Unit]
Description=Side Protocol node service
After=network-online.target

[Service]
User=$USER
Restart=on-failure
Type=simple
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$NODE_DIR
SyslogIdentifier=sided
LimitNOFILE=65545
Environment="DAEMON_NAME=sided"
Environment="DAEMON_HOME=$NODE_DIR"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF

Step 6: Download Blockchain Data (Optional)

info

Snapshot Benefits:

  • Skip the initial sync process (saves days of time)
  • Start with recent blockchain data
  • Recommended for faster setup
# Create snapshot directory
mkdir -pv $NODE_DIR/snapshot
cd $NODE_DIR/snapshot

# Backup validator state (important for validators)
cp $NODE_DIR/data/priv_validator_state.json $NODE_DIR/priv_validator_state.json.backup

# Remove existing data and download snapshot
rm -rf $NODE_DIR/data
wget -O side_data.tar.lz4 https://support.synergynodes.com/snapshots/side_testnet/side_.tar.lz4

# Extract the snapshot
lz4 -c -d side_data.tar.lz4 | tar -x -C $NODE_DIR

# Restore validator state
cp $NODE_DIR/priv_validator_state.json.backup $NODE_DIR/data/priv_validator_state.json

Step 7: Start Your Node

Enable and Start the Service

# Reload systemd configuration
systemctl daemon-reload

# Enable the service to start on boot
systemctl enable sided.service

# Start the node
systemctl start sided.service

# Check the service status
systemctl status sided.service

Monitor Your Node

# View real-time logs
journalctl -u sided.service -f -o cat

# Or view recent logs
journalctl -u sided.service --since "10 minutes ago"

Step 8: Verify Your Setup

Check Node Status

# Check if the service is running properly
systemctl status sided.service

# Check node sync status
sided status 2>&1 | jq .

# Check if node is catching up
sided status 2>&1 | jq .SyncInfo.catching_up

Test Network Connectivity

# Test RPC endpoint (should return node status)
curl -s 127.0.0.1:26657/status | jq .

# Check P2P connections (should show active peers)
ss -anp | grep 26656

Understanding Your Node

Configuration Files

Your node uses these important configuration files:

  • $NODE_DIR/config/config.toml: Network and consensus settings
  • $NODE_DIR/config/app.toml: Application-specific configuration
  • $NODE_DIR/config/genesis.json: Initial network state (read-only)

Port Usage

Your node uses these ports (with prefix 2):

ServicePortPurpose
RPC26657API access
P2P26656Peer connections
API1317REST API
Prometheus26660Monitoring

Troubleshooting

Common Issues and Solutions

1. Service Won't Start

# Check detailed error messages
journalctl -u sided.service -n 50

# Verify configuration files
sided validate-genesis $NODE_DIR/config/genesis.json

2. Node Not Syncing

# Check sync status
sided status 2>&1 | jq .SyncInfo

# Check peer connections
sided status 2>&1 | jq .NodeInfo.num_peers

3. Port Conflicts

# Check what's using the ports
ss -tulpn | grep :26657
ss -tulpn | grep :26656

# If conflicts exist, change PORT_PREFIX in the variables section

4. Disk Space Issues

# Check available disk space
df -h $NODE_DIR

# Clean up backup files
find $NODE_DIR/config -name '*.bak' -delete

Log Analysis

# View recent logs
journalctl -u sided.service --since "1 hour ago"

# View only error messages
journalctl -u sided.service -p err

# Follow logs in real-time
journalctl -u sided.service -f

Next Steps

Once your node is running and synced:

  1. Monitor Performance: Check logs regularly for any issues
  2. Set Up Monitoring: Configure alerts for your node
  3. Join Community: Connect with other node operators
  4. Consider Validation: Learn about becoming a validator

Support Resources

If you encounter issues:


info

This guide is for the Side Protocol testnet. For mainnet deployment, please refer to the official mainnet documentation.

tip

Pro Tips:

  • Keep your system updated regularly
  • Monitor disk space usage
  • Set up automated backups of your configuration
  • Join the community for support and updates