Hyperparameters

max_regs_per_block

Maximum neuron registrations accepted on a subnet in a single block.

View as Markdown

max_regs_per_block caps how many neurons can register on a subnet within one 12-second block. It is a burst limiter: even when the burn cost is low and demand spikes, at most this many UIDs can turn over per block, which protects existing neurons from being pruned en masse in a single block. Anyone scripting registrations should expect rejections beyond the cap; root/governance sets it, with a mainnet default of 1 (SubtensorInitialMaxRegistrationsPerBlock in runtime/src/lib.rs).

How it works

Each successful registration increments the RegistrationsThisBlock counter (do_register, step 11, in pallets/subtensor/src/subnets/registration.rs), and the counter is reset to zero every block by update_registration_prices_for_networks (same file), which runs in on_initialize.

The cap is checked against that counter in two places:

  • Root registration: do_root_register (pallets/subtensor/src/coinbase/root.rs) fails with TooManyRegistrationsThisBlock when the block's registrations reach get_max_registrations_per_block, and additionally caps the interval at 3 × target_regs_per_interval.
  • The registration validity helper checked_allowed_register (pallets/subtensor/src/lib.rs) reports a subnet as closed for the block once the counter reaches the cap, alongside the registration_allowed gate and the same 3 × target interval cap.

Because the burn cost also bumps multiplicatively after every registration in a block (burn_increase_mult), the price and the cap work together against registration floods.

Drag the cap below to see how it slices bursts block by block:

Per-block registration cap

Each successful registration bumps the RegistrationsThisBlock counter; on_initialize resets it to zero next block. Once the counter reaches max_regs_per_block, further attempts in that block fail with TooManyRegistrationsThisBlock (do_root_register in coinbase/root.rs; checked_allowed_register reports the subnet closed for the rest of the block). The dark portion of each bar is what got in; the pale portion overflowed the cap.

Accepted across 12 blocks

23

at most 3 per block, however hot demand runs

Rejected this window

19

TooManyRegistrationsThisBlock; callers can retry next block

Blocks that hit the cap

4 of 12

counter resets to 0 every block, so bursts spread out instead of flooding

3
×1

Reading and setting

btcli sudo get --netuid N --name max_regs_per_block

Root/governance only: sudo_set_max_registrations_per_block in the AdminUtils pallet requires the root origin and takes a plain integer (u16). It is not settable by the subnet owner via btcli sudo set.

registration_allowed · target_regs_per_interval · immunity_period · max_allowed_uids · burn_increase_mult · min_burn