From 86786e22211e2a0df8071c785bcb1943a50a4d8c Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 16:50:57 -0800 Subject: [PATCH 1/7] Bumps version and changeloig --- CHANGELOG.md | 11 +++++++++++ bittensor_cli/__init__.py | 2 +- bittensor_cli/cli.py | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3af5badae..528bebfe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # 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 + +**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..17466e5e4 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) From 1400bf1a869bf6f2cc0eab44c883634950c89762 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 17:09:21 -0800 Subject: [PATCH 2/7] fix devnet entrypoint --- bittensor_cli/src/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { From 6b7042e075e6695c5cddab60ec06cce45be2cd04 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 17:20:32 -0800 Subject: [PATCH 3/7] Disable metagraph config --- bittensor_cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 17466e5e4..0810152d2 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -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( From a8171ac29ea70b92f7730261ac5af780316e5b80 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 17:34:18 -0800 Subject: [PATCH 4/7] updates st list live --- bittensor_cli/src/commands/stake/list.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bittensor_cli/src/commands/stake/list.py b/bittensor_cli/src/commands/stake/list.py index 9ee7a2fb1..f89b56d47 100644 --- a/bittensor_cli/src/commands/stake/list.py +++ b/bittensor_cli/src/commands/stake/list.py @@ -319,7 +319,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 @@ -376,15 +376,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( From 2262f48ae30e2664e53278c67077f2748ceb6f18 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 18:32:31 -0800 Subject: [PATCH 5/7] updates live view stake list --- bittensor_cli/src/commands/stake/list.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bittensor_cli/src/commands/stake/list.py b/bittensor_cli/src/commands/stake/list.py index f89b56d47..47fc2dfc2 100644 --- a/bittensor_cli/src/commands/stake/list.py +++ b/bittensor_cli/src/commands/stake/list.py @@ -45,7 +45,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} @@ -434,11 +434,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. @@ -527,7 +528,7 @@ def format_cell( table, current_data = create_live_table( selected_stakes, registered_delegate_info, - dynamic_info, + dynamic_info_, hotkey_name, previous_data, ) From d64bd8ffc69fa19598c344660cdd96b622872d68 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 18:32:59 -0800 Subject: [PATCH 6/7] Updates changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528bebfe4..4ee709887 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * 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 From d0c37453ee1ad74e16876ba4eb0b932ba660fc64 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 13 Feb 2025 18:46:54 -0800 Subject: [PATCH 7/7] Updates tempo calc --- bittensor_cli/src/commands/subnets/subnets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)