-
Notifications
You must be signed in to change notification settings - Fork 138
Home
Welcome to the Bittensor Subnetwork Management guide. This document provides an in-depth understanding of how users can create, manage, and maintain subnetworks on the Bittensor blockchain. Through this, users will gain insights into the process of creating a subnetwork by calling the create_subnetwork
extrinsic through the Bittensor Explorer.
In the Bittensor blockchain, users can create a subnetwork by calling the user_add_network
function. This function allows a user to register a new subnetwork with specific hyperparameters. In the event the total number of subnetworks reaches a predefined limit, the function will prune (remove) the subnetwork with the lowest emission score.
The emission score of a subnetwork is determined by the stake of validators in that subnetwork. The more validators staking on a subnetwork, the higher its emission score.
-
User Call:
- A user initiates the process by calling the
user_add_network
function. - The user must provide details such as the network modality, the immunity period, and a flag indicating if registration is allowed on the network.
- A user initiates the process by calling the
-
Validation:
- The system checks if the caller is a valid signed user.
- It ensures the provided modality is valid.
-
UID Allocation:
- Each subnetwork is assigned a unique identifier (UID).
- If the total number of networks is less than the limit, a new UID is generated.
- If the limit is reached, the system identifies the subnetwork with the lowest emission score for pruning, and its UID is reused.
-
Hyperparameters Setting:
- Configurable hyperparameters for the network are set. These include the immunity period, network registration permission, max allowed UIDs, and max allowed validators.
-
Network Creation:
- The system initializes the new subnetwork and sets various parameters.
- An event
NetworkAdded
is emitted to notify of the successful creation of the network.
-
Emission Calculation:
- Emissions for each subnet are calculated based on the stake of validators in the subnet.
- The process ensures that each subnet receives a proportional emission based on its total stake.
-
Pruning:
- If the total number of networks exceeds the limit, the
get_subnet_to_prune
function identifies the subnetwork with the lowest emission score that isn't in its immunity period. If all subnetworks are in their immunity period, the function simply picks the one with the lowest emission score. - The identified subnet is then removed to make space for the new subnet.
- If the total number of networks exceeds the limit, the
To create a subnetwork via the Bittensor Explorer:
- Navigate to the Bittensor Explorer platform.
- Look for the
create_subnetwork
extrinsic option. - Provide the necessary details: modality, immunity period, and registration permission.
- Confirm and submit the transaction.
- Once processed, you will receive a notification of the new network's creation.
-
Cost: Initiating the
user_add_network
function typically requires users to burn TAO tokens as a part of the transaction cost. -
Emission Score: The likelihood of a subnetwork being pruned depends on its emission score, which is derived from the number of validators staking on it. Subnetworks with low stakes are more likely to be pruned.
-
Immunity Period: Newly created subnetworks have an immunity period during which they cannot be pruned. This period is configurable and is set during the creation process.
-
Validator Staking: Encouraging validators to stake on your subnetwork increases its emission score and decreases the chances of it being pruned.
-
Hyperparameters: These are configurable settings for the network. They play a crucial role in the operation and maintenance of the subnetwork.
-
Updates & Monitoring: Regularly monitoring your subnetwork's performance, stake, and emission score through the Bittensor Explorer can provide insights and help in its maintenance.
The Bittensor blockchain offers a dynamic system for managing subnetworks, allowing for expansion while ensuring that only the most supported networks thrive. By understanding the process and regularly monitoring their subnetwork's performance, users can ensure their subnetworks remain active and avoid pruning.