Migration Guide

Table of Contents


It's recommend leaving your existing Pillar online during the migration if it's still producing momentums. The migration is seemless, the only difference between the Setup Guide and this Migration Guide, is that you will copy your new Pillar's producer address and update it in your syrius wallet for the Pillar's reward address. Details are provided in Step 9) Update Producer Address.


1) Prerequisites

Before proceeding, ensure you have the following:

  • Basic Knowledge: Familiarity with command-line interfaces and server management.

  • Access Credentials: SSH access to your chosen server with sudo privileges.


2) Choosing a Hosting Provider

Selecting a reliable hosting provider is crucial for the stability and performance of your Zenon Pillar. Consider the following factors when choosing a provider:

  • Reliability and Uptime: Ensure the provider offers high uptime guarantees (99.9% or higher).

  • Performance: Look for providers with robust CPU and RAM options to handle blockchain operations.

  • Scalability: Ability to upgrade resources as your node grows.

  • Security: Features like DDoS protection, firewalls, and regular backups.

  • Support: 24/7 customer support can be invaluable.

  • Cost: Balance between features and your budget.

Popular Hosting Providers:

  • DigitalOcean

  • Amazon Web Services (AWS)

  • Hetzner

  • Google Cloud Platform (GCP)

  • Microsoft Azure

  • Vultr

  • Linode

Choose a provider that best fits your requirements and budget.


3) Minimum Hardware Requirements

To ensure optimal performance and stability of your Zenon Pillar, your server should meet the following minimum hardware specifications:

Component
Minimum Requirement

CPU

≥ 4 cores (ideally 8 CPU for the initial sync)

RAM

≥ 4 GB (ideally 16 GB for the initial sync)

Storage

≥ 40 GB free space

Network

Dedicated bandwidth with speeds exceeding 100 Mbps


4) Choosing the Operating System

For optimal performance and compatibility with the Zenon controller, it is recommended to use a Linux distribution. The x86/64 znn_controller-linux release is compatible with several distros, including:

  • Ubuntu 22.04 LTS (Recommended)

  • Debian 11

  • CentOS 8

  • Fedora 36


5) Server Setup and Configuration

Accessing the Server

  1. Obtain SSH Credentials: After setting up your server with your chosen provider, retrieve the SSH IP address, username, and password/key.

  2. Connect via SSH:

    ssh username@your_server_ip

    Replace username with your server's username (commonly root) and your_server_ip with your server's IP address.

  3. Switch to Root User:

    sudo -i

    This command grants you root privileges for the installation process.

Updating the System

Ensure your server's package lists and installed packages are up to date by running the command individually:

apt update
apt upgrade -y
  • apt update: Updates the package index.

  • apt upgrade -y: Upgrades all installed packages to their latest versions.

Installing Required Packages

Install unzip and other necessary utilities:

apt install -y unzip wget
  • unzip: Required for extracting the Zenon controller ZIP file.

  • wget: Facilitates downloading files from the internet.


6) Installing the Zenon Controller

  1. Download the Zenon Controller: Execute the following command to download and extract the Zenon controller:

    wget -O znn_controller-linux-x86_64.zip https://github.com/zenon-network/znn_controller_dart/releases/download/v0.0.4-alpha/znn_controller-linux-x86_64.zip && \
    unzip -o znn_controller-linux-x86_64.zip && \
    rm znn_controller-linux-x86_64.zip

    Visit the official Zenon Network Github repository for the latest znn_controller_dart release: https://github.com/zenon-network/znn_controller_dart/releases

    • wget -O: Downloads the file and saves it with the specified name.

    • unzip -o: Extracts the ZIP file, overwriting existing files if necessary.

    • rm: Removes the ZIP file after extraction to save space.

  2. Verify Installation:

    Ensure the znn-controller executable is present:

    ls -la | grep znn-controller

    You should see the znn-controller file listed.


7) Configuring Automatic Restarts with Cron

