Updating Node
Subnet nodes can update most of the parameters of their node on-chain.
For updating the keys of the subnet node, see Keys.
Subnet Node Delegate Stake Rate
Users can stake to a subnet node and receive a portion of the node's incentives based on its delegate stake rate.
This rate can be decreased by 1% per 24 hours, and can be increased with no limitations.
Conversion Example
Decimal
Percent
Value
1.0
100%
1000000000000000000
0.5
50%
500000000000000000
0.1
10%
100000000000000000
0.05
5%
50000000000000000
Call update_delegate_stake_rate
to update the delegate stake rate
update_delegate_stake_rate
to update the delegate stake ratepub fn update_delegate_reward_rate(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
new_delegate_reward_rate: u128
)
Peer ID
Update the peer ID of the subnet node.
Call update_peer_id
to update the peer ID.
update_peer_id
to update the peer ID.pub fn update_peer_id(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
new_peer_id: PeerId,
)
Bootnode Peer ID
Update the bootnode peer ID of the subnet node.
Call update_bootnode_peer_id
to update the peer ID.
update_bootnode_peer_id
to update the peer ID.pub fn update_bootnode_peer_id(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
new_bootnode_peer_id: PeerId,
)
Client Peer ID
Update the client peer ID of the subnet node.
Call update_peer_id
to update the peer ID.
update_peer_id
to update the peer ID.pub fn update_client_peer_id(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
new_client_peer_id: PeerId,
)
Bootnode
Update the peer ID of the subnet node.
Call update_bootnode
to update the bootnode.
update_bootnode
to update the bootnode.pub fn update_bootnode(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
new_bootnode: Option<BoundedVec<u8, DefaultMaxVectorLength>>,
)
Unique
Update the subnet node's unique parameter
Call update_unique
to update the unique parameter.
update_unique
to update the unique parameter.pub fn update_unique(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
unique: BoundedVec<u8, DefaultMaxVectorLength>,
)
Non Unique
Update the subnet node's unique parameter
Call update_non_unique
to update the unique parameter.
update_non_unique
to update the unique parameter.pub fn update_non_unique(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
non_unique: BoundedVec<u8, DefaultMaxVectorLength>,
)
Last updated