# register-subnet (/docs/tx/register-subnet)

Registers a brand-new subnet with the signing coldkey as its owner and the
wallet's hotkey as the subnet-owner hotkey. The network registration cost —
potentially thousands of TAO — is taken from the coldkey; it doubles after
each new subnet registration and decays linearly back over the lock
reduction interval, and is only known at execution time, so a configured
spend cap blocks this call until raised. The full cost becomes the new
subnet's initial TAO pool reserve — a sunk cost, not a refundable deposit.
Network registrations are rate-limited per coldkey. If capacity is
available, the subnet is created in the registration block. If the chain
is at its subnet limit, registration first queues while the non-immune
subnet with the lowest EMA price is dissolved across idle block time; SDK
execution waits for the matching `NetworkAdded` event before returning
by default. The result's `registration_mode` distinguishes the two paths
and `netuid` is the subnet actually assigned.
The new subnet starts inactive: call `start_call` once the chain's
activation delay has passed to activate it; the subnet's share of TAO
emission additionally stays off until root enables the subnet's
emission-enabled flag. This is a major, expensive commitment — check the
current cost before sending.

| Signer    | Origin                                 | Pallet          | Wraps                                                                                              |
| --------- | -------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------- |
| `coldkey` | signed account (pallet role may apply) | SubtensorModule | [`SubtensorModule.register_network`](/code/pallets/subtensor/src/macros/dispatches.rs#L1002-L1006) |

## Parameters [#parameters]

| Parameter     | Type   | Required | Description                                                              |
| ------------- | ------ | -------- | ------------------------------------------------------------------------ |
| `hotkey_ss58` | string | no       | Subnet-owner hotkey for the new subnet; defaults to the wallet's hotkey. |

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx register-subnet --dry-run
btcli tx register-subnet -w my_coldkey
```

## Python [#python]

```python
import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.RegisterSubnet()

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)
```

(`bt.Subtensor` is also the async client — `async with bt.Subtensor() as client:`
— see [The client](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("register_subnet", {...}, wallet)
```

## On-chain implementation [#on-chain-implementation]

`SubtensorModule.register_network` — [`pallets/subtensor/src/macros/dispatches.rs#L1004`](/code/pallets/subtensor/src/macros/dispatches.rs#L1002-L1006):

```rust
#[pallet::call_index(59)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::register_network())]
pub fn register_network(origin: OriginFor<T>, hotkey: T::AccountId) -> DispatchResult {
    Self::do_register_network(origin, &hotkey, 1, None)
}
```

Delegates to [`do_register_network`](/code/pallets/subtensor/src/subnets/subnet.rs#L142).

Every file is browsable under [/code](/code) exactly as built into the runtime, or as plain text under `/code/raw/<path>` (index: [`/code/index.json`](/code/index.json)).
