CommitRevealVersionSet

Event Re-added v301 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #104

Emitted when the required commit-reveal version is updated.

View events on chain
Useful for: validatorssubnet ownersdevelopersanalytics

The Big Picture

Commit-reveal has multiple protocol versions (v1, v2, CRV3, etc.). This event signals when a subnet requires a specific version. Validators using older versions will have their commits rejected. It's how subnets coordinate upgrades - set the version requirement and validators must comply or be excluded.

Why This Matters

If your validator software speaks commit-reveal v2 but the subnet requires v3, your commits fail. This event warns you: 'Upgrade now or stop working on this subnet.' It's critical for maintaining validator operations across protocol upgrades.

Example Scenario

Subnet 5 is upgrading from CRV2 to CRV3 for improved security. CommitRevealVersionSet fires with netuid 5 and version 3. Your validator using CRV2 will now have commits rejected. You must update to CRV3-compatible software to continue validating on subnet 5.

Common Questions

How much time do I have to upgrade?
Immediate - the new requirement is effective from this event. Any commits using the old version will fail. Upgrade ASAP to avoid missing validation rounds.
What if I have pending commits with the old version?
They may still be revealable (depends on implementation), but you can't make new commits until you upgrade. Finish pending work, then update.
Where do I find the new version's protocol documentation?
Check the bittensor repository or subnet-specific documentation. Each version has different commit/reveal function signatures and requirements.

Use Cases

  • Track commit-reveal protocol upgrades
  • Alert validators when software updates are needed
  • Monitor subnet protocol evolution
  • Build version-aware validator tools

How to Use This Event

  • Monitor subnets for version requirement changes
  • Build alerts for required software upgrades
  • Track version adoption across the network

From Chain Metadata

Commit Reveal Weights version has been updated. **version**: The required version.

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • New version requirement in effect

Side Effects

  • Validators must update to compatible software

Event Data

#NameTypeDescription
0
arg0
u16 Event field #0 (u16)

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

// Subscribe to CommitRevealVersionSet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "CommitRevealVersionSet"
    )
    .forEach(({ event }) => {
      console.log("CommitRevealVersionSet:", event.data.toHuman());
    });
});

Version History

v301 block 6,205,194 1 args
v320 block 6,523,566 1 args
v334 block 6,811,690 1 args
v372 block 7,430,358 1 args
v385 block 7,782,670 1 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
104
First Version
v301
Current Version
v393