LastMechansimStepBlock
Storage Map v101 → currentLast block when emission mechanism stepped.
Explore chainThe Big Picture
Each subnet runs its consensus and emission cycle at its tempo. LastMechansimStepBlock records when that last happened. Combined with Tempo, you can predict when the next cycle will run.
Why This Matters
When was the last payout? When's the next one? LastMechansimStepBlock + Tempo answers this. Useful for timing weight updates and understanding emission cadence.
Example Scenario
Query LastMechansimStepBlock(netuid=1) returns 7000000. Tempo is 100 blocks. Next epoch runs at block 7000100. If current block is 7000050, you're halfway through the current epoch.
Common Questions
- What happens at each step?
- Yuma Consensus runs, processing all weights to determine ranks, incentives, dividends. Then PendingEmission is distributed based on these scores.
- Can steps be delayed?
- Steps run automatically based on block timing. They're not delayed, but if the network is congested, block times might vary slightly.
Use Cases
- Calculate when last emission occurred
- Predict next epoch based on tempo
- Debug emission timing issues
- Build epoch timing displays
- Synchronize operations with emission cycles
Purpose & Usage
Purpose
Track emission distribution timing - when the subnet last ran consensus and paid rewards.
Common Query Patterns
- Query by netuid
- Calculate time since last distribution
- Predict next epoch 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 LastMechansimStepBlock storage
const key1 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("LastMechansimStepBlock")](
key1
);
console.log("LastMechansimStepBlock:", result.toHuman());On-Chain Activity
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