WeightsSet

Event Re-added v101 → v219, v233 → v265, v273 → v277, v290 → current #5

Emitted when a validator submits their evaluation weights for miners.

View events on chain
Useful for: validatorsminerssubnet ownersanalytics

The Big Picture

Weights are how validators express their evaluation of miners. Each validator assigns weights to miners based on their performance (response quality, speed, etc.). These weights are aggregated by the Yuma Consensus mechanism to determine how emissions are distributed. Setting weights is the core job of a validator.

Why This Matters

Your weights directly influence which miners earn emissions. By setting weights honestly based on miner performance, you help the network reward good work. Your own earnings depend on setting weights that align with consensus - validators who agree with others earn more.

Example Scenario

You're validating subnet 1 (text prompting). Your validation code queries miners, scores their responses, and you submit weights: UID 12 gets 0.3, UID 45 gets 0.5, UID 78 gets 0.2. WeightsSet fires confirming your submission. Next epoch, emissions flow based on the consensus of all validators' weights.

Common Questions

How often should I set weights?
As often as allowed by the rate limit (check WeightsSetRateLimit). More frequent updates mean more accurate miner rankings, which improves your validator trust.
What happens if my weights disagree with other validators?
The Yuma Consensus penalizes outliers. If you consistently disagree with the majority, your validator trust decreases and you earn less. This incentivizes honest evaluation.

Use Cases

  • Confirm your weight submission succeeded
  • Track validator activity on your subnet
  • Analyze weight patterns for gaming detection
  • Monitor consensus formation in real-time

How to Use This Event

  • Subscribe to your own hotkey to confirm weight submissions
  • Monitor all weight sets on a subnet for consensus analysis
  • Track weight changes over time for individual validators

From Chain Metadata

a caller successfully sets their weights on a subnetwork.

Part of: Weight Management

Triggers

Preconditions

  • Caller is registered validator on subnet
  • Validator has sufficient stake
  • Weight setting not rate limited
  • Valid weight vector (correct UIDs and values)

Effects

Postconditions

  • Validator's weights updated for this subnet
  • Weight version incremented

Side Effects

  • Affects next epoch's incentive/dividend calculations
  • Updates last weight set block

Event Data

#NameTypeDescription
0
arg0
→ netuid
u16 Subnet ID
1
arg1
→ uid
u16 UID of the neuron setting weights

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

On-Chain Activity

Emission Frequency
●●●●●○ Dominant 5M–50M emissions

Core protocol operations, high volume

#5 most emitted event

As of block 7,429,232

Version History

v101 block 1 2 args
v233 block 4,920,350 2 args
v273 block 5,659,032 2 args
v290 block 5,947,548 2 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
5
First Version
v101
Current Version
v393