commit_crv3_mechanism_weights

Call v320 → current #117

Commits weights using CRV3 (commit-reveal v3) mechanism .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdeveloperssubnet owners

The Big Picture

CRV3 (Commit-Reveal Version 3) is an enhanced commit-reveal protocol with additional protections against weight manipulation and copying. Subnets that enable CRV3 require validators to use this call instead of standard commit_weights. The protocol may include additional cryptographic commitments, timing constraints, or verification steps.

Why This Matters

Standard commit-reveal prevents seeing weights before reveal. CRV3 adds more protections - potentially against timing attacks, partial information leakage, or coordinated manipulation. If your subnet uses CRV3, you must use this call to participate in consensus.

Example Scenario

Subnet 42 has enabled CRV3 for enhanced security. After evaluating miners, prepare a CRV3-compatible commitment (format depends on implementation). Call commit_crv3_mechanism_weights(netuid=42, commit=crv3_hash). The chain stores your CRV3 commit. Follow subnet documentation for reveal timing and procedure.

Common Questions

What's different about CRV3?
Implementation-specific, but typically: stronger cryptographic commitments, different timing windows, additional verification layers. Check subnet documentation for details.
Can I use regular commit_weights on a CRV3 subnet?
No - if the subnet requires CRV3, standard commits will be rejected. Use the mechanism-specific call required by the subnet.
How do I know if a subnet uses CRV3?
Check the subnet's parameters (CommitRevealMechanism or similar). Subnet documentation should specify which commit-reveal variant is required.

Use Cases

  • Participate in subnets using CRV3 consensus mechanism
  • Submit weights with enhanced anti-copying protections
  • Advanced validators optimizing for CRV3-specific features
  • Subnets requiring higher security weight submission

From Chain Metadata

- Used to commit encrypted commit-reveal v3 weight values to later be revealed.

Part of: Weight ManagementCommit-Reveal Weights (CRV3)

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)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • CRV3 enabled on subnet
  • Validator registered with sufficient stake
  • Valid CRV3 commitment format

Effects

Events Emitted

Postconditions

  • CRV3 commit stored
  • Mechanism-specific metadata recorded

Side Effects

  • Uses enhanced commit-reveal protocol
  • May have different timing requirements than standard commit-reveal

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_crv3_mechanism_weights call
const netuid = 1;
const mecid = 0;
const commit = 0 as any /* BoundedVec */;
const reveal_round = 0;

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

Runtime Info

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