Conversation
l0r1s
left a comment
There was a problem hiding this comment.
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.
Is this code already in use? Because it could requires a migration
There was a problem hiding this comment.
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. |
will add the check in extrinsic. |
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 fmtandcargo clippyto 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.