Bittensor Subnet 123: Identify It from Live Chain State

Learn how to determine what Bittensor subnet 123 currently represents by querying its on-chain metadata with a Node.js RPC client.

Bittensor subnet 123 is a subnet identified by the network UID (netuid) 123 on the Bittensor network—not a separate blockchain. Its current name, owner, and configuration should be read from live chain state because subnet metadata and incentives can change. This guide shows how to inspect that state through RPC.

The short answer

A Bittensor subnet is an application-specific incentive environment within the Bittensor network. Netuid 123 is the identifier for one of those environments. The number alone does not reliably tell you its current purpose, and a search result or old description may become stale.

Use the Bittensor network reference for network context, then query the chain's current metadata to identify subnet 123. RPC access lets you read current state; it does not by itself provide a historical, indexed view of subnet activity.

  • Treat 123 as a netuid, not as a chain ID or an RPC network.
  • Read the subnet identity and owner from the runtime when those storage items are exposed by the connected node.
  • For historical registrations, emissions, transfers, or event analysis, use an indexer and query layer rather than a single live RPC read.

Query subnet 123 with Node.js

The following example uses the Polkadot.js API to discover the Subtensor query namespace and read commonly available subnet metadata. Set BITTENSOR_RPC_URL to an RPC or WebSocket endpoint you are authorized to use; the script deliberately does not assume a provider-specific endpoint.

Install the dependency with npm install @polkadot/api, save the script as inspect-subnet.mjs, and run it with BITTENSOR_RPC_URL=wss://your-endpoint.example node inspect-subnet.mjs. Replace the placeholder with a real endpoint before running it.

  • The script uses netuid 123 as the storage key.
  • It reports the runtime-derived values rather than asserting a fixed subnet name.
  • If a particular metadata item is unavailable in the connected runtime, that item is reported as unavailable instead of being fabricated.
JavaScript · Node.js
import { ApiPromise, WsProvider } from '@polkadot/api';

const endpoint = process.env.BITTENSOR_RPC_URL;
const netuid = 123;

if (!endpoint) {
  console.error('Missing BITTENSOR_RPC_URL. Provide an authorized Bittensor WebSocket RPC endpoint.');
  process.exit(1);
}

let api;
try {
  api = await ApiPromise.create({ provider: new WsProvider(endpoint) });

  const namespaceName = Object.keys(api.query).find(
    (name) => name.toLowerCase() === 'subtensorModule'.toLowerCase()
  );
  if (!namespaceName) {
    throw new Error('The connected runtime does not expose a Subtensor query namespace.');
  }

  const namespace = api.query[namespaceName];
  const candidates = ['subnetIdentity', 'subnetOwner', 'tempo'];
  const result = { netuid, metadata: {} };

  for (const candidate of candidates) {
    const methodName = Object.keys(namespace).find(
      (name) => name.toLowerCase() === candidate.toLowerCase()
    );
    if (!methodName || typeof namespace[methodName] !== 'function') {
      result.metadata[candidate] = { available: false };
      continue;
    }

    try {
      const value = await namespace[methodName](netuid);
      result.metadata[candidate] = {
        available: true,
        value: value.toHuman ? value.toHuman() : value.toJSON()
      };
    } catch (error) {
      result.metadata[candidate] = {
        available: false,
        error: error instanceof Error ? error.message : String(error)
      };
    }
  }

  console.log(JSON.stringify(result, null, 2));
} catch (error) {
  console.error(`Bittensor RPC query failed: ${error instanceof Error ? error.message : String(error)}`);
  process.exitCode = 1;
} finally {
  if (api) await api.disconnect();
}

Expected result: a JSON object containing netuid 123 and the metadata fields that the connected Bittensor runtime exposes. Values are read at execution time, so the identity or owner may differ from older documentation.

A connection error usually means the endpoint is missing, unreachable, incompatible with the client, or rejecting the request. A missing metadata field can also indicate a runtime-version difference; inspect the node's current metadata before hard-coding storage names.

How to read the result

If subnetIdentity is present, use it as the chain's current identity record for netuid 123. If subnetOwner is present, it identifies the on-chain owner representation returned by that runtime. tempo is a scheduling parameter, not a human-readable explanation of the subnet's purpose.

Do not infer the subnet's business function from the number, owner, or tempo alone. To explain what miners and validators are rewarded for, combine the live metadata with the subnet's current implementation, registration information, and public documentation. Verify the block or runtime version when reproducibility matters.

  • Store the returned block context in production tools if you need an auditable answer; this short example focuses on reading current state.
  • Handle absent fields as a schema or runtime compatibility issue, not as proof that the subnet has no identity.
  • Avoid caching a descriptive answer indefinitely because subnet configuration can change.

RPC is not indexing

This task is an RPC read: the node answers questions about the latest state exposed by its runtime. It is suitable for checking the current metadata of subnet 123, but it does not automatically search all historical blocks or produce analytics.

Use an indexing and query workflow when you need questions such as when subnet 123 was created, how its ownership changed, or how emissions and events evolved over time. The OnFinality Learn library is a useful next step for indexing concepts, while the RPC Assistant can help formulate provider-specific RPC requests without assuming an endpoint here.

  • Measure endpoint latency or error rates in your own environment if those operational characteristics matter; they depend on the endpoint, network conditions, and request pattern.
  • Keep RPC reads and indexed queries as separate interfaces in your application so a live-state failure does not look like an empty historical dataset.