WeightsRevealed

Event Re-added v205 → v212, v216 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #84

Emitted when a validator reveals previously committed weights .

View events on chain
Useful for: validatorsminerssubnet ownersanalytics

The Big Picture

The reveal phase makes your committed weights official. Until reveal, your weights are hidden (only the hash is known). After reveal, they're applied just like regular weights and affect miner emissions. This event confirms the commit-reveal cycle completed successfully.

Why This Matters

Your commit is just a promise. The reveal makes it real. If you committed to giving miner 47 a high score, the reveal actually applies that score. Miners now see your weights, and the consensus algorithm includes them in emission calculations.

Example Scenario

You committed weights earlier with hash 0xabc... Now the reveal window opens. You call reveal_weights with your original weights [UID 12: 0.3, UID 45: 0.5, UID 78: 0.2] and your salt. The chain verifies hash(weights + salt) = 0xabc..., then WeightsRevealed fires. Your weights are now live and affecting miner rankings.

Common Questions

When is the reveal window?
After the commit period ends and before your commit expires. Check RevealPeriodEpochs for timing. Missing the window means your weights don't count.
Can others see my weights before I reveal?
No, only the hash is public. Your actual weights stay secret until reveal. After reveal, they're publicly visible like any other weights.

Use Cases

  • Confirm your weight reveal succeeded
  • Track when validators' weights become public
  • Analyze weight patterns after reveal
  • Monitor commit-reveal completion rates

How to Use This Event

  • Subscribe to your hotkey to confirm reveals
  • Monitor all reveals on a subnet to see real-time weights
  • Track reveal rates to measure validator participation

From Chain Metadata

Weights have been successfully revealed. **who**: The account ID of the user revealing the weights. **netuid**: The network identifier. **commit_hash**: The hash of the revealed weights.

Triggers

Effects

Postconditions

  • Weights applied to Weights storage
  • Commit cleared

Side Effects

  • Same effects as WeightsSet
  • Affects next epoch incentive calculations

Event Data

#NameTypeDescription
0
arg0
AccountId Event field #0 (AccountId) (hex -> SS58)
1
arg1
u16 Event field #1 (u16)
2
arg2
H256 Event field #2 (H256)

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 WeightsRevealed events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "WeightsRevealed"
    )
    .forEach(({ event }) => {
      console.log("WeightsRevealed:", event.data.toHuman());
    });
});

On-Chain Activity

Emission Frequency
●●○○○○ Moderate 10K–100K emissions

Occasional use

#49 most emitted event

As of block 7,429,232

Version History

v205 block 4,209,446 3 args
v216 block 4,510,996 3 args
v252 block 5,163,656 3 args
v273 block 5,659,032 3 args
v290 block 5,947,548 3 args
v320 block 6,523,566 3 args
v334 block 6,811,690 3 args
v372 block 7,430,358 3 args
v385 block 7,782,670 3 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
84
First Version
v205
Current Version
v393