Max UIDs Trimming Rate Limit

How the UID trimming rate limit caps how often a subnet owner can trim UIDs, locking the subnet's UID count for roughly 30 days after each trim.

Max UIDs trimming rate limit, named MaxUidsTrimmingRateLimit in the documentation, controls how often a subnet owner can trim UIDs on their subnet. The rate-limits reference lists it at 216,000 blocks, about 30 days, on main net, and explains that the cap exists to prevent disruptions in subnet stability and excessive network reorganization (Rate Limits).

What Trimming Does

UID trimming lets a subnet owner reduce the number of registered neurons on their subnet, removing the lowest-emission UIDs while preserving temporally immune and owner-controlled UIDs, then compressing the remaining UIDs to keep consecutive indexing (UID Trimming). It is a forceful management action: excess neurons are deregistered, so it is meant to be used deliberately rather than routinely.

How a Trim Selects and Preserves UIDs

The documented trim is not a blind cut. When it runs, the chain works through UIDs starting from the lowest emitters and moving upward, deregistering the poorest performers first and stopping once the subnet has been reduced to the owner’s target count (UID Trimming).

Two categories of UID are skipped rather than removed. Temporally immune UIDs — those still inside the subnet’s post-registration immunity window — are preserved, as are owner-immune UIDs controlled by the subnet creator. The documentation also caps total immunity so a trim cannot leave a subnet made up almost entirely of protected slots: the number of immune UIDs must remain below 80% of the maximum UID count. The chain enforces this as a strict immune_percentage < MaxImmuneUidsPercentage comparison, with the maxImmuneUidsPercentage constant set to 80, so the immune share is held strictly under that ceiling rather than allowed to reach it (UID Trimming, Subtensor Constants: maxImmuneUidsPercentage, Glossary: Immunity Period).

After the low emitters are removed, the surviving UIDs are compressed to the left to keep consecutive indexing. The documentation gives a worked example: if UIDs 5, 7, and 9 are what remain once trimming finishes, they are reindexed to 0, 1, and 2. The trim also cannot cross the documented floor, since the minimum count an owner can trim to is 64, so the action removes the weakest non-protected neurons down to that floor rather than emptying the subnet (UID Trimming, Glossary: Immunity Period).

What the Rate Limit Controls

This parameter is the cooldown between those trims, not a limit on how far a single trim can go. The UID trimming guide states the chain’s trim rate limit is 216,000 blocks (~30 days), so subnet owners can only change their UID count once roughly every 30 days (UID Trimming, Rate Limits).

When It Matters

A common misconception is that an owner can keep resizing their subnet to react to performance week by week. The rate limit blocks that: once a trim lands, the UID count is locked for about 30 days before it can be trimmed again (UID Trimming).

Concretely, suppose the owner of netuid 14 trims it down to 100 UIDs with btcli sudo trim --netuid 14 --max 100. If a week later they decide 100 was still too many and want to trim to the documented minimum of 64, the chain will reject the second trim until the roughly 216,000-block window elapses. Because trimming deregisters the excess neurons, that waiting period is the safeguard: it forces owners to size their subnet carefully rather than churn participants repeatedly (UID Trimming, Rate Limits).

Documented Nature

The Rate Limits reference lists MaxUidsTrimmingRateLimit as a block-counted limit that is not queryable from chain state, with the interval at 216,000 blocks on main net and 1 block in fastblocks development mode. The trim itself is a subnet-owner sudo action performed with btcli sudo trim or the sudo_trim_to_max_allowed_uids extrinsic (UID Trimming, Extrinsics).

Distinction from Min Allowed UIDs

The two interact but answer different questions. Min allowed UIDs is the floor a trim cannot drop the subnet below, while the trimming rate limit is how long the owner must wait between trims (UID Trimming).

  • Min allowed UIDs — the lowest UID count a trim may target.
  • Max UIDs trimming rate limit — the cooldown between successive trims.

Further Reading

Topics SubnetsSecurity