Skip to content

Feat/root claim#692

Merged
ibraheem-abe merged 46 commits intostagingfrom
feat/root-claim
Nov 4, 2025
Merged

Feat/root claim#692
ibraheem-abe merged 46 commits intostagingfrom
feat/root-claim

Conversation

@ibraheem-abe
Copy link
Collaborator

Root stake claim support

New commands

1. btcli stake set-claim or btcli stake claim

Important

Displays existing claim settings and allows you to update it
In the future, this command will allow to set claim types per netuid when support is added to the chain

image

2. btcli stake process-claim

Important

Allows users to manually process their unclaimed emissions for an extrinsic fee
A maximum of 5 netuids can be processed at a time

image

Enhancements to existing commands

3. btcli subnet metagraph --netuid 0

Important

Displays current claim type for all validators on root

image

4. btcli subnet metagraph --netuid 14

Important

Displays current claim type for neuron participants in a subnet.
Only neurons who have stake on root will have their claim type

image

5. btcli stake list

Important

Now displays claimable amount for each subnet as a new column

image

5. btcli stake list --live

Important

Also supports showing claimable stake in live version

image

@ibraheem-abe ibraheem-abe changed the base branch from main to staging November 1, 2025 01:59
@ibraheem-abe ibraheem-abe requested a review from a team November 1, 2025 03:05
@ibraheem-abe ibraheem-abe added the enhancement New feature or request label Nov 1, 2025
basfroman
basfroman previously approved these changes Nov 3, 2025
thewhaleking
thewhaleking previously approved these changes Nov 4, 2025

if result is None:
return "Swap"
return next(iter(result.keys()))
Copy link
Contributor

Choose a reason for hiding this comment

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

This can never have more than one entry, or is this one of those dumb scenarios where we get back like {"Swap": ()} from subtensor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yess we get it back like {'Keep': ()}

Comment on lines +909 to +922
block_hash = await subtensor.substrate.get_chain_head()
(
all_subnets,
root_state,
identities,
old_identities,
root_claim_types,
) = await asyncio.gather(
subtensor.all_subnets(block_hash=block_hash),
subtensor.get_subnet_state(netuid=0, block_hash=block_hash),
subtensor.query_all_identities(block_hash=block_hash),
subtensor.get_delegate_identities(block_hash=block_hash),
subtensor.get_all_coldkeys_claim_type(block_hash=block_hash),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Damn I love asyncio

@thewhaleking
Copy link
Contributor

Would prefer if we had a test.

@ibraheem-abe ibraheem-abe dismissed stale reviews from thewhaleking and basfroman via 4318006 November 4, 2025 23:06
@ibraheem-abe
Copy link
Collaborator Author

Agreed agreed - will add tests in another PR in favour of rolling this out fast

@ibraheem-abe ibraheem-abe merged commit 8799b9e into staging Nov 4, 2025
67 checks passed
@ibraheem-abe ibraheem-abe deleted the feat/root-claim branch November 4, 2025 23:34
@ibraheem-abe ibraheem-abe mentioned this pull request Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants