Subnet Owner

The subnet owner is the registrar of the subnet, which entitles them to 24% of the total subnet emissions. The owner has control over many aspects of their subnet and is responsible for maintaining the subnet.

The owner has the following capabilities:

Activate

Activate the subnet in the enactment phase.

Call activate_subnet with the subnet ID from the coldkey of the subnet owner.

Extrinsic

pub fn activate_subnet(
    origin: OriginFor<T>, 
    subnet_id: u32
)

Pausing

The subnet can temporarily be paused. This can be particularly useful in scenarios such as updates or bug fixes.

The subnet must be reactivated by the MaxPauseEpochs, otherwise anyone will have the ability to deactivate the subnet.

Call pause_subnet with the subnet ID.

Extrinsic

pub fn owner_pause_subnet(
    origin: OriginFor<T>, 
    subnet_id: u32
)

Decommissioning Subnet

The subnet can be removed from the blockchain.

Call deactivate_subnet with the subnet ID.

Extrinsic

pub fn owner_deactivate_subnet(
    origin: OriginFor<T>, 
    subnet_id: u32
)

Update Name

Update the unique name of the subnet.

Extrinsic

pub fn owner_update_name(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: Vec<u8>
)

Update Repo

Update the repo of the subnet. This is where the open-sourced code lives.

Extrinsic

pub fn owner_update_repo(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: Vec<u8>
)

Update Description

Update the description of the subnet.

Extrinsic

pub fn owner_update_description(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: Vec<u8>
)

Update Misc

Update miscellaneous information on the subnet.

Extrinsic

pub fn owner_update_misc(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: Vec<u8>
)

Update Churn Limit

The churn limit is how many nodes can activate per epoch from the registration queue.

When a subnet node registers, it is given a start epoch at which it can activate. The churn limit limits how many are allowed to activate on any given epoch, without taking the grace epochs into account, which can extend the activation span.

For example, if the churn limit is 4 epochs and the queue registration epochs are 10 epochs, with 4 nodes registering on epoch 1,000, these 4 nodes will be appointed a start epoch of 1,010 (registration epoch + queue registration epochs). These nodes can then activate themselves on epoch 1,010.

If 4 more nodes register on the same epoch of 1,000, those four nodes will be appointed a start epoch of 1,011 because the churn limit is 4 per epoch.

Call owner_update_churn_limit with the subnet ID and the new churn limit.

The queue epochs and churn limit are used together to calculate each subnet node's start epoch (the epoch they can activate) when they register.

Extrinsic

pub fn owner_update_churn_limit(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Update Min Stake

The min stake is the minimum balance for a subnet node to register.

Call owner_update_min_stakewith the subnet ID and new value.

Extrinsic

pub fn owner_update_min_stakewith(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u128
)

Update Registration Queue Epochs

The registration queue epochs are the number of epochs a subnet node must be in the registration queue, which is the queue before activation (see subnet node classifications), before it can activate itself.

Call owner_update_queue_classification_epochs with the subnet ID and new value.

Extrinsic

pub fn owner_update_registration_classification_epochs(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Update Activation Grace Epochs

The activation grace epochs are the epochs in which an owner allows a node to activate itself from its designated start epoch. For example, if a node registers and its start epoch is on epoch 1,000 and the subnet has a 10-epoch grace period, the subnet can register between epoch 1,000 and 1,010.

Call update_activation_grace_epochs with the subnet ID and new value.

Extrinsic

pub fn owner_update_activation_grace_epochs(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Update Queue Classification Epochs

The queue classification epochs are the number of epochs a subnet node must be in the queue classification before being upgraded to Included (see subnet node classifications).

Call owner_update_queue_classification_epochs with the subnet ID and new value.

Extrinsic

pub fn owner_update_queue_classification_epochs(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Update Included Classification Epochs

The included classification epochs are the number of epochs a subnet node must be in the included classification, which is the period before being upgraded to Validator (see subnet node classifications).

Call owner_update_included_classification_epochs with the subnet ID and new value.

Extrinsic

pub fn owner_update_included_classification_epochs(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Update Max Node Penalties

The max node penalties are the maximum number of penalties a subnet validator node can own before being removed from the subnet.

Call owner_update_max_node_penalties with the subnet ID and new value.

Extrinsic

pub fn owner_max_node_penalties(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: u32
)

Add Initial Coldkeys

The initial coldkeys submitted during registration can be updated while the subnet is still in the registration phase.

Call owner_add_initial_coldkey with the subnet ID you own, and a BTreeSet of coldkeys. This will mutate the SubnetRegistrationInitialColdkeys to include the new coldkeys.

Extrinsic

pub fn owner_add_initial_coldkeys(
    origin: OriginFor<T>, 
    subnet_id: u32,
    coldkeys: BTreeSet<T::AccountId>
)

Remove Initial Coldkeys

Initial coldkeys can be removed.

Call remove_initial_coldkeys with the subnet ID you own and a BTreeSet of coldkeys.

  • This will mutate the SubnetRegistrationInitialColdkeys to remove the coldkeys passed through to the function.

If you remove a coldkey and the subnet node is already registered, the owner must separately remove the node.

Extrinsic

pub fn owner_remove_initial_coldkeys(
    origin: OriginFor<T>, 
    subnet_id: u32,
    coldkeys: BTreeSet<T::AccountId>
)

Transfer Ownership

The owner can transfer ownership in a two-step process.

Transfer

Call transfer_subnet_ownership with the subnet ID and the account of the new subnet owner.

Extrinsic

pub fn transfer_subnet_ownership(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    new_owner: T::AccountId,
)

Accept

Call accept_subnet_ownership with the subnet ID from the coldkey.

Extrinsic

pub fn accept_subnet_ownership(
    origin: OriginFor<T>, 
    subnet_id: u32, 
)

Undo Transfer

An ownership transfer can be undone before the new owner accepts the transfer.

Call transfer_subnet_ownership with the zero address as the new owner.

Extrinsic

pub fn transfer_subnet_ownership(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    new_owner: T::AccountId, // Zero Address
)

Remove Subnet Node

Subnet nodes can be removed.

Call owner_remove_subnet_node with the subnet ID.

Extrinsic

pub fn owner_remove_subnet_node(
    origin: OriginFor<T>, 
    subnet_id: u32,
    subnet_node_id: u32
)

Update Subnet Node Removal System

Update the subnets node removal system. See Handling Max Nodes.

Call owner_update_node_removal_system with the subnet ID.

Extrinsic

pub fn owner_update_node_removal_system(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: NodeRemovalSystem
)

Update Key Type

Update the subnets key type.

Call owner_update_key_type with the subnet ID.

Extrinsic

pub fn owner_update_key_type(
    origin: OriginFor<T>, 
    subnet_id: u32,
    value: KeyType
)

Last updated