Join Testnet Subnet (New)

circle-info

NOT LIVE. CODEBASE AND SUBNET DEPLOYMENT COMING SOON.

Requirements

  • Linux Environment

    circle-check
  • Python 3.10 or higher


Install

git clone https://github.com/hypertensor-blockchain/subnet-template.git
cd subnet-template
python -m venv .venv
source .venv/bin/activate
pip install .
touch .env

Copy and paste the .env.example variables to the newly generated .env file. The main variable required to run the subnet node in this documentation is the DEV_RPC variable.


Troubleshooting

Having issues installing?

Error

Solution

Apt

Yum


Copy and paste the following somewhere:

Fill this out as you go along each step as a reference for the later steps.

circle-info

You can use a .txt file in the following, but ensure not to use a .txt file with markdown because it will produce hidden characters; most command interfaces will include them and break CLI commands.

  1. Coldkey

    1. Address: <address>

    2. Private key: <private key>

  2. Hotkey

    1. Address: <address>

    2. Private key: <private key>

  3. Peer ID

    1. Address: <address>

    2. Path of peer ID private key: <path>

  4. Public IP: <public ip>

  5. Port: <port>


For each command, you can run <command> --help for information.


1. Generate Coldkey and Hotkey

Once both keys are generated, it will output the mnemonic phrase, private key, and address. Store the information in a safe place.

Generate Coldkey

You can also use your coldkey generated by your wallet instead of the CLI.

Save the coldkey private key in a safe space to be used later when registering the node on-chain.

Generate Hotkey

Save the hotkey private key in a safe space to be used later when starting the subnet node.


2. Generate Private Keys

Generate 3 private keys for your peer IDs: the main peer ID, the bootnode peer ID, and the client peer ID. This will automatically generate 3 private key files that you will see in the root directory.

Save all 3 peer IDs in the logs in a safe place for later steps.

circle-info

If running multiple nodes on a single server, ensure all paths are unique.


3. Fund Keys

Visit the Discord faucet and fund both the coldkey and hotkey.

circle-info

It is suggested to fund the coldkey from the faucet and send 1 TENSOR to the hotkey from the coldkey via the wallet on the explorer. The hotkey is used for consensus, and while running consensus does not have block fees, all wallets are required to have a minimum of 0.0000000000000005 TENSOR to be a live account. By sending the hotkey 1 TENSOR, you will accomplish this requirement.

The coldkey will need at least 100 TENSOR to stake on registration, plus a dynamic burn fee. The faucet will give 500 TENSOR for each request and should be sufficient. If not, contact us on Discord.

  1. Use the faucet to fund the coldkey

  2. Send 1 TENSOR from the coldkey to the hotkey, or use the faucet (faucet may have a cooldown, if so, use the wallet)


4. Register Subnet Node

Register the subnet node on-chain and retrieve your subnet node ID. Put the subnet node ID somewhere to be used for later steps.

Run register_node --help or visit subnet/cli/hypertensor/node/register.py to view the full list of available arguments.

Before running:

  • Know what your coldkey and hotkey are

  • Know what subnet ID you're registering to

  • Know your peer IDs

  • Have the coldkey private key ready


5. Run Node

We suggest using a terminal multiplexer or similar of your choosing, such as tmuxarrow-up-right or pm2arrow-up-right.

Before running:

  • Know public IP (run curl ifconfig.me)

  • Ensure you have no firewalls blocking connections

  • Choose and open a port

    • Replace 31330 with the port of your choosing

  • Have your subnet node ID (Logged during registration in the previous step)

  • Have your private key generated in the Generate Private Keys step

  • Ensure your hotkey is funded with at least 0.0000000000000005 TENSOR

circle-info

If connecting to a bootnode fails, there is a 20 second cooldown. For each failed attempt, you cannot connect to the subnet for at least 20 seconds.

Once run, you will see many logs, including:

How to resolve network issues:

  • Ensure that your Internet provider gives you a public IP address

  • Choose a specific port for the subnet template server, for example, 31330

  • If you have a firewall or NAT, configure it to allow incoming connections to the chosen TCP port

  • Ensure your node is staked with the correct peer ID on-chain.

Once running:

Keep running forever.


Run Multiple Nodes

Test the scalability of the Subnet Template by running multiple nodes from a single server.

Repeat steps 1-5 for each node, using a separate command prompt and port for each.

Last updated