This call was removed in v464
This call is no longer available in the current runtime. Existed from v151 to v459. Shown here for historical reference.
Likely renamed to set_tao_weights (same index 146) in v233 — name matching breaks, index matching is unaffected.
set_root_weights
Call Removed v151 → v219, v441 → v459 (removed) #146Sets a root validator 's basket distribution vector: which subnets its root dividends buy into.
Call Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
This is the whole job of a root validator under Root Reborn. The vector decides where every staker's root yield is deployed, it is public, and fund NAV and lifetime return are queryable, so validators compete on who made their stakers the most TAO. Note the name is reused: the pre-2025 set_root_weights was a vote on network-wide emission allocation, not a fund vector.
Why This Matters
Setting a vector is what turns a passive accumulator into an actively managed fund. Until you set one, the protocol executes zero trades on your behalf and your basket is just the emission-weighted portfolio your dividends describe.
Example Scenario
You want 20% held as TAO and the rest split across two subnets you rate highly. Submit dests [0, 4, 8] with weights [0.2, 0.3, 0.5]. They are normalized and quantized to u16, and your next epoch dividend is sold and redeployed on that split.
Common Questions
- Why does my call fail with RootWeightSettingDisabled?
- The flag was false from v441 through v448 and migration enable_root_weight_setting_v1 set it true at v450. On a current runtime the error means governance switched the setter off again.
- How do I keep part of the basket in TAO?
- Weight netuid 0. It is a valid destination and maps to the fund root slot.
- Are the weights absolute?
- No. They are relative, normalized and quantized to u16 before storage.
- Is this the same call that used to set subnet emission allocation?
- No. The name is reused. The historical call let root validators vote on network-wide emission split; this one publishes a distribution vector for the caller own fund.
Use Cases
- Curate a fund allocation across subnets
- Hold part of the basket as TAO by weighting netuid 0
- Rebalance in response to subnet performance
From Chain Metadata
Sets a root validator's basket distribution vector `w` on the root subnet (netuid 0). `dests` are subnet netuids and `weights` are the proportions of the validator's root dividends to deploy into each subnet's alpha basket. Requires at least [`crate::MIN_ROOT_BASKET_WEIGHTS`] positive destinations (softened when fewer networks exist).
Input Parameters
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- 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
- Every destination is netuid 0 or an existing subnet
- No destination exceeds RootWeightsCap of the vector sum (4096 of u16::MAX, 1/16, since v450; otherwise RootWeightCapExceeded)
Effects
Events Emitted
Storage Modified
Postconditions
- Weight vector stored, normalized and quantized to u16
- Subsequent dividends are sold once and redeployed per the new vector
Side Effects
- Turns off the null strategy: with no vector, dividends accumulate in place trade-free
- Emits RootWeightsSet carrying the validator root-subnet uid
Possible Errors
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);
// Build set_root_weights call (typed, named args)
const dests = [] as [];
const weights = [] as [];
const tx = api.tx.SubtensorModule.set_root_weights({
dests,
weights,
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 146
- First Version
- v151
- Removed In
- v464