NetworkAdded

Event v101 → current #0

Emitted when a new subnet is created on Bittensor.

View events on chain
Useful for: subnet ownersdevelopersanalyticsvalidatorsminers

The Big Picture

Subnets are the core of Bittensor - each one is a specialized AI network with its own incentive mechanism. Creating a subnet lets you build a decentralized AI application where miners compete to provide value and validators rank their work. This event marks the birth of a new subnet.

Why This Matters

Launching a subnet is a significant commitment - you're creating a new AI marketplace. This event confirms your subnet is live and ready for miners and validators to join. As subnet owner, you'll earn a portion of all emissions on your subnet.

Example Scenario

You've built an image generation validation mechanism. You call register_network, locking 1000 TAO as collateral. NetworkAdded fires with netuid 47 - your subnet is live. Now you can configure hyperparameters and invite miners to join.

Common Questions

How much does it cost to create a subnet?
The cost varies based on demand - check NetworkMinLockCost. It's locked, not burned, so you get it back if you dissolve the subnet (after immunity period).
What happens after my subnet is created?
Configure hyperparameters (tempo, weights limit, etc.), set up your validation mechanism, then promote your subnet to attract miners and validators.

Use Cases

  • Confirm your subnet creation succeeded
  • Discover new subnets to participate in
  • Track subnet ecosystem growth
  • Build subnet directory/explorer

How to Use This Event

  • Subscribe to track new subnet launches
  • Index to build subnet discovery tools
  • Alert when competitors launch subnets
Part of: Subnet Management

Triggers

Preconditions

  • Network registration fee paid (locked TAO)
  • Total subnet count below maximum
  • Valid network parameters provided

May fail with

NetworkAlreadyExists (removed)NotEnoughBalanceToStakeTooManySubnets (removed)

Effects

Event Data

#NameTypeDescription
0
arg0
→ netuid
u16 Unique identifier for the new subnet (0-65535)
1
arg1
→ modality
u16 Network modality type (legacy field, typically 0)

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 });

// Subscribe to NetworkAdded events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "NetworkAdded"
    )
    .forEach(({ event }) => {
      console.log("NetworkAdded:", event.data.toHuman());
    });
});

Runtime Info

View Source
Pallet Index
7
Event Index
0
First Version
v101
Current Version
v393