For the initial sync of your Zenon Pillar, it's recommended to configure automatic restarts. This ensures that the controller restarts hourly, speeding up the sync process.

  1. Open Crontab Editor:

    crontab -e

  2. Add Cron Job:

    1. Press i to enter insert mode.

    2. Navigate to the end of the file.

    3. Add the following line to schedule a restart every hour:

      0 * * * * /usr/bin/sudo /usr/sbin/service go-zenon restart

  3. Save and Exit:

    1. Press Esc to exit insert mode.

    2. Type :wq and press Enter to save and quit.

Once your Pillar catches up to the latest height, disable the automatic restart cron by commenting out the line: # 0 * * * * /usr/bin/sudo /usr/sbin/service go-zenon restart


8) Deploying the Pillar

  1. Start the Zenon Controller:

    ./znn-controller

  2. Deployment Options:

    Upon running the controller, you will be presented with deployment options. To deploy your pillar:

    • Select option 1) Deploy

  3. Monitoring Synchronization: The controller will begin syncing to the latest block height of the Zenon network. This process may take some time (even days) depending on network conditions and server performance. To monitor the status of your sync:

    Select option 2) Status And compare it to the latest height in your syrius wallet, or trusted Zenon Network explorers: https://www.zenonhub.io https://explorer.zenon.org https://www.zenon.tools


9) Update Producer Address

Once and ONLY once your new Pillar has synced up to the latest height, should you proceed with this step of the migration. If you update your producer address prior to a full sync, you will miss rewards as your Pillar will not be participating in the network until it's fully caught up. Therefore if your new Pillar reached the latest height:

  1. Open Your syrius Desktop Wallet

    1. Select the address of the Pillar you're migrating.

    2. Click on Pillars in the navigation bar.

    3. For the Pillar producer address field, paste the new Pillar's Producer Address, and press Next and Update until it saves the new address. Steps to get your new Pillar's Address are written below.

  2. Start the Zenon Controller:

    ./znn-controller

  3. Deployment Options:

    Upon running the controller, you will be presented with deployment options. To deploy your pillar:

    • Select option 2) Status

  4. Copy Producer Address Use this new Pillar Producer Address to update in the syrius wallet.


10) Post-Deployment Steps

After your pillar has successfully synced to the latest height and you've updated your Pillar's Producer Address in your syrius wallet, it's crucial to remove the cron job so that the Pillar doesn't miss momentums unnecessarily:

  1. Comment Out the Cron Job:

    Prevent the automatic restart to avoid interrupting the controller's operation.

    • Re-open Crontab Editor:

      crontab -e

    • Locate the Cron Job:

      # 0 * * * * /usr/bin/sudo /usr/sbin/service go-zenon restart

    • Add a # at the Beginning:

      This comments out the line, disabling the scheduled restart.

  2. Save and Exit:

    1. Press Esc to exit insert mode.

    2. Type :wq and press Enter to save and quit.

  3. Shut down old Pillar on old Hosting Provider: Once the above steps have been completed, you can shut down your server which hosted your old Pillar. It is recommended that you delete the server only after you've successfully collected your Pillar rewards in the syrius wallet (using the new Pillar's Producer Address). You can wait until the next reward distribution for this (the next day, depending at which hour of the day you've migrated).


11) Useful Commands

Watch the Pillar's logs in real-time:

watch systemctl status go-zenon

Verify the Sync / Height Status:

Replace the PRIVATE-IP with your Pillar's Private IP address:

curl -X GET http://PRIVATE-IP:35997 -H "content-type: application/json" -d '{"jsonrpc": "2.0", "id": 21, "method": "stats.syncInfo", "params": []}'

You will receive a response:

{"jsonrpc":"2.0","id":21,"result":{"state":1,"currentHeight":1998515,"targetHeight":5113554}}

When the state goes from 1 to 2, then your Pillar is fully synced.

Last updated