Epoch Processing

Consensus

Per-subnet periodic processing that runs Yuma Consensus, distributes emissions, and updates metagraph state.

Click items to navigate to their reference pages.

The Big Picture

Epoch processing is the bridge between block-by-block emission accumulation and actual TAO payouts to wallets. Every N blocks (Tempo), each subnet runs Yuma Consensus on its weight matrix and distributes all pending emissions to validators and miners based on their incentive and dividend scores.

Why This Matters

Understanding epochs is key to knowing when you get paid. Emission accumulates every block but only reaches your wallet at epoch boundaries. Subnets with shorter Tempo distribute more frequently.

Example Scenario

A subnet with Tempo=360 (~72 min at 12s blocks) accumulates emissions for 360 blocks. If the subnet earns 0.02 TAO/block, the epoch distributes 7.2 TAO total. A miner with 10% incentive receives 0.36 TAO (as Alpha tokens) at epoch — not per-block.

Common Questions

What is Tempo?
The number of blocks per epoch for a given subnet. Shorter Tempo means more frequent consensus and distribution. The subnet owner can configure it.
What happens if no validators set weights?
Epoch still runs, but with an empty weight matrix. Emission accumulates but cannot be distributed to miners — it stays in pending until weights are set.

Use Cases

  • Predicting when emissions will be distributed
  • Understanding per-epoch earnings
  • Debugging stale metagraph data
  • Monitoring subnet epoch health

Each subnet has a Tempo parameter defining how many blocks constitute an epoch. At epoch boundaries, the runtime triggers epoch processing: running Yuma Consensus on the weight matrix, distributing emissions to validators and miners, updating bonds, and refreshing metagraph metadata.

Epoch processing bridges per-block Alpha injection and UID-level reward distribution. Each block, run_coinbase injects TAO into subnet Alpha pools. At epoch, the accumulated Alpha is distributed across UIDs based on Yuma Consensus scores, writing per-UID emission amounts, updated consensus scores, and refreshed metagraph storage.

Triggers

  • (block_number + netuid + 1) % (tempo + 1) == 0 for a given subnet

Inputs (4)

ItemTypeRole
Tempo SubtensorModulestorageBlocks per epoch for this subnet
SubnetAlphaIn SubtensorModulestorageAlpha accumulated in subnet pool from per-block emission injection
LastMechansimStepBlock SubtensorModulestorageBlock number of last epoch for each subnet
BlocksSinceLastStep SubtensorModulestorageBlocks elapsed since previous epoch

Outputs (3)

ItemTypeRole
Emission SubtensorModulestoragePer-UID emission amounts for this epoch
LastMechansimStepBlock SubtensorModulestorageUpdated to current block
LastUpdate SubtensorModulestoragePer-UID last update block numbers

Source Files

pallets/subtensor/src/coinbase/block_step.rs
block_step()
pallets/subtensor/src/epoch/run_epoch.rs
epoch()

Formulas

Epoch Trigger

An epoch triggers per-subnet using a staggered formula so subnets do not all run on the same block.

should_run_epoch = (block_number + netuid + 1) % (tempo + 1) == 0
// netuid offset staggers epochs across subnets
blocks_since_last = block_number - last_mechanism_step_block

Per-Block Alpha Injection

Each block, run_coinbase injects TAO into subnet Alpha pools. At epoch, accumulated Alpha is distributed across UIDs.

// Each block: TAO injected into subnet pool via run_coinbase
SubnetTAO[subnet] += emission_share
SubnetAlphaIn[subnet] += minted_alpha
// At epoch: distribute accumulated alpha → per-UID amounts

Related Workflows

set-weights
Read the deep dive: Epoch Processing

Version History

v101 Initial epoch processing
v150 Tempo made configurable per subnet
v200 Sparse epoch mode for subnets with >256 UIDs
v290 Epoch emissions routed through Alpha pools
v350 Owner cut deducted before miner/validator split