-
Notifications
You must be signed in to change notification settings - Fork 252
Hotkey splitting #1559
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
Hotkey splitting #1559
Conversation
My understanding for the solution is the new netuid parameter give the coldkey ability to swap hotkey in any subnet. It will remove the limit of tx rate. also save the cost to register hotkey in every subnet. |
| pub const InitialEmaPriceHalvingPeriod: u64 = 201_600_u64; // 4 weeks | ||
| pub const DurationOfStartCall: u64 = 7 * 24 * 60 * 60 / 12; // 7 days | ||
| pub const InitialKeySwapOnSubnetCost: u64 = 10_000_000; | ||
| pub const HotkeySwapOnSubnetInterval: u64 = 7 * 24 * 60 * 60 / 12; // 7 days |
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.
Why is 7 days divided by 12 here? The comment should be 7 days / 12 then
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.
one block each 12 seconds. like RootEnterDuration: BlockNumber = 5 * 60 * 24; // 24 hours
| /// Estimating the maximum stake for limited staking operations returned zero. | ||
| /// Zero max stake amount |
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.
There is an issue with the comment here, no? Should be line 215 only
| /// Estimating the maximum stake for limited staking operations returned zero. | |
| /// Zero max stake amount | |
| /// Estimating the maximum stake for limited staking operations returned zero. |
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.
should be a mistake, will remove it.
|
|
||
| // 17. Return the weight of the operation | ||
| // 22. Return the weight of the operation | ||
| Ok(Some(weight).into()) |
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 the goal to emit a refund of the weight here?
| #[pallet::weight((Weight::from_parts(240_600_000, 0) | ||
| .saturating_add(T::DbWeight::get().reads(31)) |
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.
I don't know if there is a limit on the number of hotkey a user can have but I think this is related to the way you handle weight in the impl, you are trying to make it dynamic and return the weight at the end but what is returned is refunded, not billed to the user. What it does is take the weight defined here, take the returned weight and refund the difference. Is it what we want? What you could do is benchmark with a parameter on a big number of hotkey, like 100 (I don't know if this is realist), which will be the max amount billed to the user and then refund the difference based on the actual number of hotkey changed?
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.
I think we need to make the benchmark work for the extrinsic. we can discuss it internally.
The extrinsic just change one hotkey, I don't understand why we need bench test for 100 keys.
Do you mean we change the hotkey over 100 subnets
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.
Feel free to modify the benchmark.
l0r1s
left a comment
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.
The benchmark job has been skipped?
hotkey splitting emergency merge of #1559
Description
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.