You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We aim to fully integrate the functionality for delegates to set and adjust their take values per subnet, including the ability to increase or decrease these values. This involves updating the do_become_delegate function, modifying the existing DelegateInfo struct to include subnet-specific take values, and ensuring that delegates can dynamically adjust their take values for specific subnets.
By providing delegates with the flexibility to manage their take values on a per-subnet basis, we enable them to tailor their participation and rewards strategy according to their preferences and the unique characteristics of each subnet.
Acceptance Criteria
The DelegateInfo struct should be modified to include a new field subnet_takes of type Vec<(Compact<u16>, Compact<u16>)> to store subnet-specific take values.
The do_become_delegate function should be updated to accept a list of subnet IDs and their corresponding take values, allowing delegates to set initial take values for multiple subnets upon becoming a delegate.
A storage migration should be implemented to handle the addition of the subnet_takes field to the DelegateInfo struct, ensuring a smooth transition for existing delegates.
The do_increase_take and do_decrease_take functions should be adjusted to handle subnet-specific take adjustments, ensuring that increases or decreases are performed within the constraints of the system's rules.
Proper validation should be in place to ensure that the specified subnets exist and that the new take values adhere to the system's constraints.
The updated functionality should be thoroughly tested to verify that delegates can successfully set and adjust their take values per subnet, and that the changes are accurately reflected in the storage and overall system behavior.
Tasks
Modify the DelegateInfo struct in lib.rs to include the subnet_takes field.
#[derive(Decode,Encode,PartialEq,Eq,Clone,Debug)]pubstructDelegateInfo<T:Config>{// ...subnet_takes:Vec<(Compact<u16>,Compact<u16>)>,// New field: Vec of (subnet ID, take value)}
Implement a storage migration to handle the addition of the subnet_takes field to the DelegateInfo struct.
Update the do_become_delegate function in staking.rs to accept a list of subnet IDs and their corresponding take values.
Description
We aim to fully integrate the functionality for delegates to set and adjust their take values per subnet, including the ability to increase or decrease these values. This involves updating the
do_become_delegate
function, modifying the existingDelegateInfo
struct to include subnet-specific take values, and ensuring that delegates can dynamically adjust their take values for specific subnets.By providing delegates with the flexibility to manage their take values on a per-subnet basis, we enable them to tailor their participation and rewards strategy according to their preferences and the unique characteristics of each subnet.
Acceptance Criteria
DelegateInfo
struct should be modified to include a new fieldsubnet_takes
of typeVec<(Compact<u16>, Compact<u16>)>
to store subnet-specific take values.do_become_delegate
function should be updated to accept a list of subnet IDs and their corresponding take values, allowing delegates to set initial take values for multiple subnets upon becoming a delegate.subnet_takes
field to theDelegateInfo
struct, ensuring a smooth transition for existing delegates.do_increase_take
anddo_decrease_take
functions should be adjusted to handle subnet-specific take adjustments, ensuring that increases or decreases are performed within the constraints of the system's rules.Tasks
DelegateInfo
struct inlib.rs
to include thesubnet_takes
field.subnet_takes
field to theDelegateInfo
struct.do_become_delegate
function instaking.rs
to accept a list of subnet IDs and their corresponding take values.do_increase_take
function instaking.rs
to handle subnet-specific take increases.do_decrease_take
function instaking.rs
to handle subnet-specific take decreases.Related Links
The text was updated successfully, but these errors were encountered: