Queries
epoch-status
Where a subnet is in its epoch cycle, in one block-pinned read.
Bundles tempo, the last epoch run, the chain-computed next start block, and
the remaining blocks/seconds (seconds use the chain's detected block time,
so they are correct on fast-blocks chains too). pending_epoch_at is the
block of an owner-triggered epoch, or None when none is pending.
Category: Epochs & timing
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet to query. |
CLI
btcli query epoch-status --netuid <integer> --jsonPython
Namespace method (autocomplete, signature help):
import bittensor as bt
sub = bt.Subtensor()
result = sub.epochs.epoch_status(netuid=1)Or dispatch by name, as an agent would:
result = sub.read("epoch_status", netuid=1)Async is the same surface awaited: async with bt.Subtensor() as client:.
On-chain implementation
- Storage
SubtensorModule.Tempo - Storage
SubtensorModule.LastEpochBlock - Storage
SubtensorModule.BlocksSinceLastStep - Storage
SubtensorModule.PendingEpochAt - Storage
SubtensorModule.SubnetEpochIndex - Runtime API
SubnetInfoRuntimeApi.get_next_epoch_start_block
Every file is browsable under /code exactly as built into the runtime.