Skip to content

Conversation

mvds00
Copy link

@mvds00 mvds00 commented Jan 27, 2025

RFC: runtime_browser

This code exposes runtime storage items, constants and APIs as if they are mirrored in Python. It is intended to simplify and reduce code, and to close the current gap between subtensor code and bittensor code. As it is based on metadata, it exposes past, current and future runtime items.

E.g. the subnet owner map can be queried using only:

        import bittensor as bt
        bt.runtime.SubtensorModule.SubnetOwner[1]

test_runtime_browser.py contains various examples that demonstrate the proposed concept.

The impact on bittensor is negligible, as it is implemented as a fully separate module.

TODO: write proper PR, format code, etc. - this is just to share the WIP, and have a discussion about the concept and direction to (not) take it.

µ added 2 commits January 27, 2025 00:09
This code exposes runtime storage items, constants and APIs as if they
are mirrored in Python. It is intended to simplify and reduce code, and
to close the current gap between subtensor code and bittensor code. As
it is based on metadata, it exposes past, current and future runtime
items.

E.g. the subnet owner map can be queried using only:

    import bittensor as bt
    bt.runtime.SubtensorModule.SubnetOwner[1]

test_runtime_browser.py contains various examples that demonstrate the
proposed concept.

The impact on bittensor is negligible, as it is implemented as a fully
separate module.
@basfroman
Copy link
Collaborator

Hey @mvds00, do you still work on it or we can close this PR?

@thewhaleking
Copy link
Contributor

We should build on top of this. I think it's a good idea to include in bittensor v10.

@mvds00
Copy link
Author

mvds00 commented Sep 4, 2025

We should build on top of this. I think it's a good idea to include in bittensor v10.

Could you check within the developer group if this has a realistic chance of making it to v10? If so, I would be more than happy to put in the effort to make this up to date.

@basfroman
Copy link
Collaborator

We should build on top of this. I think it's a good idea to include in bittensor v10.

Could you check within the developer group if this has a realistic chance of making it to v10? If so, I would be more than happy to put in the effort to make this up to date.

This is the branch SDKv10 in which I am currently cooking SDKv10. You can put in the effort and add your RuntimeBrowser logic as a separate layer. Look at how I implemented SubtensorApi.

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.

3 participants