LastUpdate
Storage Map v101 → v490 · 1 shape changeBlock number of last weight update for a neuron .
Explore chainThe Big Picture
Active validators update weights regularly to reflect current network state. This timestamp shows when each neuron last updated. Stale weights (many blocks old) suggest inactive or poorly maintained validators - important for delegation decisions.
Why This Matters
Is this validator actively maintaining their weights, or set-and-forget? Recent LastUpdate means active participation. Old LastUpdate is a red flag.
Example Scenario
Current block is 7,000,000. Query LastUpdate(netuid=1, uid=5) returns 6,999,950. Validator updated 50 blocks ago - very active. If it returned 6,900,000, that's 100,000 blocks stale - concerning.
Common Questions
- How fresh should weights be?
- Depends on the subnet's tempo. Generally, weights should update at least once per epoch. Check subnet parameters for specific expectations.
- What's the rate limit?
- Check WeightsSetRateLimit for the subnet. You typically can't update more than once per N blocks.
Use Cases
- Check if validator is actively updating weights
- Determine when weights can be updated again (rate limiting)
- Identify stale or inactive validators
- Build validator activity monitoring dashboards
From Chain Metadata
MAP ( netuid ) --> last_update
Purpose & Usage
Purpose
Track weight freshness and rate limiting.
Common Query Patterns
- Check if weights are stale
- Verify rate limit compliance
Migration Notes
key type changed from u16 to NetUidStorageIndex
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid | NetUidStorageIndex u16 | Subnet ID. Same NetUidStorageIndex remap caveat as Weights. |
Stored Value
Per-UID block numbers (Vec<u64>) of last weight update
Default Value
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Relationships
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 LastUpdate storage
const netuid = 1;
const result = await api.query.SubtensorModule.LastUpdate.getValue(netuid);
console.log("LastUpdate:", result);On-Chain Activity
More than 10M writes
#69 most written storage item
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Version History
- key :
u16→NetUidStorageIndex
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v490