Skip to content

Conversation

@unconst
Copy link
Contributor

@unconst unconst commented Aug 29, 2025

Description

Allows subnets to trim the number of active UIDs while preserving immune UIDs (temporally and owner owned), compressing the UIDs to the left and migrating/clearing associated storage.

A new extrinsic + storage item has been defined for the minimum allowed number of UIDs of a subnet and we can't trim below this limit which is set to 64 to start with and will allow gradual controlled trimming on a per subnet basis to prevent abuse.

@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 Aug 29, 2025
@unconst unconst changed the base branch from main to devnet-ready August 29, 2025 18:32
@opentensor opentensor deleted a comment from github-actions bot Aug 29, 2025
@sam0x17 sam0x17 added skip-cargo-audit This PR fails cargo audit but needs to be merged anyway and removed hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet labels Aug 29, 2025
ales-otf
ales-otf previously approved these changes Sep 16, 2025
Copy link
Contributor

@ales-otf ales-otf left a comment

Choose a reason for hiding this comment

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

Confused about these "UID's". At first glance it looks like a hyperparameter. If so, you need to extend the Hyperparameter enum we introduced earlier and use TransactionType::OwnerUpdateHyperparam. You would also need to use ensure_root_with_limits to enforce the freeze window. Otherwise just ignore. At the same time I can see it was before and it's configured via a constant.

@l0r1s
Copy link
Collaborator

l0r1s commented Sep 16, 2025

Confused about these "UID's". At first glance it looks like a hyperparameter. If so, you need to extend the Hyperparameter enum we introduced earlier and use TransactionType::OwnerUpdateHyperparam. You would also need to use ensure_root_with_limits to enforce the freeze window. Otherwise just ignore. At the same time I can see it was before and it's configured via a constant.

Yes, it is like an hyperparameter but with a custom rate limit of 1 time per month to avoid abuse given it kicks out neurons.

I added the ensure_root_with_limit for the 2nd extrinsic!

@sam0x17 sam0x17 merged commit ece47af into devnet-ready Sep 17, 2025
4 checks passed
@thewhaleking thewhaleking deleted the trim_uids branch September 17, 2025 18:59
@l0r1s l0r1s mentioned this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants