Getting Started
Introduction
The following is how to get started running a subnet node within the DSN (decentralized subnet):
If you have any troubles, see troubleshooting.
Install Subnet:
Run
git clone https://github.com/hypertensor-blockchain/dsn.git
If you already have the repository cloned:
cd into the directory and run
git pull
Run
cd dsn
Run
python -m venv .venv
(to create your virtual environment if not already created, optional)Run
source .venv/bin/activate
(to activate your virtual environment, optional)Create an
.env
file in the root directory and add your mnemonic phrase to thePHRASE
variable. If you don't have an account, create an account, or use one of the one hundred test wallets generated mentioned below.The example is shown in
.env.example
in the root directory.Or fill in all example variables below.
Note: You can use
PHRASE="//{n}"
instead of making a wallet. 100 test accounts with plenty of balance have been generated for those wanting to operate subnet validator nodes. Some of these test account phrases may be taken, choose a random number between 0-100 and attempt to register, if it's taken, choose another one until you can register with it.Example:
PHRASE="//1"
PHRASE="//2"
PHRASE="//98"
PHRASE="//99"
Ensure
INITIAL_PEERS
(bootstrap nodes) within thesrc/subnet/constants.py
file are currently active peers if needed.If the bootstrap nodes are not allowing you to connect, ask the subnet owners, developers, or other subnet nodes for the bootstrap nodes.
Update
src/subnet/health/config.py
MODEL
to the model you're hosting if needed.Install the repository with
python -m pip install .
(including the.
)
Start Your Subnet Validator Node:
First, create an account.
Once you have everything downloaded, there are only 4 steps to get the subnet validator node started.
Generate your Ed25519 private key to get your deterministic Peer ID.
This will be used within the subnet's PoS mechanism.
Register your subnet node on-chain with your Peer ID and stake balance.
Start your subnet validator node.
Run your subnet node within the subnet.
This requires a proof-of-stake that the registration handles.
Activate your subnet node on-chain once your node has performed all of its required computations, such as loading the model.
Start Bootstrap Node (Optional)
From a separate server of the subnet validator node, start your bootstrap node.
*The Register and Activate logic can be combined into one call using the Add command. The above flow is the suggested method.
Safeguard
A subnet node can temporarily "deactivate" itself in case of server or subnet failures to avoid penalties or slashings.
Exiting
To exit a subnet on-chain:
Stop your subnet server
Last updated