Queried by: validatorsminersdevelopersanalytics
The Big Picture
A convenience counter showing how far into the current epoch we are. When this equals Tempo, the next emission step triggers. It's the 'time remaining' display for emission cycles.
Why This Matters
How close are we to the next epoch? BlocksSinceLastStep / Tempo = progress through epoch. At 80% through, weights set now will matter for the upcoming distribution.
Example Scenario
Query BlocksSinceLastStep(netuid=1) returns 75. Tempo is 100. You're 75% through the epoch. 25 more blocks until next emission step.
Common Questions
- Why does this matter for validators?
- Weight updates close to epoch end count toward that epoch. Updates right after a step have more time to affect miner behavior before evaluation.
- Is this exactly Tempo - BlocksSinceLastStep to next step?
- Yes, next step at (Tempo - BlocksSinceLastStep) blocks. Though exact timing depends on block production, which can vary slightly.
Use Cases
- Show countdown to next emission cycle
- Calculate progress through current epoch
- Build emission timing dashboards
- Plan weight updates relative to epoch
- Monitor subnet activity cycles
Purpose & Usage
Purpose
Track time since last distribution - countdown to next epoch.
Common Query Patterns
- Query by netuid
- Build epoch countdown displays
- Monitor emission timing
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | u16 | key1 (u16) |
Stored Value
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 });
// Query BlocksSinceLastStep storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("BlocksSinceLastStep")](
key1
);
console.log("BlocksSinceLastStep:", result.toHuman());On-Chain Activity
Write Source Runtime Hook
Modified by runtime hooks (e.g., epoch transitions), not directly by user extrinsics
As of block 7,429,232
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v393