How to Become a Validator and Help Shape the Future of Shardeum

How to Become a Validator and Help Shape the Future of Shardeum

1. INTRODUCTION: What is Shardeum?

Unlike Ethereum, Shardeum is also an EVM-based Layer 1 blockchain. Shardeum is a linearly scalable smart contract platform that provides low gas fees while maintaining true decentralization and solid security through dynamic state sharding.

1.1 Why Shardeum?

  1. EVM-based layer 1 blockchain

  2. Linear scalability and low gas fees forever

  3. Anyone can operate a node

  4. Immediate finality and low latency

  5. Solid Security

  6. High fairness & energy efficiency

2. Benefits of Operating a Validator:

Running your own Validator helps Shardeum in:

-enhances Shardeum network security
-earns testnet SHM from user transaction fees

3. Validating Transactions on Shardeum:

  • Shardeum validators participate in the consensus process for transactions on the network. Validators who reach honest consensus on transactions are rewarded with testnet SHM tokens. Validators who reach dishonest consensus on transactions will have their testnet SHM tokens slashed.

  • The consensus process for transactions on Shardeum is based on the Proof of Stake (PoS) + Proof of Quorum (PoQ) consensus mechanism. PoS ensures that anyone with the minimum required stake can participate in validation, while PoQ determines how the transactions are validated within a consensus group.

  • Validators who reach honest consensus on transactions are rewarded with testnet SHM tokens because they are contributing to the security and stability of the network. Validators who reach dishonest consensus on transactions, on the other hand, are penalized by having their testnet SHM tokens slashed. This is done to discourage bad actors from attempting to manipulate the network.

  • The Shardeum consensus mechanism is designed to be secure, efficient, and fair. It ensures that only honest transactions are included in the blockchain, and it discourages bad actors from attempting to disrupt the network.

4. Minimum Hardware Requirements for Becoming a Validator:

-250 GB SSD storage
-Quad core CPU less than 10 years old if self hosting
-Dual core CPU works if hosted with newer Xeons / EPYC
-16 GB of ram,  4+ GB of virtual memory recommended
-Hosting: 8 GB RAM + 8 GB Virtual Memory

NOTE :

To run a validator node you must have a mac or linux machine.
Currently for windows it does not apply.

5. Unlock the Power of Shardeum: Run Your Own Validator Node!

5.1 Install prerequisites:

~LINUX:
(Press at the same time)
Ctrl + Alt + T

~MAC:
(Press at the same time)
Command + Space bar 
(Type)
Terminal

5.2 Install Package Managers:

We will use curl in this tutorial to download files:

INFO

Mac comes with curl, so we will install homebrew with curl (which will handle packages like apt in Linux).

  • Linux
sudo apt-get install curl
  • Mac
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

add Homebrew to your PATH:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'
eval "$(/opt/homebrew/bin/brew shellenv)"

5.3 Update the Package Managers:

Make sure your packages are up to date first:

INFO

When you add sudo to a command, the output will ask for your system password for admin verification.

  • Linux
sudo apt update
  • Mac
brew update

5.4 Install Docker:

Install docker with docker.io:

  • Linux
sudo apt install docker.io
  • Mac
brew install docker

Check that docker is working with (should return version 20.10.12 or higher):

  • Shell
docker --version

5.5 Install Docker-Compose:

Curl request docker-compose:

  • Linux
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  • Mac
brew install docker-compose

Setup permissions for docker-compose:

  • Shell
sudo chmod +x /usr/local/bin/docker-compose

Check that docker-compose is working (should return version 1.29.2 or higher):

  • Shell
docker-compose --version

NOTE:

Shardeum Validator support on Windows will be coming in the future.

5.6 Download and Install Validator:

Run:

  • Shell
curl -O https://gitlab.com/shardeum/validator/dashboard/-/raw/main/installer.sh && chmod +x installer.sh && ./installer.sh
WARNING

If you see the error:

Docker daemon is not running

run:

  • Shell
sudo usermod -a -G docker $USER && newgrp docker

if that does not work, also try:

  • Shell
sudo service docker start

then try to install it with the curl command again.

The terminal will ask questions about your setup settings.

Permit to collect validator data for bug reporting:

By running this installer, you agree to allow the Shardeum team to collect this data. (y/n)?:

Enter y to set up the web-based dashboard:

Do you want to run the web based Dashboard? (y/n): y

Set a password for dashboard access:

Set the password to access the Dashboard:

Add a custom session port for the web-based dashboard or hit enter for port 8080:

Enter the port (1025-65536) to access the web based Dashboard (default 8080):

Set the first p2p port (default 9001):

This allows p2p communication between nodes. Enter the first port (1025-65536) for p2p communication (default 9001):

