How to Run a Testnet Gridnode
Table of contents
Introduction
Running a Gridnode on the new network is a streamlined process compared to the legacy chain. Rather than creating a transaction for each Gridnode, users can now delegate tokens to the Gridnode module corresponding to the number of nodes they wish to run. This guide will walk you through setting up one Gridnode on the testnet.
Delegating Tokens to the Gridnode Module
- Navigate to the
Gridnode/Delegate
tab in your wallet. - Enter the number of tokens you wish to delegate. On the testnet, it requires only 50 tokens per Gridnode.
- Confirm the delegation. Once successful, you should see “Node Limit: 1” indicating your capacity to run one Gridnode.
Generating a Gridnode Key
- Proceed to the
Gridnode/Keys
tab. - You should see a notification indicating that you can generate a new key. Click on the
Generate
button. - After entering your password, your Gridnode key will be displayed. Keep this key safe, as it will be needed later.
Setting Up a Docker Container
- Ensure you have Python installed on your system. This script is designed for Debian-based Linux distributions.
- Run the following commands in your server/VPS terminal:
curl -sSL -o install.py https://raw.githubusercontent.com/unigrid-project/hedgehog-docker/master/install.py
python3 install.py
- During the setup, choose option
1
for testnet. - When prompted for your Gridnode key, return to the desktop app, copy your key, and paste it into the setup script prompt.
- Select option
1
for use default Node Address. - Select option
2
to not expose the REST service.
Starting Your Gridnode
- After the installation, it may take 5-10 minutes for your Gridnode to appear in the
Gridnode/List
tab. Note: We’re working on an update to populate this list faster. - Once your Gridnode appears, click
START
and enter your passphrase to activate the Gridnode.
Notes on Undelegating Tokens
- The undelagating period on the testnet is set to 2 minutes for expedited testing (it will be 21 days on the mainnet).
- You’re encouraged to experiment with the Delegate/Undelegate process and setting up new keys for a comprehensive understanding.
Removing the docker container
To remove the docker containers you can use the below commands. Perform this if you would like to run the script again with a different key or just for testing.
docker stop watchtower hedgehog
docker rm watchtower hedgehog
Congratulations! Your Gridnode should now be up and running on the testnet. Feel free to reach out on our Discord community for support or to share your experience.