set_subnet_identity
Call v195 → v219, v233 → v277, v290 → current #78Sets identity metadata for a subnet .
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
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.
Migration Notes
added field subnet_url (Vec<u8>); added field discord (Vec<u8>); added field description (Vec<u8>); added field additional (Vec<u8>)
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
added field logo_url (Vec<u8>)
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | netuid | u16 NetUid | netuid: Subnet ID (u16, 0-65535) |
| 1 | subnet_name | Vec<u8> Vec | subnet_name (Vec<u8>) |
| 2 | github_repo | Vec<u8> Vec | github_repo (Vec<u8>) |
| 3 | subnet_contact | Vec<u8> Vec | subnet_contact (Vec<u8>) |
| 4 | subnet_url | Vec<u8> Vec | subnet_url (Vec<u8>) |
| 5 | discord | Vec<u8> Vec | discord (Vec<u8>) |
| 6 | description | Vec<u8> Vec | description (Vec<u8>) |
| 7 | logo_url | Vec<u8> Vec | logo_url (Vec<u8>) |
| 8 | additional | Vec<u8> Vec | additional (Vec<u8>) |
Permissions
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 { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Build set_subnet_identity call (typed, named args)
const netuid = 1;
const subnet_name = Binary.fromOpaque(new Uint8Array(0));
const github_repo = Binary.fromOpaque(new Uint8Array(0));
const subnet_contact = Binary.fromOpaque(new Uint8Array(0));
const subnet_url = Binary.fromOpaque(new Uint8Array(0));
const discord = Binary.fromOpaque(new Uint8Array(0));
const description = Binary.fromOpaque(new Uint8Array(0));
const logo_url = Binary.fromOpaque(new Uint8Array(0));
const additional = Binary.fromOpaque(new Uint8Array(0));
const tx = api.tx.SubtensorModule.set_subnet_identity({
netuid,
subnet_name,
github_repo,
subnet_contact,
subnet_url,
discord,
description,
logo_url,
additional,
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 78
- First Version
- v195
- Current Version
- v411