CommitRevealWeightsVersion

Storage Plain v301 → current

Current version of the commit-reveal weights protocol.

Explore chain
Queried by: validatorsdevelopers

The Big Picture

The commit-reveal protocol may evolve. This version number ensures clients use the correct submission format. Mismatched versions will fail.

Use Cases

  • Check protocol version before submitting
  • Ensure client compatibility
  • Debug commit-reveal issues

From Chain Metadata

ITEM ( CommitRevealWeightsVersion )

Purpose & Usage

Purpose

Track protocol version for compatibility.

Common Query Patterns

  • Single value query

Stored Value

value (u16)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query CommitRevealWeightsVersion storage (no keys - plain value)
const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("CommitRevealWeightsVersion")]();
console.log("CommitRevealWeightsVersion:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Plain
First Version
v301
Current Version
v393