Skip to content

Conversation

@grbIzl
Copy link
Contributor

@grbIzl grbIzl commented Dec 16, 2025

Description

Migration was introduced that adds missing coldkey<->hotkey pairs into StakingHotkeys index.

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

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

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (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.

@github-actions github-actions bot added the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Dec 16, 2025
@grbIzl grbIzl changed the base branch from main to devnet-ready December 16, 2025 15:51
@opentensor opentensor deleted a comment from github-actions bot Dec 16, 2025
@grbIzl grbIzl removed the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Dec 16, 2025
@grbIzl grbIzl marked this pull request as ready for review December 16, 2025 23:17
@sam0x17 sam0x17 requested a review from a team December 16, 2025 23:34
let mut storage_writes: u64 = 0;

for ((hotkey, coldkey, _netuid), alpha) in Alpha::<T>::iter() {
if alpha == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a read for Alpha, need update weight. Alpha is a big map, it is better to find other storage to find out missed (cold, hot) relation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @open-junius ! I added the forgotten weight. As for the Alfa map idea: I understand your concern but StakingHotkeys is literally index for Alfa map (please correct me if I'm wrong) and one of its goals is indeed to replace some costly calls to Alfa map. In this case using different map for (cold, hot) relation (like Owner map) doesn't make sense to me. Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing StakingHotkeys

3 participants