commit_timelocked_mechanism_weights

Call v320 → current #118

Commits mechanism weights with timelock.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdeveloperssubnet owners

The Big Picture

Combines mechanism weights (subnet-specific consensus) with timelocking (synchronized reveals). This is the most constrained weight submission: weights must conform to the mechanism, and reveals are enforced to occur simultaneously. Used by subnets with high-value stakes or particularly sensitive consensus requirements.

Why This Matters

When a subnet uses a custom mechanism AND needs synchronized reveals, this is the only valid commit call. It provides maximum protection against weight manipulation and timing attacks, at the cost of more constrained submission timing.

Example Scenario

Subnet 77 uses mechanism weights with timelocked reveals at round 500. Evaluate miners according to the mechanism, prepare commitment. Call commit_timelocked_mechanism_weights(netuid=77, commit_hash=hash, reveal_round=500). Wait until round 500, then reveal with the appropriate reveal call.

Common Questions

How does this differ from commit_timelocked_weights?
commit_timelocked_weights is for standard weight consensus. This variant is for mechanism-specific consensus. Use whichever the subnet requires.
What's the reveal call for timelocked mechanism weights?
Typically reveal_mechanism_weights during the valid round. Check subnet documentation for the exact reveal procedure and timing.

Use Cases

  • Mechanism weight submission with synchronized reveals
  • High-security subnets requiring both mechanism weights and timelocking
  • Advanced consensus protocols with multiple protection layers

From Chain Metadata

- Used to commit timelock encrypted commit-reveal weight values to later be revealed for a mechanism.

Input Parameters

#NameTypeDescription
0
netuid
u16 Subnet/network identifier (0-65535)
1
mecid
u8 mecid (u8)
2
commit
BoundedVec commit (BoundedVec)
3
reveal_round
u64 reveal_round (u64)
4
commit_reveal_version
u16 commit_reveal_version (u16)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Timelocked mechanism enabled on subnet
  • Valid round and commit hash
  • Validator registered with sufficient stake

Effects

Postconditions

  • Timelocked mechanism commit stored
  • Commit locked until specified round

Side Effects

  • Synchronized reveal with other validators
  • Feeds into mechanism-specific consensus when revealed

Possible Errors

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 });

// Build commit_timelocked_mechanism_weights call
const netuid = 1;
const mecid = 0;
const commit = 0 as any /* BoundedVec */;
const reveal_round = 0;
const commit_reveal_version = 0;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("commit_timelocked_mechanism_weights")](
  netuid,
  mecid,
  commit,
  reveal_round,
  commit_reveal_version
);

On-Chain Activity

Usage Frequency
●●●●●○ Core 1M–10M extrinsics

Primary protocol calls

#22 most used call

Success Rate Reliable

80–95% of submissions succeed

As of block 7,429,232

Runtime Info

View Source
Pallet Index
7
Call Index
118
First Version
v320
Current Version
v393