Skip to main content

Join Verana Testnet

This guide provides comprehensive instructions for joining the Verana testnet as a full node or pruned node.

Overview

ParameterValue
Chain IDvna-testnet-1
APIhttp://node1.testnet.verana.network:1317
RPChttp://node1.testnet.verana.network:26657
Explorerhttps://explorer.testnet.verana.network
Faucethttps://faucet-vs.testnet.verana.network/invitation
Block Time~5 seconds
Max Validators100

Hardware Requirements

Node TypeRAMStorageCPUNetwork
Full Node16GB500GB SSD4+ cores100+ Mbps
Pruned Node8GB100GB SSD2+ cores50+ Mbps

Getting Started

1. System Requirements

For Ubuntu 20.04 LTS or later

# Update system
sudo apt update && sudo apt upgrade -y

# Install required packages
sudo apt install -y build-essential git curl wget jq

2. Install Veranad Binary

Prerequisite: Ensure the veranad binary is installed and up-to-date.
See Install or Update Veranad Binary.

Verify installation:

veranad version

3. Initialize Node

# Initialize the node with a custom moniker
veranad init <your-moniker> --chain-id vna-testnet-1

# Set minimum gas prices
# For Linux
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uvna"/' ~/.verana/config/app.toml

# For macOS
sed -i '' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uvna"/' ~/.verana/config/app.toml

4. Download Genesis File

# Download the genesis file
curl -o genesis.json https://utc-public-bucket.s3.bhs.io.cloud.ovh.net/vna-testnet-1/config/genesis.json
mv genesis.json ~/.verana/config/

# Verify genesis file
veranad validate-genesis

5. Configure Seeds and Peers

Create a script to fetch and set persistent peers and seeds:

# Create a script to fetch and set persistent peers and seeds
cat > ~/update-peers.sh << 'EOF'
#!/bin/bash

# Fetch persistent peers from the manifest
PEERS=$(curl -s https://utc-public-bucket.s3.bhs.io.cloud.ovh.net/vna-testnet-1/persistent_peers/persistent_peers.json | jq -r '.persistent_peers')

# Update config.toml with the fetched peers
sed -i.bak "s/persistent_peers = .*/persistent_peers = \"$PEERS\"/" ~/.verana/config/config.toml

# Use the same peers as seeds
sed -i.bak "s/seeds = .*/seeds = \"$PEERS\"/" ~/.verana/config/config.toml

# Update mempool settings with correct numeric values
sed -i.bak "s/experimental_max_gossip_connections_to_persistent_peers = .*/experimental_max_gossip_connections_to_persistent_peers = 10/" ~/.verana/config/config.toml
sed -i.bak "s/experimental_max_gossip_connections_to_non_persistent_peers = .*/experimental_max_gossip_connections_to_non_persistent_peers = 10/" ~/.verana/config/config.toml

echo "Updated persistent peers and seeds to: $PEERS"
echo "Updated mempool settings with recommended values"
EOF

# Make the script executable
chmod +x ~/update-peers.sh

# Run the script
~/update-peers.sh

Edit ~/.verana/config/config.toml:

# Configure P2P settings
[p2p]
max_num_inbound_peers = 40
max_num_outbound_peers = 20

6. Configure State Sync (Optional)

Edit ~/.verana/config/config.toml:

[statesync]
enable = true
rpc_servers = "http://node1.testnet.verana.network:26657,http://node2.testnet.verana.network:26657"
trust_height = <current_height>
trust_hash = "<block_hash>"
trust_period = "168h0m0s"

7. Download Snapshot (Optional)

SNAPSHOT_MANIFEST="/tmp/verana-snapshot-manifest.json"
wget https://utc-public-bucket.s3.bhs.io.cloud.ovh.net/vna-testnet-1/snapshots/manifest.json -O "$SNAPSHOT_MANIFEST" || true

if [ -s $SNAPSHOT_MANIFEST ]; then
latest_snapshot=$(jq -r '.latestSnapshot' $SNAPSHOT_MANIFEST)
wget -O ~/.verana/data.tar.gz https://utc-public-bucket.s3.bhs.io.cloud.ovh.net/vna-testnet-1/snapshots/$latest_snapshot
tar -xzvf ~/.verana/data.tar.gz -C ~/.verana
else
wget -O ~/.verana/data.tar.gz https://utc-public-bucket.s3.bhs.io.cloud.ovh.net/vna-testnet-1/snapshots/data.tar.gz
tar -xzvf ~/.verana/data.tar.gz -C ~/.verana
fi

8. Configure Pruning (Optional)

Edit ~/.verana/config/app.toml:

# Pruning options: "default", "everything", "nothing", "custom"
pruning = "custom"
pruning-keep-recent = "100"
pruning-keep-every = "0"
pruning-interval = "10"

Running the Node

1. Start the Node

# Start the node
veranad start

2. Running as a Service

Create a systemd service file:

sudo tee /etc/systemd/system/veranad.service > /dev/null <<EOF
[Unit]
Description=Verana Daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which veranad) start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable veranad
sudo systemctl start veranad

Monitoring and Maintenance

1. Check Node Status

# Check node status
veranad status

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

# Check connected peers
veranad status 2>&1 | jq .NodeInfo

2. Monitor Logs

# View logs
journalctl -u veranad -f

# Filter logs by level
journalctl -u veranad -f | grep "ERROR"

3. System Monitoring

# Install monitoring tools
sudo apt install -y htop iotop

# Monitor system resources
htop
iotop

Troubleshooting

Common Issues

  1. Node Not Syncing

    • Check internet connection
    • Verify peers are connected
    • Check system resources
    • Review logs for errors
  2. High Resource Usage

    • Monitor CPU and memory usage
    • Check disk I/O
    • Review network bandwidth
    • Adjust pruning settings if needed
  3. Connection Issues

    • Check firewall settings
    • Verify port forwarding
    • Test network connectivity
    • Review peer connections
  4. State Sync Failures

    • Verify trust height and hash
    • Check RPC server availability
    • Ensure sufficient disk space
    • Review state sync logs

Security Considerations

1. Firewall Configuration

# Allow only necessary ports
sudo ufw allow 26656/tcp # P2P
sudo ufw allow 26657/tcp # RPC
sudo ufw allow 1317/tcp # API

2. System Hardening

# Update system regularly
sudo apt update && sudo apt upgrade -y

# Install security updates
sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades

Backup and Recovery

1. Backup Configuration

# Backup node configuration
tar -czf verana-backup.tar.gz ~/.verana

2. Restore from Backup

# Restore from backup
tar -xzf verana-backup.tar.gz -C ~/