subtensor
subtensor copied to clipboard
Subnet Identity
Description
Currently, the subnet registration process doesn't include identity information, and the SubnetInfo
struct lacks fields for storing this data. We need to enhance the subnet registration process to include identity information and extend the SubnetInfo
struct to accommodate these new fields.
This enhancement will allow subnet owners to provide more detailed information about their subnets, making it easier for users and administrators to identify and interact with different subnets in the Bittensor network.
Acceptance Criteria
-
Extend the
SubnetInfo
struct inpallets/subtensor/src/rpc_info/subnet_info.rs
to include the following new fields:-
subnet_name: Option<Vec<u8>>
-
github_repo: Option<Vec<u8>>
-
subnet_contact: Option<Vec<u8>>
-
-
Modify the subnet registration process to accept and store the new identity information.
-
Update the
get_subnet_info
function to retrieve and return the new identity fields. -
Ensure that the subnet deregistration process clears the identity information.
-
Add appropriate error handling for cases where required identity information is missing during registration.
Tasks
- [ ] Update the
SubnetInfo
struct inpallets/subtensor/src/rpc_info/subnet_info.rs
. - [ ] Modify the
register_subnet
function to accept and store identity information. - [ ] Update the
get_subnet_info
function to include the new identity fields in its return value. - [ ] Modify the
deregister_subnet
function to clear identity information. - [ ] Add new error types for missing required identity information.
- [ ] Update any relevant tests to cover the new functionality.
- [ ] Update documentation to reflect the changes in subnet registration and information retrieval.
Additional Considerations
- Consider making
subnet_name
andgithub_repo
required fields, while keepingsubnet_contact
optional. - Evaluate the impact of these changes on existing subnets and consider a migration strategy if necessary.
- Consider adding a function to update subnet identity information separately from the registration process.