bittensor-cli 9.18.0__tar.gz → 9.18.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/PKG-INFO +14 -2
  2. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/README.md +12 -0
  3. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/cli.py +16 -6
  4. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/create.py +2 -2
  5. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/add.py +3 -2
  6. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/claim.py +4 -3
  7. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/move.py +2 -6
  8. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/remove.py +7 -6
  9. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/subnets/subnets.py +1 -1
  10. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/pyproject.toml +2 -2
  11. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/__init__.py +0 -0
  12. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/doc_generation_helper.py +0 -0
  13. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/__init__.py +0 -0
  14. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/__init__.py +0 -0
  15. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/balances.py +0 -0
  16. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/chain_data.py +0 -0
  17. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
  18. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/mev_shield.py +0 -0
  19. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/registration.py +0 -0
  20. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/root.py +0 -0
  21. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/serving.py +0 -0
  22. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/extrinsics/transfer.py +0 -0
  23. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/minigraph.py +0 -0
  24. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/networking.py +0 -0
  25. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/subtensor_interface.py +0 -0
  26. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/main-filters.j2 +0 -0
  27. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/main-header.j2 +0 -0
  28. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/neuron-details.j2 +0 -0
  29. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/price-multi.j2 +0 -0
  30. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/price-single.j2 +0 -0
  31. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/subnet-details-header.j2 +0 -0
  32. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/subnet-details.j2 +0 -0
  33. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/subnet-metrics.j2 +0 -0
  34. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/subnets-table.j2 +0 -0
  35. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/table.j2 +0 -0
  36. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/view.css +0 -0
  37. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/view.j2 +0 -0
  38. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/templates/view.js +0 -0
  39. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/bittensor/utils.py +0 -0
  40. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/__init__.py +0 -0
  41. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/axon/__init__.py +0 -0
  42. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/axon/axon.py +0 -0
  43. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/__init__.py +0 -0
  44. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/contribute.py +0 -0
  45. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/contributors.py +0 -0
  46. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/dissolve.py +0 -0
  47. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/refund.py +0 -0
  48. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/update.py +0 -0
  49. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/utils.py +0 -0
  50. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/crowd/view.py +0 -0
  51. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/liquidity/__init__.py +0 -0
  52. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/liquidity/liquidity.py +0 -0
  53. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/liquidity/utils.py +0 -0
  54. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/proxy.py +0 -0
  55. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/__init__.py +0 -0
  56. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/auto_staking.py +0 -0
  57. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/children_hotkeys.py +0 -0
  58. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/list.py +0 -0
  59. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/stake/wizard.py +0 -0
  60. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/subnets/__init__.py +0 -0
  61. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/subnets/mechanisms.py +0 -0
  62. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/subnets/price.py +0 -0
  63. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/sudo.py +0 -0
  64. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/view.py +0 -0
  65. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/wallets.py +0 -0
  66. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/src/commands/weights.py +0 -0
  67. {bittensor_cli-9.18.0 → bittensor_cli-9.18.2}/bittensor_cli/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bittensor-cli
3
- Version: 9.18.0
3
+ Version: 9.18.2
4
4
  Summary: Bittensor CLI
5
5
  Author: bittensor.com
6
6
  Requires-Python: >=3.9
@@ -33,7 +33,7 @@ Requires-Dist: PyYAML~=6.0
33
33
  Requires-Dist: rich>=13.7,<15.0
34
34
  Requires-Dist: scalecodec==1.2.12
35
35
  Requires-Dist: typer>=0.16
36
- Requires-Dist: bittensor-wallet>=4.0.0
36
+ Requires-Dist: bittensor-wallet==4.0.2
37
37
  Requires-Dist: packaging
38
38
  Requires-Dist: plotille>=5.0.0
39
39
  Requires-Dist: plotly>=6.0.0
@@ -223,6 +223,12 @@ calls (such as block number to block hash mapping), which can speed up subsequen
223
223
  ---
224
224
 
225
225
  ## Debugging
226
+ If a command is failing with an odd error, you can usually rerun the command with `--verbose` for a more detailed output
227
+ of any errors/exceptions that occur. This should be done prior to reporting the issue, as it helps us substantially in
228
+ determining the root cause of issues.
229
+
230
+ Additionally, you can pull a debug log.
231
+
226
232
  BTCLI will store a debug log for every command run. This file is overwritten for each new command run. The default location
227
233
  of this file is `~/.bittensor/debug.txt` and can be set with the `BTCLI_DEBUG_FILE` env var (see above section).
228
234
 
@@ -235,6 +241,12 @@ and set the save file location. We recommend doing this first before anything, a
235
241
  us on our [Discord](https://discord.gg/bittensor), or by opening an issue on [GitHub](https://github.com/opentensor/btcli/issues/new)
236
242
  (where you can also upload your debug file).
237
243
 
244
+
245
+ Steps:
246
+ 1. Re-run the command with `--verbose` at the end, e.g. `btcli st remove --verbose`
247
+ 2. Run `btcli --debug` to save the debug log
248
+ 3. Report the issue on GitHub or Discord
249
+
238
250
  ---
239
251
 
240
252
  ## License
@@ -179,6 +179,12 @@ calls (such as block number to block hash mapping), which can speed up subsequen
179
179
  ---
180
180
 
181
181
  ## Debugging
182
+ If a command is failing with an odd error, you can usually rerun the command with `--verbose` for a more detailed output
183
+ of any errors/exceptions that occur. This should be done prior to reporting the issue, as it helps us substantially in
184
+ determining the root cause of issues.
185
+
186
+ Additionally, you can pull a debug log.
187
+
182
188
  BTCLI will store a debug log for every command run. This file is overwritten for each new command run. The default location
183
189
  of this file is `~/.bittensor/debug.txt` and can be set with the `BTCLI_DEBUG_FILE` env var (see above section).
184
190
 
@@ -191,6 +197,12 @@ and set the save file location. We recommend doing this first before anything, a
191
197
  us on our [Discord](https://discord.gg/bittensor), or by opening an issue on [GitHub](https://github.com/opentensor/btcli/issues/new)
192
198
  (where you can also upload your debug file).
193
199
 
200
+
201
+ Steps:
202
+ 1. Re-run the command with `--verbose` at the end, e.g. `btcli st remove --verbose`
203
+ 2. Run `btcli --debug` to save the debug log
204
+ 3. Report the issue on GitHub or Discord
205
+
194
206
  ---
195
207
 
196
208
  ## License
@@ -852,6 +852,7 @@ class CLIManager:
852
852
  callback=self.main_callback,
853
853
  epilog=_epilog,
854
854
  no_args_is_help=True,
855
+ context_settings={"help_option_names": ["-h", "--help"]},
855
856
  )
856
857
  self.config_app = typer.Typer(
857
858
  epilog=_epilog,
@@ -4860,12 +4861,21 @@ class CLIManager:
4860
4861
 
4861
4862
  # TODO: Ask amount for each subnet explicitly if more than one
4862
4863
  if not stake_all and not amount:
4863
- free_balance = self._run_command(
4864
- wallets.wallet_balance(
4865
- wallet, self.initialize_chain(network), False, None
4866
- ),
4867
- exit_early=False,
4868
- )
4864
+ staker_ss58 = proxy or wallet.coldkeypub.ss58_address
4865
+ if proxy:
4866
+ free_balance = self._run_command(
4867
+ wallets.wallet_balance(
4868
+ None, self.initialize_chain(network), False, [staker_ss58]
4869
+ ),
4870
+ exit_early=False,
4871
+ )
4872
+ else:
4873
+ free_balance = self._run_command(
4874
+ wallets.wallet_balance(
4875
+ wallet, self.initialize_chain(network), False, None
4876
+ ),
4877
+ exit_early=False,
4878
+ )
4869
4879
  logger.debug(f"Free balance: {free_balance}")
4870
4880
  if free_balance == Balance.from_tao(0):
4871
4881
  print_error("You dont have any balance to stake.")
@@ -424,7 +424,7 @@ async def create_crowdloan(
424
424
  table.add_row(
425
425
  "Estimated fee",
426
426
  f"[{COLORS.P.TAO}]{extrinsic_fee}[/{COLORS.P.TAO}]"
427
- + (" (paid by real account)" if proxy else ""),
427
+ + (" (paid by signer account)" if proxy else ""),
428
428
  )
429
429
  console.print(table)
430
430
 
@@ -678,7 +678,7 @@ async def finalize_crowdloan(
678
678
  table.add_row(
679
679
  "Transaction Fee",
680
680
  f"[{COLORS.S.TAO}]{extrinsic_fee.tao}[/{COLORS.S.TAO}]"
681
- + (" (paid by real account)" if proxy else ""),
681
+ + (" (paid by signer account)" if proxy else ""),
682
682
  )
683
683
 
684
684
  table.add_section()
@@ -130,7 +130,7 @@ async def stake_add(
130
130
  )
131
131
  current_balance, next_nonce, call = await asyncio.gather(
132
132
  subtensor.get_balance(coldkey_ss58),
133
- subtensor.substrate.get_account_next_index(coldkey_ss58),
133
+ subtensor.substrate.get_account_next_index(signer_ss58),
134
134
  subtensor.substrate.compose_call(
135
135
  call_module="SubtensorModule",
136
136
  call_function="add_stake_limit",
@@ -228,7 +228,7 @@ async def stake_add(
228
228
  block_hash = await subtensor.substrate.get_chain_head()
229
229
  current_balance, next_nonce, call = await asyncio.gather(
230
230
  subtensor.get_balance(coldkey_ss58, block_hash=block_hash),
231
- subtensor.substrate.get_account_next_index(coldkey_ss58),
231
+ subtensor.substrate.get_account_next_index(signer_ss58),
232
232
  subtensor.substrate.compose_call(
233
233
  call_module="SubtensorModule",
234
234
  call_function="add_stake",
@@ -308,6 +308,7 @@ async def stake_add(
308
308
  netuids if netuids is not None else await subtensor.get_all_subnet_netuids()
309
309
  )
310
310
  coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
311
+ signer_ss58 = wallet.coldkeypub.ss58_address
311
312
 
312
313
  hotkeys_to_stake_to = _get_hotkeys_to_stake_to(
313
314
  wallet=wallet,
@@ -244,11 +244,12 @@ async def process_pending_claims(
244
244
  ) -> tuple[bool, str, Optional[str]]:
245
245
  """Claims root network emissions for the coldkey across specified subnets"""
246
246
 
247
+ coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
247
248
  with console.status(":satellite: Discovering claimable emissions..."):
248
249
  block_hash = await subtensor.substrate.get_chain_head()
249
250
  all_stakes, identities = await asyncio.gather(
250
251
  subtensor.get_stake_for_coldkey(
251
- coldkey_ss58=wallet.coldkeypub.ss58_address, block_hash=block_hash
252
+ coldkey_ss58=coldkey_ss58, block_hash=block_hash
252
253
  ),
253
254
  subtensor.query_all_identities(block_hash=block_hash),
254
255
  )
@@ -272,7 +273,7 @@ async def process_pending_claims(
272
273
  (stake.hotkey_ss58, stake.netuid): stake for stake in all_stakes
273
274
  }
274
275
  claimable_by_hotkey = await subtensor.get_claimable_stakes_for_coldkey(
275
- coldkey_ss58=wallet.coldkeypub.ss58_address,
276
+ coldkey_ss58=coldkey_ss58,
276
277
  stakes_info=all_stakes,
277
278
  block_hash=block_hash,
278
279
  )
@@ -344,7 +345,7 @@ async def process_pending_claims(
344
345
  )
345
346
  console.print(
346
347
  f"\n[dim]Estimated extrinsic fee: {extrinsic_fee.tao:.9f} τ"
347
- + (" (paid by real account)" if proxy else "")
348
+ + (" (paid by signer account)" if proxy else "")
348
349
  )
349
350
 
350
351
  if prompt:
@@ -882,9 +882,7 @@ async def transfer_stake(
882
882
  amount=amount_to_transfer.rao,
883
883
  ),
884
884
  subtensor.get_extrinsic_fee(call, wallet.coldkeypub, proxy=proxy),
885
- subtensor.substrate.get_account_next_index(
886
- proxy or wallet.coldkeypub.ss58_address
887
- ),
885
+ subtensor.substrate.get_account_next_index(wallet.coldkeypub.ss58_address),
888
886
  )
889
887
 
890
888
  # Display stake movement details
@@ -1112,9 +1110,7 @@ async def swap_stake(
1112
1110
  amount=amount_to_swap.rao,
1113
1111
  ),
1114
1112
  subtensor.get_extrinsic_fee(call, wallet.coldkeypub, proxy=proxy),
1115
- subtensor.substrate.get_account_next_index(
1116
- proxy or wallet.coldkeypub.ss58_address
1117
- ),
1113
+ subtensor.substrate.get_account_next_index(wallet.coldkeypub.ss58_address),
1118
1114
  )
1119
1115
 
1120
1116
  # Display stake movement details
@@ -616,6 +616,7 @@ async def _unstake_extrinsic(
616
616
  f":cross_mark: [red]Failed[/red] to unstake {amount} on Netuid {netuid}"
617
617
  )
618
618
  coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
619
+ signer_ss58 = wallet.coldkeypub.ss58_address
619
620
 
620
621
  if status:
621
622
  status.update(
@@ -624,7 +625,7 @@ async def _unstake_extrinsic(
624
625
 
625
626
  current_balance, next_nonce, call = await asyncio.gather(
626
627
  subtensor.get_balance(coldkey_ss58),
627
- subtensor.substrate.get_account_next_index(coldkey_ss58),
628
+ subtensor.substrate.get_account_next_index(signer_ss58),
628
629
  subtensor.substrate.compose_call(
629
630
  call_module="SubtensorModule",
630
631
  call_function="remove_stake",
@@ -721,6 +722,7 @@ async def _safe_unstake_extrinsic(
721
722
  f":cross_mark: [red]Failed[/red] to unstake {amount} on Netuid {netuid}"
722
723
  )
723
724
  coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
725
+ signer_ss58 = wallet.coldkeypub.ss58_address
724
726
 
725
727
  if status:
726
728
  status.update(
@@ -731,7 +733,7 @@ async def _safe_unstake_extrinsic(
731
733
 
732
734
  current_balance, next_nonce, current_stake, call = await asyncio.gather(
733
735
  subtensor.get_balance(coldkey_ss58, block_hash),
734
- subtensor.substrate.get_account_next_index(coldkey_ss58),
736
+ subtensor.substrate.get_account_next_index(signer_ss58),
735
737
  subtensor.get_stake(
736
738
  hotkey_ss58=hotkey_ss58,
737
739
  coldkey_ss58=coldkey_ss58,
@@ -813,9 +815,7 @@ async def _safe_unstake_extrinsic(
813
815
  status=status,
814
816
  )
815
817
  else:
816
- err_out(
817
- f"\n{failure_prelude} with error: {format_error_message(await response.error_message)}"
818
- )
818
+ err_out(f"\n{failure_prelude} with error: {err_msg}")
819
819
  return False, None
820
820
 
821
821
 
@@ -845,6 +845,7 @@ async def _unstake_all_extrinsic(
845
845
  f":cross_mark: [red]Failed[/red] to unstake all from {hotkey_name}"
846
846
  )
847
847
  coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
848
+ signer_ss58 = wallet.coldkeypub.ss58_address
848
849
 
849
850
  if status:
850
851
  status.update(
@@ -875,7 +876,7 @@ async def _unstake_all_extrinsic(
875
876
  call_function=call_function,
876
877
  call_params={"hotkey": hotkey_ss58},
877
878
  ),
878
- subtensor.substrate.get_account_next_index(coldkey_ss58),
879
+ subtensor.substrate.get_account_next_index(signer_ss58),
879
880
  )
880
881
  try:
881
882
  success_, err_msg, response = await subtensor.sign_and_send_extrinsic(
@@ -238,7 +238,7 @@ async def register_subnetwork_extrinsic(
238
238
  if not unlock_key(wallet).success:
239
239
  return False, None, None
240
240
 
241
- coldkey_ss58 = proxy or wallet.coldkeypub.ss58_address
241
+ coldkey_ss58 = wallet.coldkeypub.ss58_address
242
242
 
243
243
  with console.status(":satellite: Registering subnet...", spinner="earth") as status:
244
244
  substrate = subtensor.substrate
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "bittensor-cli"
7
- version = "9.18.0"
7
+ version = "9.18.2"
8
8
  description = "Bittensor CLI"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -43,7 +43,7 @@ dependencies = [
43
43
  "rich>=13.7,<15.0",
44
44
  "scalecodec==1.2.12",
45
45
  "typer>=0.16",
46
- "bittensor-wallet>=4.0.0",
46
+ "bittensor-wallet==4.0.2",
47
47
  "packaging",
48
48
  "plotille>=5.0.0",
49
49
  "plotly>=6.0.0",