WeightsRevealed
Event Re-added v205 → v212, v216 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #84Emitted when a validator reveals previously committed weights .
View events on chainThe 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
Preconditions
- Validator has pending commit
- Reveal hash matches commit hash
- Within reveal time window
May fail with
Effects
Storage Modified
Postconditions
- Weights applied to Weights storage
- Commit cleared
Side Effects
- Same effects as WeightsSet
- Affects next epoch incentive calculations
Event Data
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
Occasional use
#49 most emitted event
As of block 7,429,232
Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 84
- First Version
- v205
- Current Version
- v393