set_subnet_identity

Call Re-added v195 → v219, v233 → v277, v290 → current #78

Sets identity metadata for a subnet .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: subnet ownersdevelopers

The Big Picture

Subnets are identified by numbers (netuid 1, 2, 3...). Without identity, users see just 'Subnet 47' with no context. set_subnet_identity adds the story - what the subnet does, who runs it, how to participate. This is essential for attracting participants to your subnet.

Why This Matters

Miners and validators choose subnets based on opportunity and interest. A subnet with clear identity ('TextGen - High-quality text generation') attracts more than 'Subnet 19'. Identity is your subnet's storefront.

Example Scenario

You launched an image generation subnet (netuid 23). Call set_subnet_identity(netuid=23, name='ImageNet', description='Decentralized image generation via Stable Diffusion', url='https://imagenet-subnet.io', github='github.com/imagenet-sn'). Now explorers show your branding, and miners know what they're joining.

Common Questions

Only the owner can set subnet identity?
Yes, only the coldkey that registered the subnet can modify its identity. This prevents impersonation or vandalism.
What should I include in the description?
Purpose, validation mechanism, requirements for miners, and expected returns. Help potential participants understand what they're getting into.

Use Cases

  • Brand your subnet with name and purpose
  • Attract miners and validators with clear description
  • Provide documentation links and contact info
  • Differentiate from other subnets in explorers

From Chain Metadata

- Set the identity information for a subnet.

Input Parameters

#NameTypeDescription
0
netuid
u16 Subnet/network identifier (0-65535)
1
subnet_name
Vec<u8> Vecsubnet_name (Vec<u8>)
2
github_repo
Vec<u8> Vecgithub_repo (Vec<u8>)
3
subnet_contact
Vec<u8> Vecsubnet_contact (Vec<u8>)
4
subnet_url
Vec<u8> Vecsubnet_url (Vec<u8>)
5
discord
Vec<u8> Vecdiscord (Vec<u8>)
6
description
Vec<u8> Vecdescription (Vec<u8>)
7
logo_url
Vec<u8> Veclogo_url (Vec<u8>)
8
additional
Vec<u8> Vecadditional (Vec<u8>)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is subnet owner
  • Valid identity data

Effects

Events Emitted

Storage Modified

Postconditions

  • SubnetIdentities updated

Side Effects

  • Subnet shows name/description in UIs

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build set_subnet_identity call
const netuid = 1;
const subnet_name = 0;
const github_repo = 0;
const subnet_contact = 0;
const subnet_url = 0;
const discord = 0;
const description = 0;
const logo_url = 0;
const additional = 0;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("set_subnet_identity")](
  netuid,
  subnet_name,
  github_repo,
  subnet_contact,
  subnet_url,
  discord,
  description,
  logo_url,
  additional
);

Version History

v195 block 3,791,350 4 args
v233 block 4,920,350 8 args
v290 block 5,947,548 9 args Current

Runtime Info

View Source
Pallet Index
7
Call Index
78
First Version
v195
Current Version
v393