TimelockedWeightCommits

Storage Map Event-driven v306 → v411 Changed in v411

Timelocked weight commits for commit-reveal — canonical at v411.

Explore chain
Queried by: validatorsdevelopers

The Big Picture

Current commit-reveal storage. Commits are encrypted and timelocked until the reveal round. Contains (who, commit_block, ciphertext, reveal_round) tuples. Indexers can ignore CRV3WeightCommits and CRV3WeightCommitsV2 — both are empty at v411.

Use Cases

  • View pending commits
  • Debug commit-reveal
  • Build commit tracking tools

From Chain Metadata

MAP (netuid, epoch) → VecDeque<(who, commit_block, ciphertext, reveal_round)> Stores a queue of weight commits for an account on a given subnet.

Purpose & Usage

Purpose

Store encrypted weight commits with timed reveal. Supersedes CRV3WeightCommits and CRV3WeightCommitsV2 — both legacy storages are empty at v411.

Common Query Patterns

  • Query by (netuid, epoch)

Query Keys

#NameTypeDescription
1
netuid netuid
raw: key1
u16 key1 (u16)
2
epoch
raw: key2
u64 key2 (u64)

Stored Value

Value in RAO (÷10⁹ for TAO)

Decoding the value

VecDeque<(AccountId, u64 commit_block, BoundedVec<u8> ciphertext, RoundNumber)>

Each entry is a commit-reveal tuple. ciphertext is encrypted weights; reveal_round determines when the timelock unseals.

value as Array<{0: string; 1: bigint; 2: Uint8Array; 3: bigint}>

Relationships

Related Storages

  • CRV3WeightCommitsV2 Supersedes CRV3WeightCommitsV2 is the immediate predecessor; this storage has the same value shape (who, commit_block, ciphertext, reveal_round).
  • CRV3WeightCommits Supersedes Older legacy storage; chain is CRV3WeightCommits → CRV3WeightCommitsV2 → this.

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 TimelockedWeightCommits storage
const key1 = 0;
const key2 = 0n;

const result = await api.query.SubtensorModule.TimelockedWeightCommits.getValue(key1, key2);
console.log("TimelockedWeightCommits:", result);

On-Chain Activity

Write Frequency
●●●●●○ High 1M–10M est. writes

1M–10M estimated writes

#21 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Version History

v306 block 6,321,411 Added
v316–v319 · runtime versions skipped on chain (never deployed)
v320 block 6,523,566 Internal re-bind
v327–v333 · runtime versions skipped on chain (never deployed)
v334 block 6,811,690 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v363–v364 · runtime versions skipped on chain (never deployed)
v365 block 7,135,419 Internal re-bind
v386–v390 · runtime versions skipped on chain (never deployed)
v391 block 7,782,857 Internal re-bind
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind
v403–v410 · runtime versions skipped on chain (never deployed)
v411 block 8,283,784 Internal re-bind Current

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v306
Current Version
v411
Population
dense (~126 entries)