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
register_subnet_node to registerpub fn register_subnet_node(
origin: OriginFor<T>,
subnet_id: u32,
hotkey: T::AccountId,
peer_id: PeerId,
bootnode_peer_id: PeerId,
bootnode: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
client_peer_id: PeerId,
delegate_reward_rate: u128,
stake_to_be_added: u128,
a: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
b: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
c: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
)Registration Inputs
subnet_id
subnet_idThe subnet ID to register the node to.
hotkey
hotkeyThe hotkey of the node. This key is used to run non-fund-based extrinsics, such as consensus (validating and attesting).
peer_id
peer_idThe peer ID of the node. This is used for signature validation within the subnet, proof-of-stake, and more.
bootnode_peer_id
bootnode_peer_idThe bootnode peer ID is the bootnode peer ID of the subnet node, used for the same signature validation within the subnet. This is used for nodes that are public-facing bootnodes.
bootnode (Optional)
bootnode (Optional)The bootnode multiaddress for connecting to the DHT. This is used for nodes that are public-facing bootnodes.
client_peer_id
client_peer_idThe client peer ID is the bootnode of the subnet node, used for signature validation within the subnet, but only expected to be a client-side peer. This is useful for hosting frontends for subnets that require outside world functionality, such as a chatbot.
delegate_reward_rate
delegate_reward_rateThe rate of rewards given to users who stake to the node.
stake_to_be_added
stake_to_be_addedThe amount of stake to be added. The blockchains has a minimum required of 100 TENSOR, but subnets may require more (check subnet documentation for required proof-of-stake balance).
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