WeightsVersionKey

Storage Map v101 → v411

Required version key for setting weights .

Explore chain
Queried by: validatorsdeveloperssubnet owners

The Big Picture

Subnets can require validators to run specific software versions via WeightsVersionKey. If your validator's version key doesn't match, your set_weights call is rejected. This ensures all validators use compatible evaluation logic - preventing stale or buggy validators from corrupting consensus.

Why This Matters

Your weights aren't being accepted? Check WeightsVersionKey. Subnets can require specific versions to ensure fair evaluation. If you're running old software, you'll be rejected until you update.

Example Scenario

Query WeightsVersionKey(netuid=1) returns 2100. Your validator must send version 2100 with set_weights. If your software sends version 2000, the call fails. Update your validator software to the required version.

Common Questions

What happens if my version is wrong?
Your set_weights call is rejected with an error. Your weights don't get recorded, which means you don't participate in consensus - potentially losing dividend earnings.
How do I know what version I'm running?
Check your bittensor library version. The version key is typically embedded in the library and sent automatically with weight calls.
Who sets this value?
Subnet owners can update WeightsVersionKey. When they release new evaluation logic, they bump the version to force validators to update.
Is 0 a valid value?
When WeightsVersionKey is 0, version checking is disabled - any version is accepted. This is common on permissive subnets.

Use Cases

  • Check if your validator software is compatible
  • Debug weight-setting failures due to version mismatch
  • Plan software updates when version requirements change
  • Build version compatibility checking tools
  • Monitor subnet version requirements across the network

From Chain Metadata

MAP ( netuid ) --> weights_version_key

Purpose & Usage

Purpose

Ensure validators are running compatible software - weights from outdated software are rejected.

Common Query Patterns

  • Query by netuid before setting weights
  • Monitor for version changes that require updates
  • Verify your software version is compatible

Query Keys

#NameTypeDescription
1
netuid
u16 netuid (u16, hashed key component)

Stored Value

weights_version_key (u64)

RAO -> TAO (/ 10^9)

Relationships

Modified By

Related Events

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 WeightsVersionKey storage
const netuid = 1;

const result = await api.query.SubtensorModule.WeightsVersionKey.getValue(netuid);
console.log("WeightsVersionKey:", result);

Version History

v101 block 1 Added
v123 block 720,235 Internal re-bind
v149 block 3,014,339 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind Current

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Current Version
v411