Queries

epoch-status

Where a subnet is in its epoch cycle, in one block-pinned read.

View as Markdown

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

ParameterTypeDescription
netuidintegerSubnet to query.

CLI

btcli query epoch-status --netuid <integer> --json

Python

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

Every file is browsable under /code exactly as built into the runtime.