CommitRevealWeightsEnabled

Storage Map v151 → current

Whether commit-reveal weights is enabled per subnet .

Explore chain
Queried by: validatorssubnet ownersdevelopers

The Big Picture

Commit-reveal prevents weight copying by requiring validators to commit weights before seeing others. When enabled, weights must go through the commit-reveal cycle rather than being set directly.

Use Cases

  • Check if commit-reveal is required before setting weights
  • Monitor subnet weight policies
  • Build weight submission tools

Purpose & Usage

Purpose

Toggle commit-reveal mechanism for weight setting.

Common Query Patterns

  • Query by netuid
Part of: Commit-Reveal Weights (CRV3)

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (bool)

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 CommitRevealWeightsEnabled storage
const key1 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("CommitRevealWeightsEnabled")](
  key1
);

console.log("CommitRevealWeightsEnabled:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v151
Current Version
v393