-
Notifications
You must be signed in to change notification settings - Fork 335
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
Cannot get correct information for Bittensor validator #2564
Labels
bug
Something isn't working
Comments
I found one more issue.
So I'm confused why hotkey is shown as registered when it doesn't have hotkey registered. |
Riccardo-RG
added a commit
to Riccardo-RG/bittensor
that referenced
this issue
Jan 3, 2025
Fixes opentensor#2564 Fix the issue with `bt_decode.DelegateInfo.decode_vec` in `bittensor/core/chain_data/delegate_info.py` to handle the decoding of `vec_u8` correctly. * Add a new method `from_vec_u8` to decode `vec_u8` and return a `DelegateInfo` object. * Update the `list_from_vec_u8` method to correctly decode `vec_u8` and return a list of `DelegateInfo` objects. * Ensure that `total_daily_return` and `return_per_1000` are correctly decoded and returned. Update `bittensor/core/chain_data/delegate_info_lite.py` to handle type conversions and ensure correct data types. * Add a new method `from_raw_data` to create a `DelegateInfoLite` instance from raw data with proper type conversions. * Ensure that `registrations` and `validator_permits` are lists of integers. * Ensure that `take` is rounded to 6 decimal places and `nominators`, `return_per_1000`, and `total_daily_return` are integers. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/opentensor/bittensor/issues/2564?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I try to get info about validator. Most of the fields get correct info, but not all of them.
I use
get_delegate_by_hotkey
method for whichreturn_per_1000
andtotal_daily_return
options return either 0 values or incorrect ones.I tried to use
get_delegates
method as well, but it look like there is an issue with code in your library arounddecoded = bt_decode.DelegateInfo.decode_vec(vec_u8)
incore/chain_data/delegate_info.py
So both methods either don't work or return incorrect info. Please fix or provide any other way.
Thanks in advance!
To Reproduce
WAY 1:
WAY 2:
Expected behavior
I get correct values for validator daily return and return per 1000 TAO.
Screenshots
No response
Environment
Bittensor python package 8.5.1
Additional context
No response
The text was updated successfully, but these errors were encountered: