RootWeightsSet

Event v441 → current #6

Emitted when a root validator stores its basket distribution vector; carries the validator 's root-subnet uid .

View events on chain
Useful for: validatorsstakersanalyticsdevelopers

The Big Picture

Root validators are transparent fund managers. Their weight vector is the whole strategy: it decides which subnets their stakers' root yield buys into. RootWeightsSet is the public signal that a manager changed that allocation. The payload carries only the uid, so read the vector back from the validator-root-weights runtime API.

Why This Matters

If you delegate root stake, your validator's weight vector is where your yield goes. This event is how you find out it moved, so you can decide whether you still agree with the curation.

Example Scenario

A root validator shifts its basket from a broad spread into three subnets it believes are underpriced. RootWeightsSet fires with its root uid. You resolve that uid to the hotkey, pull the new vector, and see the concentration before your next dividend is deployed.

Common Questions

Why does the payload not include the weights?
The event carries only the uid. The vector is stored on chain; read it with the validator-root-weights runtime API or the corresponding storage item.
Is the uid a netuid?
No. It is the validator's uid on the root subnet (netuid 0), not a destination subnet id.
Why have I never seen this event?
Root Reborn shipped with set_root_weights disabled network-wide, so every fund runs the null strategy until governance enables it. Until then the call fails with RootWeightSettingDisabled.

Use Cases

  • Detect when a validator changes its fund strategy
  • Track curation activity across root validators
  • Alert stakers that their chosen fund was rebalanced
  • Build validator fund comparison dashboards

How to Use This Event

  • → Resolve the uid to a hotkey via root-subnet Keys, then query the stored vector
  • → Diff successive vectors per validator to build a rebalance history
  • → Notify delegators when the fund they subscribe to changes allocation

From Chain Metadata

a root validator set its beta-basket distribution vector (uid on the root subnet).

Triggers

Emitted by

Preconditions

  • RootWeightSettingEnabled is true (false from v441 through v448, true since v450)
  • Caller hotkey is registered on the root subnet and clears the minimum stake to set weights
  • Root weights rate limit has elapsed
  • At least MIN_ROOT_BASKET_WEIGHTS positive destinations, softened when fewer networks exist

Effects

Storage Modified

Postconditions

  • Validator's root weight vector stored, normalized and quantized to u16
  • Subsequent root dividends are sold once and redeployed across the new destinations

Side Effects

  • Switches the fund off the null strategy: setting a vector turns on the sell-and-redeploy engine

Event Data

#NameTypeDescription
0
arg0
→ uid
u16 UID on the root subnet (netuid 0) of the validator whose basket distribution vector was set. Not a netuid.

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to RootWeightsSet events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.RootWeightsSet.get(block.hash);
  for (const evt of events) {
    console.log("RootWeightsSet:", evt.payload);
  }
});

Runtime Info

View Source
Pallet Index
7
Event Index
6
First Version
v441
Current Version
v472