CommitRevealWeightsEnabled
Storage Map v151 → currentWhether commit-reveal weights is enabled per subnet .
Explore chainQueried 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
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 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