opentensor / subtensor

Bittensor Blockchain Layer
The Unlicense
159 stars 158 forks source link

Inconsistent stake numbers across RPCs #879

Open gztensor opened 3 weeks ago

gztensor commented 3 weeks ago

NeuronInfo RPC currently reports stake values like follows:

NeuronInfoLite(hotkey='5DfZR9qRhv2C7JT2fxJ2dLUX1QPZYQwwA5D3NGGUBW3RLsXW', coldkey='5CvaAT12X8nJBczNDm6QoqFgDrsWhtzkr4F5wdnD8yYz326C', uid=0, netuid=2, active=True, stake=τ 34.8542, stake_dict={'5CvaAT12X8nJBczNDm6QoqFgDrsWhtzkr4F5wdnD8yYz326C': τ 34.8542}, total_stake=τ 34.8542, rank=0.0, emission=28.210070956, incentive=0.0, consensus=0.0, trust=0.0, validator_trust=0.0, dividends=0.0, last_update=181, validator_permit=True, prometheus_info=PrometheusInfo(block=0, version=0, ip='0.0.0.0', port=0, ip_type=0), axon_info=AxonInfo(version=0, ip='0.0.0.0', port=0, ip_type=0, hotkey='5DfZR9qRhv2C7JT2fxJ2dLUX1QPZYQwwA5D3NGGUBW3RLsXW', coldkey='5CvaAT12X8nJBczNDm6QoqFgDrsWhtzkr4F5wdnD8yYz326C', protocol=0, placeholder1=0, placeholder2=0), pruning_score=65535, is_null=False)

which is inconsistent with StakeInfo RPC. This can be reproduced with btcli by running:

btcli st list
btcli w balance
btcli w inspect

Image Image Image

ales-otf commented 2 weeks ago

During working on this task a bug was discovered, in which NeuronInfoLite::stake had Stake value, while NeuronInfo::stake had StakeWeight. It was discussed with @camfairchild and NeuronInfoLite::stake has been changed to StakeWeight too. The PR was created for this: https://github.com/opentensor/subtensor/pull/896

But as NeuronInfoLite::stake now StakeWeight another issue happens.