diff --git a/CHANGELOG.md b/CHANGELOG.md index 3af5badae..4ee709887 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 9.0.1 /2025-02-13 + +## What's Changed +* Fixes root tempo being 0 by @ibraheem-opentensor in https://github.com/opentensor/btcli/pull/312 +* Backmerge main to staging 900 by @ibraheem-opentensor in https://github.com/opentensor/btcli/pull/313 +* Fixes fmt err msg by @ibraheem-opentensor in https://github.com/opentensor/btcli/pull/314 +* Adds subnet identities set/get by @ibraheem-opentensor in https://github.com/opentensor/btcli/pull/316 +* Fix return type annotation for `alpha_to_tao_with_slippage` by @thewhaleking in https://github.com/opentensor/btcli/pull/311 +* Updates live view of btcli stake list + +**Full Changelog**: https://github.com/opentensor/btcli/compare/v9.0.0...v9.0.1 + ## 9.0.0 /2025-02-13 ## What's Changed diff --git a/bittensor_cli/__init__.py b/bittensor_cli/__init__.py index 55ce167e0..7b21ec4e8 100644 --- a/bittensor_cli/__init__.py +++ b/bittensor_cli/__init__.py @@ -18,6 +18,6 @@ from .cli import CLIManager -__version__ = "9.0.0" +__version__ = "9.0.1" __all__ = ["CLIManager", "__version__"] diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 0de749e2c..0810152d2 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -72,7 +72,7 @@ class GitError(Exception): pass -__version__ = "9.0.0" +__version__ = "9.0.1" _core_version = re.match(r"^\d+\.\d+\.\d+", __version__).group(0) @@ -656,7 +656,7 @@ def __init__(self): self.config_app.command("set")(self.set_config) self.config_app.command("get")(self.get_config) self.config_app.command("clear")(self.del_config) - self.config_app.command("metagraph", hidden=True)(self.metagraph_config) + # self.config_app.command("metagraph", hidden=True)(self.metagraph_config) # wallet commands self.wallet_app.command( diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index c9bda86cf..0a6d09a3a 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -20,7 +20,7 @@ class Constants: subvortex_entrypoint = "ws://subvortex.info:9944" local_entrypoint = "ws://127.0.0.1:9944" rao_entrypoint = "wss://rao.chain.opentensor.ai:443" - dev_entrypoint = "wss://dev.chain.opentensor.ai:443 " + dev_entrypoint = "wss://dev.chain.opentensor.ai:443" local_entrypoint = "ws://127.0.0.1:9944" latent_lite_entrypoint = "wss://lite.sub.latent.to:443" network_map = { diff --git a/bittensor_cli/src/commands/stake/list.py b/bittensor_cli/src/commands/stake/list.py index 2545725ec..6c2feff6c 100644 --- a/bittensor_cli/src/commands/stake/list.py +++ b/bittensor_cli/src/commands/stake/list.py @@ -46,7 +46,7 @@ async def get_stake_data(block_hash: str = None): coldkey_ss58=coldkey_address, block_hash=block_hash ), subtensor.get_delegate_identities(block_hash=block_hash), - subtensor.all_subnets(), + subtensor.all_subnets(block_hash=block_hash), ) # sub_stakes = substakes[coldkey_address] dynamic_info = {info.netuid: info for info in _dynamic_info} @@ -327,7 +327,7 @@ def format_cell( alpha_value = Balance.from_rao(int(substake.stake.rao)).set_unit(netuid) tao_value = pool.alpha_to_tao(alpha_value) total_tao_value += tao_value - swapped_tao_value, slippage = pool.alpha_to_tao_with_slippage( + swapped_tao_value, slippage, slippage_pct = pool.alpha_to_tao_with_slippage( substake.stake ) total_swapped_tao_value += swapped_tao_value @@ -385,15 +385,6 @@ def format_cell( millify=True if not verbose else False, ) - if pool.is_dynamic: - slippage_pct = ( - 100 * float(slippage) / float(slippage + swapped_tao_value) - if slippage + swapped_tao_value != 0 - else 0 - ) - else: - slippage_pct = 0 - if netuid != 0: swap_cell = ( format_cell( @@ -463,11 +454,12 @@ def format_cell( return table, current_data # Main execution + block_hash = await subtensor.substrate.get_chain_head() ( sub_stakes, registered_delegate_info, dynamic_info, - ) = await get_stake_data() + ) = await get_stake_data(block_hash) balance = await subtensor.get_balance(coldkey_address) # Iterate over substakes and aggregate them by hotkey. @@ -556,7 +548,7 @@ def format_cell( table, current_data = create_live_table( selected_stakes, registered_delegate_info, - dynamic_info, + dynamic_info_, hotkey_name, previous_data, ) diff --git a/bittensor_cli/src/commands/subnets/subnets.py b/bittensor_cli/src/commands/subnets/subnets.py index e5d397e0f..d71d726f8 100644 --- a/bittensor_cli/src/commands/subnets/subnets.py +++ b/bittensor_cli/src/commands/subnets/subnets.py @@ -890,7 +890,7 @@ async def show_root(): for netuid_ in range(len(all_subnets)): subnet = all_subnets[netuid_] emission_on_subnet = ( - root_state.emission_history[netuid_][idx] / subnet.tempo + root_state.emission_history[netuid_][idx] / (subnet.tempo or 1) ) total_emission_per_block += subnet.alpha_to_tao( Balance.from_rao(emission_on_subnet)