Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
The Root Claim Upgrade introduces a new
KeepSubnetsvariant to theRootClaimTypeEnum, 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 newKeepSubnetsvariant with flexible input formats (dict, callable, or enum)Subtensor Methods
Updated Methods
get_root_claim_typeset_root_claim_typeNew Methods
get_root_alpha_dividends_per_subnetChain Data Classes
RootClaimType Enum (
bittensor/core/chain_data/root_claim.py)A new
RootClaimTypeenum extends the existing root claim types:Swap- Swap any alpha emission for TAO (default on chain)Keep- Keep all alpha emissionKeepSubnets- Keep alpha emission for specified subnets, swap everything elseThe
KeepSubnetsvariant uses a descriptor pattern (KeepSubnetsDescriptor) that allows both callable syntax (RootClaimType.KeepSubnets([1, 2, 3])) and dictionary format ({"KeepSubnets": {"subnets": [1, 2, 3]}}).Testing
KeepSubnetsfunctionalityKeepSubnetswith auto-claims enabledget_root_alpha_dividends_per_subnetqueries