Getting Started
Last updated
Last updated
The following is how to start running a subnet node within the DSN (decentralized subnet).
If you have any troubles, see .
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 the PHRASE
variable. If you don't have 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 the src/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 .
)
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.
From a separate server of the subnet validator node, start your bootstrap node.
To exit a subnet on-chain:
Stop your subnet server
First, .
*
*
(Optional)
*The Register and Activate logic can be combined into one call using the command. The above flow is the suggested method.
Having issues? Review the or contact us in Telegram or Discord with your Peer ID and Account ID
A subnet node can temporarily "" itself in case of server or subnet failures to avoid penalties or slashings.