Skip to content

Sub-Subnets #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Sub-Subnets #18

wants to merge 1 commit into from

Conversation

gztensor
Copy link
Collaborator

Subsubnet Support: Multi-Weight Spaces per Subnet

This PR introduces subsubnets, a new abstraction layer within subnets that enables multiple independent weight spaces, incentive flows, and emission configurations within the same subnet. Each subnet can define up to 8 subsubnets (IDs 0–7), allowing complex multi-task validation while maintaining validator cohesion.

Key Features:

  • Per-subsubnet weight setting, commitment, and emission logic
  • Fully backward-compatible with legacy miners and validators (via subsubnet_id = 0)
  • Automatic cleanup of weights when subsubnet limits are reduced
  • Configurable emission proportions (default: Fibonacci distribution)
  • Independent calculation of trust, consensus, and incentives per subsubnet
  • Strict write permissions enforced for subnet owners and sudo only

Governance Capabilities:

  • Subnet owners can configure desired subsubnet limits and emission proportions
  • Global subsubnet limit caps usage across all subnets and triggers cleanup when reduced
  • Validator-majority (kappa) support for voting on incentive distribution logic

Purpose:
This functionality enables richer subnet behavior, supports multi-objective tasks, and introduces a scalable framework for task-specific mining without increasing subnet count.

Refer to the linked BIT and test plan for detailed specification and test coverage.

### Subsubnet Limits
- Each subnet defines a `desired_subsubnet_limit` hyperparameter (default = 1).
- A global limit `global_subsubnet_limit_per_subnet` acts as a ceiling.
- The active value `subsubnet_limit_in_force` is updated every subnet superblock (every 20 tempos) as:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both the speed of increase and the speed of decrease should be limited

@ppolewicz
Copy link
Collaborator

The emission should by default use reverse fibonnaci, not fibonnaci, so that the subsubnet with the highest emission has the lowest id, so that if the governor needs to decrease the global limit in an emergency (however unlikely it is), the highest emission subsubnets prevail. In a future version when we'll have configurable subsubnet emission proportion, the emission proportion should be sorted in decreasing order for the same reason.

@ppolewicz
Copy link
Collaborator

I propose the limit imposed by the governor for a given subnet to be calculated as max(1, math.floor(global_subsubnet_per_subnet_limit * (256/max_uids)), so that for sn1 it'll shrink by a factor of 4

@ppolewicz
Copy link
Collaborator

In v1 the number of knowledge commitments should not scale with subsubnets, but in a future version it totally should.
The knowledge commitment system already supports multiple slots, so far we've just used slot zero. When effective subsubnet limit decreases, the knowledge commitments with ids higher than the maximum currently supported should be wiped out.

@ppolewicz
Copy link
Collaborator

A possible future extension, idea of @adriansmares: allow miners to set separate neurons for each subsubnet

@ppolewicz
Copy link
Collaborator

For serious consideration of including in scope of the first version, an idea by Fish is to make the pruning score proportional to the subsubnet emission, so that the miner second-in-terms-of-emission on the lowest emission subsubnet may be (if he's close enough to the best miner in that subsubnet) deregistered after a second-in-terms-of-emission miner in the highest emission subsubnet, if that one is not close enough to the top one in his subsubnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants