NullPruningTarget
Storage Map v475 → currentPer subnet , the final UID target of an unfinished sudo_trim_null_uids_batch operation.
Explore chainQueried by: subnet ownersanalytics
The Big Picture
Source: pallets/subtensor/src/subnets/uids.rs trim_null_uids_batch and pallets/admin-utils/src/lib.rs sudo_trim_null_uids_batch at v475.
Use Cases
- Resume a trim from another client
- Show trim progress on a subnet dashboard
From Chain Metadata
Explicit Null pruning continuation. Every completed batch leaves a usable subnet.
Purpose & Usage
Purpose
Lets a repeated call with the same target continue the operation without a new rate-limit cooldown.
Common Query Patterns
- Query to see whether an owner trim is in progress and toward what target
- Absent means no trim operation is pending
Notes
- First appears at runtime v475. Keyed by netuid (Identity), u16, OptionQuery.
- Set by a batch that leaves UIDs above target, or that spent its budget cancelling commits. Removed by the batch that reaches target.
- Also cleared by any epoch-consensus change, by set_max_allowed_uids, by sudo_trim_to_max_allowed_uids, and at subnet dissolution.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | NetUid u16 | key1 (NetUid) |
Stored Value
value (u16)
Default Value
None (absent keys return no value)
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query NullPruningTarget storage
const key1 = 0;
const result = await api.query.SubtensorModule.NullPruningTarget.getValue(key1);
console.log("NullPruningTarget:", result);On-Chain Activity
Write Frequency
●●○○○○ Minimal <10K est. writes
Fewer than 10K writes
#336 most written storage item
Write Source Calls + Hooks
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v475
- Current Version
- v490