Register

A subnet node registers itself and transfers at least the minimum required balance as a stake. This registration is used as the subnets' proof-of-stake.

Call register_subnet_node to register

pub fn register_subnet_node(
    origin: OriginFor<T>,
    subnet_id: u32,
    hotkey: T::AccountId,
    peer_info: PeerInfo,
    bootnode_peer_info: Option<PeerInfo>,
    client_peer_info: Option<PeerInfo>,
    delegate_reward_rate: u128,
    stake_to_be_added: u128,
    unique: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
    non_unique: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
    delegate_account: Option<DelegateAccount<T::AccountId>>,
    max_burn_amount: u128,
)

Registration Inputs

subnet_id

The subnet ID to register the node to.

hotkey

The hotkey of the node. This key is used to run non-fund-based extrinsics, such as consensus (validating and attesting).

circle-info
  1. Hotkeys are network-unique. Meaning, no one hotkey can be used twice.

    • This enhances overall network security. In the event a subnet/node gets hacked, it can be accurately identified if the hotkey was used in multiple subnets.

  2. Hotkeys can also never match the coldkey.

peer_info

The peer ID and optional multiaddress of the node. This is used for signature validation within the subnet, proof-of-stake, and more.

bootnode_peer_info (Optional)

The bootnode/bootstrap peer ID and optional multiaddress of the node. This is used for signature validation within the subnet, proof-of-stake, and more.

client_peer_info (Optional)

The client peer ID and optional multiaddress of the node. This is used for signature validation within the subnet, proof-of-stake, and more.

delegate_reward_rate

The rate of rewards given to users who stake to the node.

stake_to_be_added

The amount of stake to be added. The blockchain has a minimum required of 100 TENSOR, but subnets may require more (check subnet documentation for required proof-of-stake balance).

unique

An arbitrary value unique to the subnet.

non_unique

An arbitrary value.

delegate_account (Optional)

The delegate account being an account_id and rate. A fraction of the emissions, based on the rate, for this node will be allocated to this account.

The rate is based on 1e18 == 1.0 == 100%.

For example, if the rate is 50%, half of the emissions associated with this node will be allocated to the management of the delegate account.

max_burn_amount

The maximum amount the registering node is willing to burn to join the subnet.


Once registered, the node is given the Registered classification, put into a queue, and given a start epoch.

Queue

The length of the queue is based on epochs and is unique to each subnet.

Start Epoch

The start epoch is the epoch a node must activate itself on; otherwise, it can no longer activate.

Note

A subnet can utilize grace epochs (ActivationGraceEpochs) that allow nodes to register on the start epoch, plus the grace epochs.

Last updated