DEV Community

Cover image for Deploy and Stake a Shardeum Validator on Spheron in Minutes
SpheronStaff for Spheron

Posted on • Originally published at blog.spheron.network on

Deploy and Stake a Shardeum Validator on Spheron in Minutes

In blockchain technology, solutions addressing the scalability trilemma of scalability, security, and decentralization have remained an ongoing challenge. Shardeum emerges as a groundbreaking EVM-compatible Layer 1 (L1) smart contract platform, revolutionizing this space by leveraging dynamic state sharding. This innovative approach redefines the validation process, distributing transaction verification across shards in the network for enhanced throughput and scalability.

This article delves into the seamless deployment and staking process for a Shardeum validator using Spheron, a user-friendly platform simplifying node configuration and participation in the Shardeum ecosystem. Through step-by-step guidance, users can easily deploy a Shardeum node, contribute to network security, and stake testnet SHM (Shardeum's native token) to actively participate in the testnet.

What is Shardeum?

Shardeum is an EVM-compatible, dynamically state sharded L1 smart contract platform. Expressed simply, sharding breaks the job of validating and confirming transactions into small pieces or shards and spreads them out in the network.

Here is a diagram demonstrating how un-sharded data in a single node can be sharded amongst three nodes:

Image created with LucidChart

Shardeum utilizes parallel processing across shards to achieve high throughput with linear scalability. This is achieved while concurrently enabling low gas fees & and ensuring security with a combined proof-of-stake and proof-of-quorum for consensus, while block-level consensus is not required for finality.

Solving the Scalability Trilemma

The scalability trilemma is a set of trade-offs originally posited by Vitalik Buterin, where blockchains can generally only prioritize two out of 3 of the following characteristics:

  1. Scalability

  2. Security

  3. Decentralization

Vitalik did add the caveat that achieving all three is actually possible but very difficult.

Shardeum solves this problem with the following:

  • Performing consensus and processing at the transaction level instead of the block level.

  • Using dynamic state sharding to achieve scalability through parallelization by distributing workload throughout the network.

  • Reduced overhead for validator nodes because they only need to store state data for their own shard.

  • This allows the network to auto-scale horizontally by adding additional nodes instead of being forced to scale vertically by increasing the computing resources of each node.

  • This allows for fast finality and atomic shard composability.

What is Spheron Network?

Spheron Network is a next-generation PaaS that offers low-cost and seamless access to Web3 infrastructure across multiple chains. It is explicitly designed to serve a broader audience, including startups, developers, and organizations looking to scale their infrastructure.

Spheron Network offers a Compute Marketplace that you can use to set up useful tools like Avail Node quickly. With Spheron, you don't have to worry about the technical stuff, and you can focus on deploying your Avail Node with ease. In addition to compute, web hosting, and storage capabilities, Spheron offers many features to enhance productivity and enable stakeholders to reach new heights while prioritizing privacy, security, and reliability.

Deploy a Shardeum Validator on Spheron

Deploying a Shardeum Validator on Spheron is a straightforward process. Running a Shardeum validator allows you to contribute to network security while also earning testnet SHM rewards. Here's a step-by-step guide to setting it up:

Step 1: If you dont already have a Spheron account then sign up here!

Step 2: After logging into Spheron, navigate to the Compute Dashboard and click New Cluster.

Step 3:

  1. Select Compute and Compute Type as On Demand

  2. Then Select Start from the marketplace app

  3. In the search box, type "Shardeum"

Spheron marketplace has a pre-baked docker image for the Shardeum node ready to go for you!

Step 4: Select your preferred region for deployment. By default, The container will be deployed in the EU-east region for On Demand. Choosing a region closer to your users can improve performance and reduce latency.

Step 5: Then, Spheron will pre-populate the recommended instance plan, Terra Large Ti, and SSD storage, 256GB.

This instance and storage plan were specially selected to meet the Shardeum minimum hardware requirements noted here.

Step 6: The marketplace app will also automatically configure networking, ports, parameters, and commands for you. Check out the Shardeum validator docs to learn more about these settings.

Step 7: Spheron abstracts away the difficulty of configuring a node. You just need to click Deploy! Check out the Spheron docs for more info.

Now, theres just one final step to get our validator working after this initial deployment is complete.

Updating the Config on the Spheron Instance

After your deployment is complete, grab the hostname of your provider. e.g. provider.us-east.spheron.wiki

Step 1: Now, lets get the IP address of that host. In a console, execute the following command:

ping provider.us-east.spheron.wiki
Enter fullscreen mode Exit fullscreen mode

Step 2: Copy the IP address returned from that command:

Step 3: On your instance page, in the Port Policy Info section, grab the external ports that map to internal ports 9001 and 10001 , respectively.

Step 4: Then navigate to the Settings tab on your Compute instance page and click the Update Instance button.

Step 5: After clicking Update Instance, scroll down to the Template Configuration section and paste in the IP address of your provider from the previous step for the parameters:

  • SERVERIP

  • LOCALLANIP

Step 6: Then, update the parameters SHMEXT and SHMINT with the mapped external ports you grabbed from the previous step.

Example:

  • SHMEXT: 30628

  • SHMINT: 30194

Step 7: click Update to restart the instance with the updated config. After your instance starts back up, we will update the default GUI password.

You will know the instance is running when you see the following in the logs:

Starting operator guidone
Enter fullscreen mode Exit fullscreen mode

Update your GUI Password

The marketplace app sets a default password for your instance, but you need to change that ASAP!

Step 1: Navigate to the Shell tab on your Spheron instance:

Step 2: Enter the below command in the box and click Run Command:

operator-cli gui set password YOUR_PASSWORD_HERE
Enter fullscreen mode Exit fullscreen mode

Be sure to select a secure password! Check out the Spheron docs for more info.

Staking your Shardeum Validator to Join the Testnet

Now that we have a Shardeum node deployed, the next step is to stake our validator with SHM so that it can be included in the network during the next rotation.

Acquire SHM in your Wallet for Staking

Follow these steps to set up your wallet for staking:

Step 1: Add the Shardeum network to your wallet, such as Metamask

  1. Network Name: Shardeum Sphinx Validator 1.X

  2. New RPC URL: https://sphinx.shardeum.org/

  3. Chain ID: 8082

  4. Currency symbol: SHM

  5. Block Explorer URL: https://explorer-sphinx.shardeum.org/

Step 2: Claim some testnet SHM from the faucet on the Shardeum Discord. You should receive 15 SHM from the faucet, and you will need 10+ gas fees.

Step 3: Verify on the Discord server, then go to the validator-faucet channel and use the /faucet command to request SHM.

Navigate to your Validator GUI

Spheron is forwarding port 8080, which the GUI runs on. Get the Connection URL, which maps from port 8080 internally, and enter that URL into a browser to access the Shardeum validator dashboard.

Be sure to access the URL appended with https://

e.g. https://provider.us-west.spheron.wiki:32003/

Note: You may get a warning b/c of invalid SSL. The Shardeum docs have a fix for that SSL issue .

Step 1: Then log in with the password you set up earlier.

Step 2: Next, lets start up the Validator. Go to the Maintenance tab, then click the Start Node if its not already running.

Step 3: Next, on that same page, click Connect Wallet. Approve the prompt that pops up in your wallet. After that, click Add Stake. You should have received 15 SHM from the faucet from the step above.

  • Stake Wallet Address [pre-populated with connected wallet]

  • Nominee Public Key [pre-populated by validator]

  • Stake amount (SHM) [In terms of ETH, not WEI]

It is recommended to stake 10 SHM.

Step 4: Enter 10 into the Stake Amount field and click Stake then sign the wallet transaction.

Step 5: You can view the staking transaction on the Sphinx Shardeum block explorer.

Example:

https://explorer-sphinx.shardeum.org/tx/0x5f55856fc3a0476d65037ccca099594fc8e345699fada0d3686e9e32f2a1e686

Joining the network

Your node will initially be in Standby mode but become Active during the next rotation.

Alternatively, if you prefer, you can stake directly via the CLI; check the Shardeum docs for more info. This will require you to expose your private key as a secret ENV var, so be sure your wallet does not contain any mainnet assets.

After completing your stake, you can check the node status with the operator-cli on the Shell tab on your Spheron instance page.

Check the node status with the following command:

operator-cli status
Enter fullscreen mode Exit fullscreen mode

You can also check the status of your GUI with:

operator-cli gui status
Enter fullscreen mode Exit fullscreen mode

Check back on your node after taking a break; eventually, your node will transition from Standby mode to Active!

Congratulations! You are now running a staked Shardeum validator. Spheron will do all the heavy lifting to ensure your node is a resilient and responsive network member!

Check out this Shardeum FAQ for answers to common validator issues.

Conclusion

In conclusion, deploying and staking a Shardeum validator on Spheron is a straightforward process that can be completed in a few simple steps. With Spheron's user-friendly interface and automated configuration, users can easily participate in the Shardeum testnet and contribute to the network's security while earning testnet SHM rewards.

Following the instructions in this article, users can deploy a Shardeum node, update the config, and stake their validator to join the testnet. This combination of advanced technology and user-friendly platforms makes blockchain participation more accessible and rewarding.

Top comments (0)