Set the second p2p port (default 10001):

Enter the second port (1025-65536) for p2p communication (default 10001):

Add a custom path or install to root:

What base directory should the node use (defaults to ~/.shardeum):

Wait for the installation process to complete.

CAUTION

If you are behind a router and you are using ports 9001 and 10001 for p2p communication, make sure ports 9001 and 10001, are forwarded (be careful doing this since it will modify your firewall):

https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/

Reference:

https://gitlab.com/shardeum/validator/dashboard/

5.7 Open Validator Command Line Interface:

Make sure you are in the root directory by running:

  • Shell
cd

Go to the hidden Shardeum directory:

  • Shell
cd .shardeum

Start the CLI by running the following shell script:

  • Shell
./shell.sh
WARNING

If you see any error:

Got permission denied while trying to connect to the Docker daemon socket at 
unix:///var/run/docker.sock: 
Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/shardeum-dashboard/json": 
dial unix /var/run/docker.sock: 
connect: 
permission denied

run:

  • Shell
sudo usermod -a -G docker $USER && newgrp docker

if that does not work, also try:

  • Shell
sudo service docker start

then try to start the shell script again.

5.8 Open Validator GUI:

While inside the shell script, run:

  • Shell
operator-cli gui start

Go to your web browser and go to:

  • Local
https://localhost:8080/
  • Server
https://<server_ip>:8080/

CAUTION

You might see a warning page when trying to access this address in your web browser. Ignore this warning and continue to the validator dashboard. Another way to work around this warning:

  • Firefox
From the three bar button (hamburger) menu button, go to Settings

Click on “Privacy & Security” on the left.

Scroll down to locate “View Certificates” and click that button.

Click the “Servers” tab, then click “Add Exception”.

Type: “https://localhost:8080” (or your remote/VPS server’s IP and port), 
then click “Get Certificate”, then click “Confirm Security Exception”.

The result should be the server/localhost in the list, click “OK”.

Refresh the operator dashboard page and the certificate error should be gone.
  • Chrome
Click on the “Not secure” alert and select/click on “Certificate is not valid”.

Click on the “Details” tab, then click n “localhost” in the “Certificate Hierarchy” box and click the “Export” button.

Click on the “Details” tab, then click on 
“mynode-sphinx.shardeum.local” in the “Certificate Hierarchy” box and click the “Export” button.

The result of the steps above are two certificate files save in a location to be used in the following steps.

Type: chrome://settings in address bar, hit enter. 

Click on “Privacy and security” on the left menu. Then click “Security” from the list in the main window.

Scroll down to find “Manage device certificates” in the main windows and select it.

Click the “Import” button.

Follow the import prompts. 

Place the ‘mynode-sphinx.shardeum.local.crt” in the “Trusted Root Cert… Auth..” folder.

Click “Yes” and then “OK”.

Click “Import” once more. 

Then follow the import prompts. 

Place the ‘localhost.crt” in the “Personal” folder.

Close all Chrome windows (as in Exit Chrome). 

When you have successfully restarted chrome, the operator dashboard will not show with a white lock.

You will be asked for your password set during setup.

Shardeum Vaildator

DANGER

The login will fail even if you put no password during the setup process. To set a new password inside the validator CLI:

  • Shell
operator-cli gui set password <type_new_password__here>

You should see the “Overview” page for the Shardeum Validator Dashboard in your web browser:

Shardeum Overview page

5.9 Step 5: Start Validator:

Go to the “Maintenance” page, then click the “Start Node” button in the top left white box:

Maintenance page

(Same as running)

  • Shell
operator-cli start

Wait and refresh the page.

The node is running correctly if the “Start Node” button now says “Stop Node”. If you want to stop the node with the CLI:

  • Shell
operator-cli stop

Maintence

5.10 Step 6: Monitor Validator:

Go to “Performance” to see your node’s hardware performance here:

Performance

For more details about your node status run the following inside the CLI:

  • Shell
operator-cli status

DANGER

If your node becomes inactive, try checking its status.

  • Shell
pm2 list

Reset the validator from the list by running:

  • Shell
pm2 delete [id]

5.11 Step 7: Connect Wallet to Betanet:

Connect to Sphinx 1.X with your wallet by clicking the button linked here

5.12 Step 8: Get SHM from Betanet Faucet:

Shardeum Twitter SHM Faucet Guide for Sphinx 1.X

Note: Shardeum Test Faucets are not working as of now, it will be up again in a few days.

5.13 Step 9: Stake SHM to Validator:

After you start the validator, go to the “Settings” page. You will be asked to connect your wallet:

Connect a wallet

After you connect your wallet, you should see the following:

Add Stake

When you click “Add Stake”, you will see the following:

Add Stake

