From dafca7065ddec7bfeda53b1b7d7951556a82e0f2 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Tue, 4 Nov 2025 20:23:32 -0800 Subject: [PATCH 01/15] fix missing classifiers --- .github/workflows/e2e-subtensor-tests.yml | 7 ----- pyproject.toml | 34 ++++++++++++----------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yml b/.github/workflows/e2e-subtensor-tests.yml index 77568a1f4..6c71b18bb 100644 --- a/.github/workflows/e2e-subtensor-tests.yml +++ b/.github/workflows/e2e-subtensor-tests.yml @@ -84,12 +84,6 @@ jobs: with: python-version: 3.13 - - name: install dependencies - run: | - uv venv .venv - source .venv/bin/activate - uv pip install .[dev] - - name: Download Cached Docker Image uses: actions/download-artifact@v4 with: @@ -100,5 +94,4 @@ jobs: - name: Run tests run: | - source .venv/bin/activate uv run pytest ${{ matrix.test-file }} -s diff --git a/pyproject.toml b/pyproject.toml index 476479fe9..46a147878 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,22 @@ authors = [ license = { file = "LICENSE" } scripts = { btcli = "bittensor_cli.cli:main" } requires-python = ">=3.9,<3.15" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Utilities" +] dependencies = [ "wheel", "async-substrate-interface>=1.5.2", @@ -37,6 +53,8 @@ dependencies = [ cuda = [ "torch>=1.13.1,<3.0", ] + +[dependency-groups] dev = [ "pytest", "pytest-asyncio", @@ -48,22 +66,6 @@ dev = [ homepage = "https://github.com/opentensor/btcli" Repository = "https://github.com/opentensor/btcli" -[tool.flit.metadata] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Utilities" -] - [tool.setuptools] package-dir = {"bittensor_cli" = "bittensor_cli"} include-package-data = true From 2f75af0a29e6dea0c251927388e3f02913672cd4 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Tue, 4 Nov 2025 20:36:37 -0800 Subject: [PATCH 02/15] migrate to flit --- MANIFEST.in | 1 - pyproject.toml | 13 ++++--------- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 867b5bcef..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -recursive-include bittensor_cli/src/bittensor/templates * diff --git a/pyproject.toml b/pyproject.toml index 46a147878..ab96878aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=70.0.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["flit_core >=3.11,<4"] +build-backend = "flit_core.buildapi" [project] name = "bittensor-cli" @@ -10,13 +10,12 @@ readme = "README.md" authors = [ {name = "bittensor.com"} ] -license = { file = "LICENSE" } +license = "MIT" scripts = { btcli = "bittensor_cli.cli:main" } -requires-python = ">=3.9,<3.15" +requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -65,7 +64,3 @@ dev = [ # more details can be found here homepage = "https://github.com/opentensor/btcli" Repository = "https://github.com/opentensor/btcli" - -[tool.setuptools] -package-dir = {"bittensor_cli" = "bittensor_cli"} -include-package-data = true From ea2afea9dd9a3b8657b4e62446d4a10e09b3ab61 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 10 Nov 2025 20:28:52 +0200 Subject: [PATCH 03/15] Removes subvortex as the project is gone. --- bittensor_cli/cli.py | 2 +- bittensor_cli/src/__init__.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index ba7aa78b9..73e77736d 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -6135,7 +6135,7 @@ def subnets_price( self.verbosity_handler(quiet=quiet, verbose=verbose, json_output=json_output) subtensor = self.initialize_chain(network) - non_archives = ["finney", "latent-lite", "subvortex"] + non_archives = ["finney", "latent-lite"] if not current_only and subtensor.network in non_archives + [ Constants.network_map[x] for x in non_archives ]: diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index 04e7de999..cc27ad38a 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -9,7 +9,6 @@ class Constants: "finney", "test", "archive", - "subvortex", "rao", "dev", "latent-lite", @@ -17,13 +16,11 @@ class Constants: finney_entrypoint = "wss://entrypoint-finney.opentensor.ai:443" finney_test_entrypoint = "wss://test.finney.opentensor.ai:443" archive_entrypoint = "wss://archive.chain.opentensor.ai:443" - 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" - local_entrypoint = "ws://127.0.0.1:9944" latent_lite_entrypoint = "wss://lite.sub.latent.to:443" - lite_nodes = [finney_entrypoint, subvortex_entrypoint, latent_lite_entrypoint] + lite_nodes = [finney_entrypoint, latent_lite_entrypoint] network_map = { "finney": finney_entrypoint, "test": finney_test_entrypoint, @@ -32,7 +29,6 @@ class Constants: "dev": dev_entrypoint, "rao": rao_entrypoint, "latent-lite": latent_lite_entrypoint, - "subvortex": subvortex_entrypoint, } genesis_block_hash_map = { "finney": "0x2f0555cc76fc2840a25a6ea3b9637146806f1f44b090c175ffde2a7e5ab36c03", From de8d68db7faeda8635deff1ddf44a9ee5f83cf79 Mon Sep 17 00:00:00 2001 From: BANADDA Date: Sat, 15 Nov 2025 01:34:25 +0000 Subject: [PATCH 04/15] Fix table width visual bug in stake move command Add max_width constraints to all table columns in the stake move display to prevent the table from extending beyond terminal width. This fixes issue #516 where the table was too wide to display properly, especially on systems with narrower terminal windows. Changes: - Added max_width parameters to all 9 table columns - Constrained hotkey columns to 15 characters (already truncated in display) - Set reasonable widths for amount, rate, fee columns - Table now fits within standard terminal width (80-120 chars) Closes #516 --- bittensor_cli/src/commands/stake/move.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bittensor_cli/src/commands/stake/move.py b/bittensor_cli/src/commands/stake/move.py index 2b5d42a91..9c639231e 100644 --- a/bittensor_cli/src/commands/stake/move.py +++ b/bittensor_cli/src/commands/stake/move.py @@ -108,39 +108,43 @@ async def display_stake_movement_cross_subnets( ) table.add_column( - "origin netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"] + "origin netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"], max_width=14 ) table.add_column( - "origin hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"] + "origin hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"], max_width=15 ) table.add_column( - "dest netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"] + "dest netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"], max_width=12 ) table.add_column( - "dest hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"] + "dest hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"], max_width=15 ) table.add_column( f"amount ({Balance.get_unit(origin_netuid)})", justify="center", style=COLOR_PALETTE["STAKE"]["TAO"], + max_width=18, ) table.add_column( f"rate ({Balance.get_unit(destination_netuid)}/{Balance.get_unit(origin_netuid)})", justify="center", style=COLOR_PALETTE["POOLS"]["RATE"], + max_width=20, ) table.add_column( f"received ({Balance.get_unit(destination_netuid)})", justify="center", style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"], + max_width=18, ) table.add_column( f"Fee ({Balance.get_unit(origin_netuid)})", justify="center", style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"], + max_width=15, ) table.add_column( - "Extrinsic Fee (τ)", justify="center", style=COLOR_PALETTE.STAKE.TAO + "Extrinsic Fee (τ)", justify="center", style=COLOR_PALETTE.STAKE.TAO, max_width=18 ) table.add_row( From 7d8a7a27fcae9b11be463f051fb84cdb39563c95 Mon Sep 17 00:00:00 2001 From: khanhkhanhlele Date: Sat, 15 Nov 2025 10:00:29 +0700 Subject: [PATCH 05/15] Fix typos in some files --- bittensor_cli/src/commands/weights.py | 4 ++-- tests/e2e_tests/test_wallet_creations.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bittensor_cli/src/commands/weights.py b/bittensor_cli/src/commands/weights.py index b61bbd81f..4bccb28a7 100644 --- a/bittensor_cli/src/commands/weights.py +++ b/bittensor_cli/src/commands/weights.py @@ -226,13 +226,13 @@ async def reveal(self, weight_uids, weight_vals) -> tuple[bool, str, Optional[st return ( True, - "Successfully revealed previously commited weights hash.", + "Successfully revealed previously committed weights hash.", ext_id, ) else: # bittensor.logging.error( # msg=msg, - # prefix=f"Failed to reveal previously commited weights hash for salt: {salt}", + # prefix=f"Failed to reveal previously committed weights hash for salt: {salt}", # suffix="Failed: ", # ) return False, "Failed to reveal weights.", None diff --git a/tests/e2e_tests/test_wallet_creations.py b/tests/e2e_tests/test_wallet_creations.py index 1e7020671..bf613120e 100644 --- a/tests/e2e_tests/test_wallet_creations.py +++ b/tests/e2e_tests/test_wallet_creations.py @@ -328,7 +328,7 @@ def test_wallet_creations(wallet_setup): command="wallet", sub_command="list", extra_args=["--wallet-path", wallet_path] ) - # Verify hotkey "new_hotkey" is displyed with key + # Verify hotkey "new_hotkey" is displayed with key verify_key_pattern(result.stdout, "new_hotkey") # Physically verify "new_coldkey" and "new_hotkey" are present From 2bb11b196a2b86231b5ff47c2ec1067e265d91dd Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 13:44:40 +0200 Subject: [PATCH 06/15] Add type annotations, fix possible type errors --- .../src/bittensor/subtensor_interface.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index 304ad83e6..e6e930472 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -2103,7 +2103,7 @@ async def get_claimable_stakes_for_coldkey( if not stakes_info: return {} - root_stakes = {} + root_stakes: dict[str, Balance] = {} for stake_info in stakes_info: if stake_info.netuid == 0 and stake_info.stake.rao > 0: root_stakes[stake_info.hotkey_ss58] = stake_info.stake @@ -2149,8 +2149,8 @@ async def get_claimable_stakes_for_coldkey( self.substrate.query_multi(batch_claimed_calls, block_hash=block_hash), ) - claimable_rates = {} - claimed_amounts = {} + claimable_rates: dict[str, dict[int, float]] = {} + claimed_amounts: dict[tuple[str, int], Balance] = {} for idx, (_, result) in enumerate(batch_claimable): hotkey = unique_hotkeys[idx] if result: @@ -2166,12 +2166,17 @@ async def get_claimable_stakes_for_coldkey( # Calculate the claimable stake for each pair results = {} + already_claimed: Balance + net_claimable: Balance + rate: float + root_stake: Balance + claimable_stake: Balance for hotkey, netuid in target_pairs: root_stake = root_stakes[hotkey] - rate = claimable_rates[hotkey].get(netuid, 0) + rate = claimable_rates[hotkey].get(netuid, 0.0) claimable_stake = rate * root_stake - already_claimed = claimed_amounts.get((hotkey, netuid), 0) - net_claimable = max(claimable_stake - already_claimed, 0) + already_claimed = claimed_amounts.get((hotkey, netuid), Balance(0)) + net_claimable = max(claimable_stake - already_claimed, Balance(0)) if hotkey not in results: results[hotkey] = {} results[hotkey][netuid] = net_claimable.set_unit(netuid) From fe1be23ed5859ba9a87dcfc31284aafddecb2245 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 13:50:01 +0200 Subject: [PATCH 07/15] Use genesis address to verify not hotkey --- bittensor_cli/src/bittensor/extrinsics/transfer.py | 4 ++-- bittensor_cli/src/bittensor/subtensor_interface.py | 4 +++- bittensor_cli/src/commands/wallets.py | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bittensor_cli/src/bittensor/extrinsics/transfer.py b/bittensor_cli/src/bittensor/extrinsics/transfer.py index 6886fb41a..bc35372c0 100644 --- a/bittensor_cli/src/bittensor/extrinsics/transfer.py +++ b/bittensor_cli/src/bittensor/extrinsics/transfer.py @@ -7,7 +7,7 @@ from async_substrate_interface.errors import SubstrateRequestException from bittensor_cli.src.bittensor.balances import Balance -from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface +from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface, GENESIS_ADDRESS from bittensor_cli.src.bittensor.utils import ( console, err_console, @@ -173,7 +173,7 @@ async def do_transfer() -> tuple[bool, str, str, AsyncExtrinsicReceipt]: # Ask before moving on. if prompt: hk_owner = await subtensor.get_hotkey_owner(destination, check_exists=False) - if hk_owner and hk_owner != destination: + if hk_owner and hk_owner not in (destination, GENESIS_ADDRESS): if not Confirm.ask( f"The destination appears to be a hotkey, owned by [bright_magenta]{hk_owner}[/bright_magenta]. " f"Only proceed if you are absolutely sure that [bright_magenta]{destination}[/bright_magenta] is the " diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index e6e930472..6b44065dd 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -45,6 +45,8 @@ get_hotkey_pub_ss58, ) +GENESIS_ADDRESS = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM" + class ParamWithTypes(TypedDict): name: str # Name of the parameter. @@ -1116,7 +1118,7 @@ async def does_hotkey_exist( block_hash=block_hash, reuse_block_hash=reuse_block, ) - return_val = result != "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM" + return_val = result != GENESIS_ADDRESS return return_val async def get_hotkey_owner( diff --git a/bittensor_cli/src/commands/wallets.py b/bittensor_cli/src/commands/wallets.py index 6473f2c69..d25785849 100644 --- a/bittensor_cli/src/commands/wallets.py +++ b/bittensor_cli/src/commands/wallets.py @@ -30,7 +30,7 @@ ) from bittensor_cli.src.bittensor.extrinsics.transfer import transfer_extrinsic from bittensor_cli.src.bittensor.networking import int_to_ip -from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface +from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface, GENESIS_ADDRESS from bittensor_cli.src.bittensor.utils import ( RAO_PER_TAO, console, @@ -2263,7 +2263,7 @@ async def check_swap_status( ) if ( chain_reported_completion_block != 0 - and destination_address != "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM" + and destination_address != GENESIS_ADDRESS ): is_pending = True else: From 61aa92ef45dd821166d2dd8a3fa2238b76fff3da Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 13:50:08 +0200 Subject: [PATCH 08/15] Ruff --- bittensor_cli/src/bittensor/extrinsics/transfer.py | 5 ++++- bittensor_cli/src/commands/wallets.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bittensor_cli/src/bittensor/extrinsics/transfer.py b/bittensor_cli/src/bittensor/extrinsics/transfer.py index bc35372c0..6a7976d11 100644 --- a/bittensor_cli/src/bittensor/extrinsics/transfer.py +++ b/bittensor_cli/src/bittensor/extrinsics/transfer.py @@ -7,7 +7,10 @@ from async_substrate_interface.errors import SubstrateRequestException from bittensor_cli.src.bittensor.balances import Balance -from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface, GENESIS_ADDRESS +from bittensor_cli.src.bittensor.subtensor_interface import ( + SubtensorInterface, + GENESIS_ADDRESS, +) from bittensor_cli.src.bittensor.utils import ( console, err_console, diff --git a/bittensor_cli/src/commands/wallets.py b/bittensor_cli/src/commands/wallets.py index d25785849..4b42b40dd 100644 --- a/bittensor_cli/src/commands/wallets.py +++ b/bittensor_cli/src/commands/wallets.py @@ -30,7 +30,10 @@ ) from bittensor_cli.src.bittensor.extrinsics.transfer import transfer_extrinsic from bittensor_cli.src.bittensor.networking import int_to_ip -from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface, GENESIS_ADDRESS +from bittensor_cli.src.bittensor.subtensor_interface import ( + SubtensorInterface, + GENESIS_ADDRESS, +) from bittensor_cli.src.bittensor.utils import ( RAO_PER_TAO, console, @@ -2261,10 +2264,7 @@ async def check_swap_status( chain_reported_completion_block, destination_address = await subtensor.query( "SubtensorModule", "ColdkeySwapScheduled", [origin_ss58] ) - if ( - chain_reported_completion_block != 0 - and destination_address != GENESIS_ADDRESS - ): + if chain_reported_completion_block != 0 and destination_address != GENESIS_ADDRESS: is_pending = True else: is_pending = False From 76189b36e314ae40758814fe43a768c2a2858a9f Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 14:19:40 +0200 Subject: [PATCH 09/15] Name shadowing --- bittensor_cli/src/commands/stake/list.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bittensor_cli/src/commands/stake/list.py b/bittensor_cli/src/commands/stake/list.py index 148da59d7..ce4c8ff39 100644 --- a/bittensor_cli/src/commands/stake/list.py +++ b/bittensor_cli/src/commands/stake/list.py @@ -153,7 +153,7 @@ def define_table( def create_table( hotkey_: str, - substakes: list[StakeInfo], + substakes_: list[StakeInfo], claimable_amounts_: dict[str, dict[int, Balance]], ): name_ = ( @@ -164,9 +164,9 @@ def create_table( rows = [] total_tao_value_ = Balance(0) total_swapped_tao_value_ = Balance(0) - root_stakes = [s for s in substakes if s.netuid == 0] + root_stakes = [s for s in substakes_ if s.netuid == 0] other_stakes = sorted( - [s for s in substakes if s.netuid != 0], + [s for s in substakes_ if s.netuid != 0], key=lambda x: dynamic_info[x.netuid] .alpha_to_tao(Balance.from_rao(int(x.stake.rao)).set_unit(x.netuid)) .tao, From f0f7d4dd26c165b26bd8ec5e6057d00cee8e999b Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 14:21:55 +0200 Subject: [PATCH 10/15] Be more clear about the display of the totals in `st list` --- bittensor_cli/src/commands/stake/list.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bittensor_cli/src/commands/stake/list.py b/bittensor_cli/src/commands/stake/list.py index ce4c8ff39..b2407bab7 100644 --- a/bittensor_cli/src/commands/stake/list.py +++ b/bittensor_cli/src/commands/stake/list.py @@ -626,7 +626,7 @@ def format_cell( input() total_tao_value = ( - f"τ {millify_tao(all_hks_tao_value.tao)}" + f"τ {millify_tao(all_hks_tao_value.tao + balance.tao)}" if not verbose else all_hks_tao_value ) @@ -638,10 +638,14 @@ def format_cell( console.print("\n\n") console.print( f"Wallet:\n" - f" Coldkey SS58: [{COLOR_PALETTE['GENERAL']['COLDKEY']}]{coldkey_address}[/{COLOR_PALETTE['GENERAL']['COLDKEY']}]\n" - f" Free Balance: [{COLOR_PALETTE['GENERAL']['BALANCE']}]{balance}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]\n" - f" Total TAO Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]" - # f"\n Total TAO Swapped Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_swapped_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]" + f" Coldkey SS58: " + f"[{COLOR_PALETTE.G.CK}]{coldkey_address}[/{COLOR_PALETTE.G.CK}]\n" + f" Free Balance: " + f"[{COLOR_PALETTE.G.BALANCE}]{balance}[/{COLOR_PALETTE.G.BALANCE}]\n" + f" Total TAO Swapped Value ({Balance.unit}): " + f"[{COLOR_PALETTE.G.BALANCE}]{total_swapped_tao_value}[/{COLOR_PALETTE.G.BALANCE}]\n" + f" Total TAO Value (including free balance) ({Balance.unit}): " + f"[{COLOR_PALETTE.G.BALANCE}]{total_tao_value}[/{COLOR_PALETTE.G.BALANCE}]\n" ) dict_output["free_balance"] = balance.tao dict_output["total_tao_value"] = all_hks_tao_value.tao From 18073541bfd3511e02a9e16f365b87e24d857f0c Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 19:17:02 +0200 Subject: [PATCH 11/15] Turn off auto shutdown timer as we explicitly close the ws connection at the end of running cmds --- bittensor_cli/src/bittensor/subtensor_interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index 6b44065dd..054d67f7a 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -120,6 +120,7 @@ def __init__(self, network, use_disk_cache: bool = False): ss58_format=SS58_FORMAT, type_registry=TYPE_REGISTRY, chain_name="Bittensor", + ws_shutdown_timer=None, ) def __str__(self): From 3beed72158215b7c3161bc913a83e72b47f245fc Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 19:51:47 +0200 Subject: [PATCH 12/15] Ruff --- bittensor_cli/src/commands/stake/move.py | 25 +++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bittensor_cli/src/commands/stake/move.py b/bittensor_cli/src/commands/stake/move.py index 9c639231e..99a0b79ac 100644 --- a/bittensor_cli/src/commands/stake/move.py +++ b/bittensor_cli/src/commands/stake/move.py @@ -108,16 +108,28 @@ async def display_stake_movement_cross_subnets( ) table.add_column( - "origin netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"], max_width=14 + "origin netuid", + justify="center", + style=COLOR_PALETTE["GENERAL"]["SYMBOL"], + max_width=14, ) table.add_column( - "origin hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"], max_width=15 + "origin hotkey", + justify="center", + style=COLOR_PALETTE["GENERAL"]["HOTKEY"], + max_width=15, ) table.add_column( - "dest netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"], max_width=12 + "dest netuid", + justify="center", + style=COLOR_PALETTE["GENERAL"]["SYMBOL"], + max_width=12, ) table.add_column( - "dest hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"], max_width=15 + "dest hotkey", + justify="center", + style=COLOR_PALETTE["GENERAL"]["HOTKEY"], + max_width=15, ) table.add_column( f"amount ({Balance.get_unit(origin_netuid)})", @@ -144,7 +156,10 @@ async def display_stake_movement_cross_subnets( max_width=15, ) table.add_column( - "Extrinsic Fee (τ)", justify="center", style=COLOR_PALETTE.STAKE.TAO, max_width=18 + "Extrinsic Fee (τ)", + justify="center", + style=COLOR_PALETTE.STAKE.TAO, + max_width=18, ) table.add_row( From 051716d4730b942eb894db986ea1cadbee06dfa0 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 20:26:48 +0200 Subject: [PATCH 13/15] Changelog + version --- CHANGELOG.md | 20 ++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1dda876..4f0eaa7c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 9.15.3 /2025-11-17 + +## What's Changed +* fix missing classifiers, migrate to flit by @branchvincent in https://github.com/opentensor/btcli/pull/698 +* Removes subvortex as the project is gone. by @thewhaleking in https://github.com/opentensor/btcli/pull/708 +* Small Bug Fixes by @thewhaleking in https://github.com/opentensor/btcli/pull/712: + * Ensures that net_claimable is always a Balance object in get_claimable_stakes_for_coldkey + * Checks that the HK owner isn't the genesis address + * Clearly show the totals in st list as representing staked vs total incl free + * Prevents a race condition which could freeze the console for extrinsic submission +* docs: fix typos in some files by @Edge-Seven in https://github.com/opentensor/btcli/pull/711 +* Fix table width visual bug in stake move command by @BANADDA in https://github.com/opentensor/btcli/pull/709 + +## New Contributors +* @branchvincent made their first contribution in https://github.com/opentensor/btcli/pull/698 +* @Edge-Seven made their first contribution in https://github.com/opentensor/btcli/pull/711 +* @BANADDA made their first contribution in https://github.com/opentensor/btcli/pull/709 + +**Full Changelog**: https://github.com/opentensor/btcli/compare/v9.15.2...v9.15.3 + ## 9.15.2 /2025-11-05 ## What's Changed diff --git a/pyproject.toml b/pyproject.toml index 42b56f19a..9eefb8d4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "bittensor-cli" -version = "9.15.2" +version = "9.15.3" description = "Bittensor CLI" readme = "README.md" authors = [ From 34ea4d1028817e987513eb78ac6ba6e76348b2be Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 17 Nov 2025 10:55:28 -0800 Subject: [PATCH 14/15] decode acc id --- bittensor_cli/src/commands/wallets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bittensor_cli/src/commands/wallets.py b/bittensor_cli/src/commands/wallets.py index 4b42b40dd..a0cb24ceb 100644 --- a/bittensor_cli/src/commands/wallets.py +++ b/bittensor_cli/src/commands/wallets.py @@ -2264,6 +2264,7 @@ async def check_swap_status( chain_reported_completion_block, destination_address = await subtensor.query( "SubtensorModule", "ColdkeySwapScheduled", [origin_ss58] ) + destination_address = decode_account_id(destination_address[0]) if chain_reported_completion_block != 0 and destination_address != GENESIS_ADDRESS: is_pending = True else: From 8a9bd98bf52ca9f48c1a88133c57228b81c37fbe Mon Sep 17 00:00:00 2001 From: bdhimes Date: Mon, 17 Nov 2025 21:11:06 +0200 Subject: [PATCH 15/15] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f0eaa7c3..2447096f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * Prevents a race condition which could freeze the console for extrinsic submission * docs: fix typos in some files by @Edge-Seven in https://github.com/opentensor/btcli/pull/711 * Fix table width visual bug in stake move command by @BANADDA in https://github.com/opentensor/btcli/pull/709 +* Fix: Decode account id in `btcli swap-check` by @ibraheem-abe in https://github.com/opentensor/btcli/pull/714 ## New Contributors * @branchvincent made their first contribution in https://github.com/opentensor/btcli/pull/698