-
Notifications
You must be signed in to change notification settings - Fork 239
set auto hotkey per subnet #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devnet-ready
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sure if there is a need for a migration, if this is not already used, you can ignore
#[pallet::storage] // --- MAP ( cold ) --> hot | Returns the hotkey a coldkey will autostake to with mining rewards. | ||
pub type AutoStakeDestination<T: Config> = | ||
StorageMap<_, Blake2_128Concat, T::AccountId, T::AccountId, OptionQuery>; | ||
#[pallet::storage] // --- DMAP ( cold, netuid )--> hot | Returns the hotkey a coldkey will autostake to with mining rewards. | ||
pub type AutoStakeDestination<T: Config> = StorageDoubleMap< | ||
_, | ||
Blake2_128Concat, | ||
T::AccountId, | ||
Identity, | ||
NetUid, | ||
T::AccountId, | ||
OptionQuery, | ||
>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code already in use? Because it could requires a migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder. I was just wandering if we should add the old default key to all subnet, it is better to add migration process.
Potential problem is that autostaking can now be done on a hot key that's not only not registered in the subnet, but doesn't even exist in the chain. |
Description
Add auto hotkey for coldkey per subnet.
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.