Skip to main content

Setting Up and Running the Snapshotter Lite Node V2

This guide provides instructions for installing and running the Snapshotter Lite Node V2 for the Powerloom Mainnet, covering prerequisites and operational procedures.

The Snapshotter Lite Node V2 can be set up using either the Docker image or by running natively on the local machine. However, using the Docker image is the recommended approach, as it provides the simplest and most reliable method for deployment.

Node Mint

Node Mint is now live at: https://mint.powerloom.network/. For detailed information on the node mint for Mainnet, please refer to https://blog.powerloom.io/snapshotter-update-power-claims-daily-rewards-new-operator-onboarding/

Follow the step-by-step instructions in the relevant guide to set up your Snapshotter Lite Node V2. If you need further assistance, refer to our troubleshooting documentation or reach out to us on discord for support.

Important note
  1. It is recommended that the node operates continuously, 24/7.
  2. If you possess multiple slots, refer to the section on setting up multiple nodes for further details.

We have streamlined the setup process based on your operating system. To begin, please choose your operating system from the tabs provided below.

  • For those looking to set up the node on a local Windows or Mac machine, please select the "Windows / MacOS" tab.
  • If you are configuring your node on a Linux VPS, select the "Linux" tab and follow the provided instructions to get started.

Setting up the Snapshotter Lite Node V2

Deploying a Snapshotter Lite Node V2 on a Virtual Private Server (VPS)

Deploying a Snapshotter Lite Node V2 on a Virtual Private Server (VPS) ensures seamless 24/7 operation without utilizing your local resources.

This section provides instructions for setting up your Snapshotter Lite Node V2 on an Ubuntu VPS.

While you're free to choose any provider, this guide specifically utilizes DigitalOcean for demonstration purposes.

Recommended VPS Providers:

  • DigitalOcean
  • Hostinger

Hardware Requirements

The Snapshotter Lite Node V2 is designed for minimal hardware demands, allowing it to operate effectively on various setups, including both local systems and cloud-based Virtual Machines.

For users running the node on Virtual Private Servers (VPS), the minimum specifications are:

  • RAM: At least 4 GB.
  • CPU Core: Minimum of 2 Cores
  • Disk Space: A minimum of 40 GB.

Step 1: Creating Your VPS

  1. Sign Up/Login: Start creating an account on your VPS provider or log in if you already have one.

  2. Choose an Image: Select Ubuntu as your operating system. We recommend using the latest stable version of Ubuntu for optimal performance.

  3. Select a Plan: Choose a plan that meets the minimum hardware requirements for the Snapshotter Lite Node V2. A plan with at least 4 GB RAM and 40 GB of disk space is advisable.

  4. Authentication: Set up SSH keys for secure access to your VPS.

  5. Finalize and Create: Choose any additional options, like backups if required. Your VPS will be set up within a few minutes.

Step 2: Accessing Your VPS

  • SSH into Your VPS: Use the following command from your terminal/command prompt, replacing your_vps_ip with the IP address of your VPS.
ssh root@your_vps_ip
  • If you set up SSH keys, you should be logged in without needing a password. Otherwise, you can also set your password for the VPS.

Step 3: Setting Up the Environment

  1. Update and Upgrade Your VPS:
sudo apt-get update && sudo apt-get upgrade -y
  1. Install Git:
    Git is necessary for cloning the Snapshotter Lite repository. Install it using:
sudo apt-get install git -y
  1. Install Docker and Docker Compose:
    Ensure Docker and Docker Compose are installed. You can install docker on Ubuntu using the following commands:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Once the Docker repository is added successfully, let’s install Docker and necessary components by using the below command:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 4: Cloning the Repository and Setting Up the Node

  1. Clone the Snapshotter Lite Repository:
    Navigate to the directory where you want to install the node and clone the repository:

    git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-mainnet
  2. Navigate to the Directory:
    Change to the directory of the cloned repository:

    cd powerloom-mainnet
  3. Cleanup the Environment: Run the diagnose and cleanup script to check for any previous instances of the lite node, local collector, stale images and networks.

    ./diagnose.sh

    Diagnose and Cleanup

tip

It is recommended to run the node in a standalone environment without any other major processes running on the same machine. Running other processes on the same machine may lead to conflicts and errors that can interfere with the node's operation. The diagnose and cleanup script will stop and remove only Powerloom related processes running on the machine, if any.

Step 5: Running the Node

  1. Setting up Screen:
    The Screen utility allows you to run processes in the background, enabling you to maintain long-running tasks without keeping a terminal window open. To initiate a new Screen session for managing the Snapshotter Lite Node V2, follow these steps:

Enter the following command to create a new Screen session named "snapshotter-lite-node-mainnet":

screen -R snapshotter-lite-node-mainnet
  • This command opens a new Screen session, where you can start the Snapshotter Lite Node V2.
  • Once inside the new Screen session, initiate the Snapshotter Lite Node V2 as required.
note

If you have an existing screen session named snapshotter-lite-node-mainnet, the above command will attach to the existing session. Otherwise, it will create a new session with that name.

This approach ensures your node can continue running in the background, even if you disconnect from the terminal session.

  1. Initialize the Node:
    Initiate the snapshotter lite node v2 setup by typing the command in the terminal:

    ./build.sh

Follow the prompts to enter the required information.

tip

Please do not use your NFT minting wallet to run the snapshotter lite node v2. The safest approach is to generate and assign a burner wallet. You can generate a burner wallet through any of the tools listed below:

Once generated, make sure you assign your burner wallet to your snapshotter dashboard.

Step 6: Configuring the Node

After initiating the process, the setup steps will differ depending on whether this is the first time the node has been setup or not:

First Time Setup:

  1. Select the Data Market that you would like to participate in:

    • The lite node now allows you to choose between two data markets: Uniswap V2 and Aave V3 with Uniswap V2 being the default. This will be further expanded to include more data markets in the future and to allow node operators to choose the data market that they want to operate on.
  2. Next, you'll be prompted to enter the following values:

    • $SOURCE_RPC_URL: Use any Ethereum Mainnet RPC, such as Ankr, Infura, or Alchemy.

    • $SIGNER_ACCOUNT_ADDRESS: Utilize a burner wallet for the signer account address. Please DO NOT use your main/primary wallet.

    • $SIGNER_ACCOUNT_PRIVATE_KEY: Use the private key from your burner wallet.

    • $SLOT_ID: To assign your node to a specific slot, please provide the corresponding Slot ID or NFT ID. You can locate your NFT ID within your transaction details on PolygonScan.

  3. Optionally, you can provide to following values:

    • $TELEGRAM_CHAT_ID: Can be provided if you would like to enable Telegram reporting for node issues. See our Telegram Bot Setup page for instructions on how to get your Telegram Chat ID.

After entering these details, the node will start running the background processes.

If you want to exit your screen, type the command in the terminal:

CTRL + A + D

Subsequent Setup:

  1. Select the Data Market that you would like to participate in.

  2. You will be prompted to choose whether you wish to change the previously configured values for the above: SOURCE_RPC_URL, SIGNER_ACCOUNT_ADDRESS, SIGNER_ACCOUNT_PRIVATE_KEY and SLOT_ID. Choose y or n depending on whether you wish to change them.

    Subsequent Setup

  3. If you choose y to change the previously configured values, you will be prompted to enter the new values individually for each of the above values.

Step 6: Maintaining Your Node

  • Regular Updates: Keep your system and Snapshotter Lite Node V2 updated by regularly pulling the latest changes from the repository and applying system updates.

  • Monitoring: Regularly check the status of your node and the VPS to ensure everything is running smoothly.

Everytime you start or restart the node, it goes through two stages

Simulation mode submissions

This does not count towards your snapshot quota. This is to test whether your node can establish connections to the sequencer over libp2p protocol streams that ultimately enforce the Powerloom Protocol for data markets.

You will see log messages similar to the one shown below that will ensure that your node has the capability of submitting snapshots to the sequencer.

Simulation mode submissions

note
info

Read more about monitoring and verifying the simulation mode submissions on the Monitoring and Troubleshooting page.

Regular snapshot submissions

Once you can verify the simulation mode submissions, you will have log messagse similar to the one shown below that will ensure that your node is capturing epoch releases and submitting snapshots to the sequencer.

note

It usually takes 2 - 5 minutes between the simulation mode submissions and a subsequence epoch release to be caught to trigger the regular snapshot submissions.

Sample node logs

info

For further details on using the snapshotter dashboard to monitor the running status of your node, check the Monitoring Node Activity with the Snapshotter Dashboard section.


Setting Up Multiple Nodes on a Linux VPS

We have a detailed, extensive documentation and setup guide on our mutli node setup on a Linux VPS.

Head over here and follow the detailed instructions in the README: https://github.com/PowerLoom/snapshotter-lite-multi-setup

tip

We recommend using this for even our single node operators, as long as you can follow the detailed instructions.

Troubleshooting

If you encounter any issues, please refer to our Troubleshooting section for more information.