Skip to content

Conversation

@basfroman
Copy link
Collaborator

@basfroman basfroman commented Nov 21, 2025

Context

The Root Claim Upgrade introduces a new KeepSubnets variant to the RootClaimTypeEnum, allowing coldkeys to specify a list of subnets for which alpha emissions are kept, while all other subnets automatically swap alpha for TAO. This implementation provides both synchronous and asynchronous interfaces for all root claim operations, following the established SDK patterns and architecture.

Subtensor PR: opentensor/subtensor#2218 (need to be merged to devnet-ready)


Updated Extrinsics

  • set_root_claim_type_extrinsic - Updated to support the new KeepSubnets variant with flexible input formats (dict, callable, or enum)

Subtensor Methods

Updated Methods

  • get_root_claim_type
  • set_root_claim_type

New Methods

  • get_root_alpha_dividends_per_subnet

Chain Data Classes

RootClaimType Enum (bittensor/core/chain_data/root_claim.py)

A new RootClaimType enum extends the existing root claim types:

  • Swap - Swap any alpha emission for TAO (default on chain)
  • Keep - Keep all alpha emission
  • KeepSubnets - Keep alpha emission for specified subnets, swap everything else

The KeepSubnets variant uses a descriptor pattern (KeepSubnetsDescriptor) that allows both callable syntax (RootClaimType.KeepSubnets([1, 2, 3])) and dictionary format ({"KeepSubnets": {"subnets": [1, 2, 3]}}).

Testing

  • E2E Tests: Complete end-to-end test suite covering:
    • Basic KeepSubnets functionality
    • KeepSubnets with auto-claims enabled
    • Multiple subnets with selective keeping/swapping
    • Direct get_root_alpha_dividends_per_subnet queries
    • Validation and format testing (dict, callable, invalid inputs)
    • All existing root claim scenarios (Swap, Keep with/without auto-claims)
image

@basfroman basfroman requested a review from a team November 21, 2025 17:34
@basfroman basfroman self-assigned this Nov 21, 2025
@basfroman basfroman added feature new feature added do not merge labels Nov 21, 2025
@basfroman basfroman mentioned this pull request Nov 21, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge feature new feature added

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants