FlowEmaSmoothingFactor

Storage Plain v334 → current

EMA weight for the TAO -flow accumulators, as u64 / i64::MAX. Unread on the emission path since v421.

Explore chain
Queried by: developersanalytics

The Big Picture

ema = (1 − a) × ema + a × block_flow with a = this value / i64::MAX (subnet_emissions.rs get_ema_flow). Part of the flow allocator, which no longer runs.

Use Cases

  • Reproduce TAO-flow EMAs for runtimes v334 to v411

From Chain Metadata

ITEM --> Flow EMA smoothing factor (flow alpha), u64 normalized

Purpose & Usage

Purpose

Set how fast SubnetEmaTaoFlow and SubnetEmaProtocolFlow tracked their per-block sums. Both EMA updates live in dead code at v452, so changing this moves nothing.

Common Query Patterns

  • Single value query
  • Divide by i64::MAX for the per-block weight

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

Default Value

29597889189277 0x9dd5ab4beb1a0000

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

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);

// Query FlowEmaSmoothingFactor storage (no keys - plain value)
const result = await api.query.SubtensorModule.FlowEmaSmoothingFactor.getValue();
console.log("FlowEmaSmoothingFactor:", result);

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Plain
First Version
v334
Current Version
v490