Running a Shardeum Node: The Ultimate Setup Guide

ट्रेंडिंग

Introduction to Crypto Nodes

What Are Crypto Nodes?

Crypto nodes are crucial components of blockchain networks, serving as the backbone for decentralized applications and transactions. These nodes verify and validate transactions, ensuring the integrity Shardeum Node Setup and security of the network. In this article, we will focus on setting up a Shardeum node, which is a specific type of crypto node used for the Shardeum blockchain.

Why Run a Shardeum Node?

Running a Shardeum node offers several benefits, including:

  • Validation : By running a node, you contribute to the validation process, helping to secure the network and ensure its integrity.
  • Staking : You can participate in staking, earning rewards for validating transactions and maintaining the network.
  • Decentralization : By running a node, you help decentralize the network, reducing reliance on centralized authorities.
  • Customization : You can customize your node setup to suit your needs, whether for personal use or as part of a larger network.

Hardware Requirements

Before setting up a Shardeum node, you need to ensure your hardware meets the minimum requirements. Here are the key specifications:

Component Minimum Requirement
CPU Quad-core processor
RAM 16 GB DDR4 RAM
Storage 500 GB SSD
Internet Stable internet connection

Software Requirements

To run a Shardeum node, you will need to install specific software. Here are the key tools you’ll need:

For Linux

  1. Git :

    • sudo apt update
    • sudo apt install -y git
  2. Build Tools :

    • sudo apt install -y binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake gcc g++ python docker.io protobuf-compiler libssl-dev pkg-config clang llvm
  3. Cargo :

    • cargo build --release

For Mac OS

  1. Developer Tools :

    • Ensure developer tools are installed.
    • Use brew to install extra tools:
        brew install cmake protobuf clang llvm  
  2. Cargo :

    • cargo build --release

Setting Up Your Node

Using nearup

The nearup tool is exclusively used to launch Shardeum testnet and localnet nodes. It is not used for mainnet nodes. Here are the steps to set up your node using nearup :

Compiling and Running a Node without Docker

  1. Compile neard Locally :

    • If Rust isn’t already installed, follow these instructions.
    • For Mac OS, make sure you have developer tools installed and then use brew to install extra tools.
    • For Linux, install the dependencies listed above.
    • Compile neard locally and point nearup to the compiled binaries.
  2. Run the Node :

    • Execute the following command to run a testnet node:
        nearup run testnet --binary-path path/to/nearcore/target/release  
    • To run a localnet node instead, replace testnet with localnet in the command above.
  3. Validator ID :

    • You might be asked for a validator ID; if you do not want to validate, simply press enter. For validation, please follow the Validator Bootcamp instructions.
  4. Account ID :

    • Enter your account ID (leave empty if not going to be a validator).
  5. Logs :

    • To check logs, call: nearup logs or nearup logs --follow .

Running a Node on the Cloud

  1. Create a New Instance :

    • Follow the hardware requirements to create a new instance on your preferred cloud provider.
  2. Add Firewall Rules :

    • Add firewall rules to allow traffic to port 24567 from all IPs (0.0.0.0/0).
  3. SSH into the Machine :

    • SSH into the machine using the external IP address provided by your cloud provider. For example, on AWS, you might use:
        aws ec2 ssh -i "your-key.pem" ec2-user@your-instance-public-dns-name  
    • Cloud providers may offer custom commands to help with connecting to instances. For example, GCP offers:
        gcloud compute ssh --zone=your-zone your-instance-name  
  4. Start the Node :

    • Once connected, start the node using the nearup command as described above.

Starting a Node from Backup

Using data backups allows you to sync your node quickly by using public tar backup files. There are two types of backups available for both testnet and mainnet:

  • Regular Backups : These are the most commonly used backups.
  • Archival Backups : These are used for historical purposes and are less frequently updated.

Starting Node Using neard Backup Data

  1. Initialize the Node :

    • Execute the following command to initialize the node using backup data:
        ./neard init --chain-id <chain-id> --download-genesis  
  2. Download Backup Data :

    • Create a directory for the node data:
        mkdir ~/.near/data  
    • Download the latest snapshots from Node Data Snapshots:
        wget -c <link-above> -O - | tar -xC ~/.near/data  
  3. Run the Node :

    • Start the node using the compiled binaries:
        ./neard run  

Starting Node Using nearup Backup Data

  1. Download Backup Data :

    • Download the latest snapshots from Node Data Snapshots.
  2. Run the Node :

    • Execute the following command to start the node using nearup backup data:
        nearup run testnet --binary-path path/to/nearcore/target/release --data-path path/to/data  

Cloud Service Providers

AWS Setup Guide

AWS provides a robust platform for setting up a Shardeum validator. Here are the detailed instructions:

  1. Create an EC2 Instance :

    • Follow the hardware requirements to create an EC2 instance.
  2. Add Firewall Rules :

    • Add firewall rules to allow traffic to port 24567 from all IPs (0.0.0.0/0).
  3. SSH into the Machine :

    • SSH into the machine using the external IP address provided by AWS.
  4. Start the Node :

    • Once connected, start the node using the nearup command as described above.

DigitalOcean Setup Guide

DigitalOcean provides a straightforward way to set up a Shardeum validator. Here are the detailed instructions:

  1. Create a Droplet :

    • Follow the hardware requirements to create a Droplet.
  2. Add Firewall Rules :

    • Add firewall rules to allow traffic to port 24567 from all IPs (0.0.0.0/0).
  3. SSH into the Machine :

    • SSH into the machine using the external IP address provided by DigitalOcean.
  4. Start the Node :

    • Once connected, start the node using the nearup command as described above.

Contabo Setup Guide

Contabo provides a flexible platform for setting up a Shardeum validator. Here are the detailed instructions:

  1. Create a VPS :

    • Follow the hardware requirements to create a VPS.
  2. Add Firewall Rules :

    • Add firewall rules to allow traffic to port 24567 from all IPs (0.0.0.0/0).
  3. SSH into the Machine :

    • SSH into the machine using the external IP address provided by Contabo.
  4. Start the Node :

    • Once connected, start the node using the nearup command as described above.

Google Cloud Platform Setup Guide

Google Cloud Platform provides a scalable platform for setting up a Shardeum validator. Here are the detailed instructions:

  1. Create an Instance :

    • Follow the hardware requirements to create an instance.
  2. Add Firewall Rules :

    • Add firewall rules to allow traffic to port 24567 from all IPs (0.0.0.0/0).
  3. SSH into the Machine :

    • SSH into the machine using the external IP address provided by GCP.
  4. Start the Node :

    • Once connected, start the node using the nearup command as described above.

Troubleshooting Common Issues

Port 24567 Not Accessible

  • Solution : Ensure that port 24567 is open and forwarded to the machine where the node is running. If you’re running localnet, you don’t need to open port 24567.

Node Not Syncing

  • Solution : Check the logs for any errors. Ensure that the node has access to the necessary data and that the chain ID is correct.

Validator ID Not Recognized

  • Solution : If you’re asked for a validator ID and it’s not recognized, ensure that you’ve followed the Validator Bootcamp instructions correctly.

Conclusion

Running a Shardeum node is a significant step towards contributing to the decentralization of the blockchain network. By following these steps, you can set up your node on various cloud service providers and ensure its smooth operation. Remember to troubleshoot common issues and keep your node updated with the latest software and data backups. With this ultimate setup guide, you’re well on your way to becoming a part of the Shardeum community and helping to secure the network.