-Stake Wallet Address [wallet connected]
-Nominee Public Key [filled in automatically while validator is running]
-Stake amount (SHM) [empty and is in units ether not wei]

This example has filled in 10 SHM tokens to stake.

Once all fields are filled, click the “Stake” button.

Your wallet will ask you to sign the transaction stake your SHM.

Once the transaction is signed and complete, you have staked your SHM tokens successfully.

TIP

If your node status is on Standby and you have 10 SHM or more staked, your validator node is setup correctly.
The network will automatically add your validator to be active in the network.
The time to be added as an active validator will vary based on network load and validators in the network.

If you have staked before, you can “Remove Stake”.

CAUTION

(however, you will stop getting testnet SHM rewards).

DANGER

If you see your validator IP address as “0.0.0.0”:

Go into the operator dashboard docker (may be different if you customized install location:

  • Shell
cd ~/.shardeum
./shell.sh

Get your node’s external IP:

  • Shell
curl https://ipinfo.io/ip

The returned IP in the format of nnn.nnn.nnn.nnn is your EXTERNAL_IP.

Set the number above in place of EXTERNAL_IP:

  • Shell
export APP_IP="EXTERNAL_IP"

6. Validator

Version WARNING:

New validator versions will be released over time. It is necessary to keep your validator updated by checking the minimum version required and your current version periodically.

Run:

  • Local
curl localhost:9001/nodeinfo
  • Server
curl <server_ip>:9001/nodeinfo

6.1 Update (Local & Server):

  • Stop and Unstake your SHM tokens from the validator

  • In your terminal, the first exit from the container using

exit
cd ..
  • Run the following curl script
curl -O https://gitlab.com/shardeum/validator/dashboard/-/raw/main/installer.sh && chmod +x installer.sh && ./installer.s
CAUTION

You might manually have to start the GUI afterwards with:

Shell

operator-cli gui start
  • Check your current version from either CLI or GUI and make sure it is the latest version.

6.2 Exit Error Logs:

  • Shell
sudo docker exec shardeum-dashboard cat cli/build/logs/exit-summary.json
  • CLI

Navigate to the .shardeum directory by entering:

cd .shardeum

Execute the shell.sh script by entering:

./shell.sh

With the Validator CLI running, navigate to the cli/build/logs directory by entering:

cd cli/build/logs

View the contents of the exit-summary.json file by entering:

cat exit-summary.json

6.3 CLI And GUI:

Run:

  • Shell
operator-cli version

Update

Run:

  • Shell
operator-cli update

Commands

To see all CLI commands, run:

  • Shell
operator-cli --help

6.4 Uninstall Validator:

Useful if your validator is outdated and you want to clean your last installation.

You can delete the validator folder while in your root directory with:

rm -rf .shardeum

You can also delete docker containers and images that the Shardeum validator was using.

DANGER

These commands will delete all docker images and containers on your computer!

Delete all docker containers:

docker rm -vf $(docker ps -aq)

Delete all docker images:

docker rmi -f $(docker images -aq)

Note: This blog was originally published on Shardeum’s docs page of the website here. Follow the link for the latest updates on how to run a node and how to build on Shardeum!

7. CONCLUSION:

Sure, here is a conclusion for the blog:

In conclusion, Shardeum is a new blockchain platform that offers several advantages over other platforms. It is EVM-based, which means that it is compatible with existing Ethereum applications. It is also linearly scalable, which means that it can handle increasing traffic without sacrificing performance. Additionally, it is secure and fair, thanks to its Proof of Stake (PoS) + Proof of Quorum (PoQ) consensus mechanism.

If you are interested in becoming a validator on Shardeum, the steps involved are relatively straightforward. You will need to install the necessary prerequisites, download and install the validator software, and then start the validator. You can also monitor the validator and connect your wallet to the beta net.

Running your validator on Shardeum is a great way to support the network and earn rewards. It is also a way to learn more about how blockchain technology works. If you are interested in becoming a validator, I encourage you to follow the steps outlined in this blog post.

  • The future of Shardeum is bright. The team is committed to developing the platform and making it even more secure, fair, and scalable. You can find Shardeum Docs here.

  • If you are interested in learning more about Shardeum, you can visit the website or join the community on Discord.

  • I hope this blog post has been informative. If you have any questions, please feel free to leave a comment below.

If you are interested in learning more about Shardeum or getting involved in the project, you can join the community on Telegram channel, follow the Twitter page and join the Discord channel. You can also find more information on the Shardeum Website.

Shardeum Rewards Developers for Their Contributions.

Shardeum, the decentralized application platform, is committed to rewarding developers for their contributions to the project. The company offers a variety of community reward programs.

To learn more about the available community reward programs, please visit the Community Reward Programs page.

Thank you for reading!