Queries
blocks-until-next-epoch
Blocks until the subnet's next epoch fires, or None if tempo is 0.
Derived from the chain's own next_epoch_start_block at one pinned block.
The actual fire can shift by a few blocks (per-block epoch cap defers,
owner triggers pull earlier) — to act on the epoch itself, use
client.wait_for_epoch().
Category: Epochs & timing
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet to query. |
CLI
btcli query blocks-until-next-epoch --netuid <integer> --jsonPython
import bittensor as sub
async with sub.Client("finney") as client:
result = await client.read("blocks_until_next_epoch", netuid=1)