bittensor-cli 8.2.0__py3-none-any.whl → 8.3.0__py3-none-any.whl

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.
@@ -4,16 +4,18 @@ from typing import Any, Optional
4
4
 
5
5
 
6
6
  class Constants:
7
- networks = ["local", "finney", "test", "archive"]
7
+ networks = ["local", "finney", "test", "archive", "subvortex"]
8
8
  finney_entrypoint = "wss://entrypoint-finney.opentensor.ai:443"
9
9
  finney_test_entrypoint = "wss://test.finney.opentensor.ai:443"
10
10
  archive_entrypoint = "wss://archive.chain.opentensor.ai:443"
11
- local_entrypoint = "ws://127.0.0.1:9444"
11
+ subvortex_entrypoint = "ws://subvortex.info:9944"
12
+ local_entrypoint = "ws://127.0.0.1:9944"
12
13
  network_map = {
13
14
  "finney": finney_entrypoint,
14
15
  "test": finney_test_entrypoint,
15
16
  "archive": archive_entrypoint,
16
17
  "local": local_entrypoint,
18
+ "subvortex": subvortex_entrypoint,
17
19
  }
18
20
  delegates_detail_url = "https://raw.githubusercontent.com/opentensor/bittensor-delegates/main/public/delegates.json"
19
21
 
@@ -460,6 +460,9 @@ class Runtime:
460
460
  self.runtime_config = runtime_config
461
461
  self.metadata = metadata
462
462
 
463
+ def __str__(self):
464
+ return f"Runtime: {self.chain} | {self.config}"
465
+
463
466
  @property
464
467
  def implements_scaleinfo(self) -> bool:
465
468
  """
@@ -682,9 +685,9 @@ class Websocket:
682
685
  try:
683
686
  self._receiving_task.cancel()
684
687
  await self._receiving_task
688
+ await self.ws.close()
685
689
  except (AttributeError, asyncio.CancelledError):
686
690
  pass
687
- await self.ws.close()
688
691
  self.ws = None
689
692
  self._initialized = False
690
693
  self._receiving_task = None
@@ -897,9 +900,10 @@ class AsyncSubstrateInterface:
897
900
 
898
901
  async def get_runtime(block_hash, block_id) -> Runtime:
899
902
  # Check if runtime state already set to current block
900
- if (block_hash and block_hash == self.last_block_hash) or (
901
- block_id and block_id == self.block_id
902
- ):
903
+ if (
904
+ (block_hash and block_hash == self.last_block_hash)
905
+ or (block_id and block_id == self.block_id)
906
+ ) and self.metadata is not None:
903
907
  return Runtime(
904
908
  self.chain,
905
909
  self.runtime_config,
@@ -945,9 +949,11 @@ class AsyncSubstrateInterface:
945
949
  raise SubstrateRequestException(
946
950
  f"No runtime information for block '{block_hash}'"
947
951
  )
948
-
949
952
  # Check if runtime state already set to current block
950
- if runtime_info.get("specVersion") == self.runtime_version:
953
+ if (
954
+ runtime_info.get("specVersion") == self.runtime_version
955
+ and self.metadata is not None
956
+ ):
951
957
  return Runtime(
952
958
  self.chain,
953
959
  self.runtime_config,
@@ -962,16 +968,19 @@ class AsyncSubstrateInterface:
962
968
  if self.runtime_version in self.__metadata_cache:
963
969
  # Get metadata from cache
964
970
  # self.debug_message('Retrieved metadata for {} from memory'.format(self.runtime_version))
965
- self.metadata = self.__metadata_cache[self.runtime_version]
971
+ metadata = self.metadata = self.__metadata_cache[
972
+ self.runtime_version
973
+ ]
966
974
  else:
967
- self.metadata = await self.get_block_metadata(
975
+ metadata = self.metadata = await self.get_block_metadata(
968
976
  block_hash=runtime_block_hash, decode=True
969
977
  )
970
978
  # self.debug_message('Retrieved metadata for {} from Substrate node'.format(self.runtime_version))
971
979
 
972
980
  # Update metadata cache
973
981
  self.__metadata_cache[self.runtime_version] = self.metadata
974
-
982
+ else:
983
+ metadata = self.metadata
975
984
  # Update type registry
976
985
  self.reload_type_registry(use_remote_preset=False, auto_discover=True)
977
986
 
@@ -1012,7 +1021,10 @@ class AsyncSubstrateInterface:
1012
1021
  if block_id and block_hash:
1013
1022
  raise ValueError("Cannot provide block_hash and block_id at the same time")
1014
1023
 
1015
- if not (runtime := self.runtime_cache.retrieve(block_id, block_hash)):
1024
+ if (
1025
+ not (runtime := self.runtime_cache.retrieve(block_id, block_hash))
1026
+ or runtime.metadata is None
1027
+ ):
1016
1028
  runtime = await get_runtime(block_hash, block_id)
1017
1029
  self.runtime_cache.add_item(block_id, block_hash, runtime)
1018
1030
  return runtime
@@ -1123,7 +1135,7 @@ class AsyncSubstrateInterface:
1123
1135
  -------
1124
1136
  StorageKey
1125
1137
  """
1126
- await self.init_runtime(block_hash=block_hash)
1138
+ runtime = await self.init_runtime(block_hash=block_hash)
1127
1139
 
1128
1140
  return StorageKey.create_from_storage_function(
1129
1141
  pallet,
@@ -1707,9 +1719,7 @@ class AsyncSubstrateInterface:
1707
1719
  )
1708
1720
  result = await self._make_rpc_request(payloads, runtime=runtime)
1709
1721
  if "error" in result[payload_id][0]:
1710
- raise SubstrateRequestException(
1711
- result[payload_id][0]["error"]["message"]
1712
- )
1722
+ raise SubstrateRequestException(result[payload_id][0]["error"]["message"])
1713
1723
  if "result" in result[payload_id][0]:
1714
1724
  return result[payload_id][0]
1715
1725
  else:
@@ -2274,7 +2284,7 @@ class AsyncSubstrateInterface:
2274
2284
  MetadataModuleConstants
2275
2285
  """
2276
2286
 
2277
- # await self.init_runtime(block_hash=block_hash)
2287
+ await self.init_runtime(block_hash=block_hash)
2278
2288
 
2279
2289
  for module in self.metadata.pallets:
2280
2290
  if module_name == module.name and module.constants:
@@ -16,6 +16,7 @@ import random
16
16
  import time
17
17
  import typing
18
18
  from typing import Optional
19
+ import subprocess
19
20
 
20
21
  import backoff
21
22
  from bittensor_wallet import Wallet
@@ -35,6 +36,7 @@ from bittensor_cli.src.bittensor.utils import (
35
36
  millify,
36
37
  get_human_readable,
37
38
  print_verbose,
39
+ print_error,
38
40
  )
39
41
 
40
42
  if typing.TYPE_CHECKING:
@@ -512,12 +514,13 @@ async def register_extrinsic(
512
514
  with console.status(
513
515
  f":satellite: Checking Account on [bold]subnet:{netuid}[/bold]...",
514
516
  spinner="aesthetic",
515
- ):
517
+ ) as status:
516
518
  neuron = await get_neuron_for_pubkey_and_subnet()
517
519
  if not neuron.is_null:
518
- # bittensor.logging.debug(
519
- # f"Wallet {wallet} is already registered on {neuron.netuid} with {neuron.uid}"
520
- # )
520
+ print_error(
521
+ f"Wallet {wallet} is already registered on subnet {neuron.netuid} with uid {neuron.uid}",
522
+ status,
523
+ )
521
524
  return True
522
525
 
523
526
  if prompt:
@@ -611,7 +614,8 @@ async def register_extrinsic(
611
614
  success, err_msg = True, ""
612
615
  else:
613
616
  await response.process_events()
614
- if not await response.is_success:
617
+ success = await response.is_success
618
+ if not success:
615
619
  success, err_msg = (
616
620
  False,
617
621
  format_error_message(
@@ -619,23 +623,23 @@ async def register_extrinsic(
619
623
  substrate=subtensor.substrate,
620
624
  ),
621
625
  )
622
-
623
- if not success:
624
- # Look error here
625
- # https://github.com/opentensor/subtensor/blob/development/pallets/subtensor/src/errors.rs
626
- if "HotKeyAlreadyRegisteredInSubNet" in err_msg:
627
- console.print(
628
- f":white_heavy_check_mark: [green]Already Registered on "
629
- f"[bold]subnet:{netuid}[/bold][/green]"
626
+ # Look error here
627
+ # https://github.com/opentensor/subtensor/blob/development/pallets/subtensor/src/errors.rs
628
+
629
+ if "HotKeyAlreadyRegisteredInSubNet" in err_msg:
630
+ console.print(
631
+ f":white_heavy_check_mark: [green]Already Registered on "
632
+ f"[bold]subnet:{netuid}[/bold][/green]"
633
+ )
634
+ return True
635
+ err_console.print(
636
+ f":cross_mark: [red]Failed[/red]: {err_msg}"
630
637
  )
631
- return True
632
-
633
- err_console.print(f":cross_mark: [red]Failed[/red]: {err_msg}")
634
- await asyncio.sleep(0.5)
638
+ await asyncio.sleep(0.5)
635
639
 
636
640
  # Successful registration, final check for neuron and pubkey
637
- else:
638
- console.print(":satellite: Checking Balance...")
641
+ if success:
642
+ console.print(":satellite: Checking Registration status...")
639
643
  is_registered = await is_hotkey_registered(
640
644
  subtensor,
641
645
  netuid=netuid,
@@ -914,6 +918,9 @@ async def _block_solver(
914
918
  stop_event.clear()
915
919
 
916
920
  solution_queue = Queue()
921
+ if cuda:
922
+ num_processes = len(dev_id)
923
+
917
924
  finished_queues = [Queue() for _ in range(num_processes)]
918
925
  check_block = Lock()
919
926
 
@@ -923,7 +930,6 @@ async def _block_solver(
923
930
 
924
931
  if cuda:
925
932
  ## Create a worker per CUDA device
926
- num_processes = len(dev_id)
927
933
  solvers = [
928
934
  _CUDASolver(
929
935
  i,
@@ -1231,8 +1237,14 @@ def _terminate_workers_and_wait_for_exit(
1231
1237
  if isinstance(worker, Queue_Type):
1232
1238
  worker.join_thread()
1233
1239
  else:
1234
- worker.join()
1235
- worker.close()
1240
+ try:
1241
+ worker.join(3.0)
1242
+ except subprocess.TimeoutExpired:
1243
+ worker.terminate()
1244
+ try:
1245
+ worker.close()
1246
+ except ValueError:
1247
+ worker.terminate()
1236
1248
 
1237
1249
 
1238
1250
  # TODO verify this works with async
@@ -1630,6 +1642,7 @@ async def swap_hotkey_extrinsic(
1630
1642
  try:
1631
1643
  wallet.unlock_coldkey()
1632
1644
  except KeyFileError:
1645
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
1633
1646
  return False
1634
1647
 
1635
1648
  if prompt:
@@ -309,6 +309,7 @@ async def root_register_extrinsic(
309
309
  try:
310
310
  wallet.unlock_coldkey()
311
311
  except KeyFileError:
312
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
312
313
  return False
313
314
 
314
315
  print_verbose(f"Checking if hotkey ({wallet.hotkey_str}) is registered on root")
@@ -429,6 +430,7 @@ async def set_root_weights_extrinsic(
429
430
  try:
430
431
  wallet.unlock_coldkey()
431
432
  except KeyFileError:
433
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
432
434
  return False
433
435
 
434
436
  # First convert types.
@@ -15,6 +15,7 @@ from bittensor_cli.src.bittensor.utils import (
15
15
  format_error_message,
16
16
  get_explorer_url_for_network,
17
17
  is_valid_bittensor_address_or_public_key,
18
+ print_error,
18
19
  )
19
20
 
20
21
 
@@ -23,6 +24,7 @@ async def transfer_extrinsic(
23
24
  wallet: Wallet,
24
25
  destination: str,
25
26
  amount: Balance,
27
+ transfer_all: bool = False,
26
28
  wait_for_inclusion: bool = True,
27
29
  wait_for_finalization: bool = False,
28
30
  keep_alive: bool = True,
@@ -34,6 +36,7 @@ async def transfer_extrinsic(
34
36
  :param wallet: Bittensor wallet object to make transfer from.
35
37
  :param destination: Destination public key address (ss58_address or ed25519) of recipient.
36
38
  :param amount: Amount to stake as Bittensor balance.
39
+ :param transfer_all: Whether to transfer all funds from this wallet to the destination address.
37
40
  :param wait_for_inclusion: If set, waits for the extrinsic to enter a block before returning `True`,
38
41
  or returns `False` if the extrinsic fails to enter the block within the timeout.
39
42
  :param wait_for_finalization: If set, waits for the extrinsic to be finalized on the chain before returning
@@ -98,7 +101,11 @@ async def transfer_extrinsic(
98
101
  block_hash_ = response.block_hash
99
102
  return True, block_hash_, ""
100
103
  else:
101
- return False, "", format_error_message(await response.error_message)
104
+ return (
105
+ False,
106
+ "",
107
+ format_error_message(await response.error_message, subtensor.substrate),
108
+ )
102
109
 
103
110
  # Validate destination address.
104
111
  if not is_valid_bittensor_address_or_public_key(destination):
@@ -111,6 +118,7 @@ async def transfer_extrinsic(
111
118
  try:
112
119
  wallet.unlock_coldkey()
113
120
  except KeyFileError:
121
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
114
122
  return False
115
123
 
116
124
  # Check balance.
@@ -135,6 +143,12 @@ async def transfer_extrinsic(
135
143
  existential_deposit = Balance(0)
136
144
 
137
145
  # Check if we have enough balance.
146
+ if transfer_all is True:
147
+ amount = account_balance - fee - existential_deposit
148
+ if amount < Balance(0):
149
+ print_error("Not enough balance to transfer")
150
+ return False
151
+
138
152
  if account_balance < (amount + fee + existential_deposit):
139
153
  err_console.print(
140
154
  ":cross_mark: [bold red]Not enough balance[/bold red]:\n\n"
@@ -183,7 +197,7 @@ async def transfer_extrinsic(
183
197
  )
184
198
  console.print(
185
199
  f"Balance:\n"
186
- f" [blue]{account_balance}[/blue] :arrow_right: [green]{new_balance[wallet.coldkey.ss58_address]}[/green]"
200
+ f" [blue]{account_balance}[/blue] :arrow_right: [green]{new_balance[wallet.coldkeypub.ss58_address]}[/green]"
187
201
  )
188
202
  return True
189
203
 
@@ -111,18 +111,18 @@ class SubtensorInterface:
111
111
  return f"Network: {self.network}, Chain: {self.chain_endpoint}"
112
112
 
113
113
  async def __aenter__(self):
114
- with console.status(
115
- f"[yellow]Connecting to Substrate:[/yellow][bold white] {self}..."
116
- ):
117
- try:
114
+ try:
115
+ with console.status(
116
+ f"[yellow]Connecting to Substrate:[/yellow][bold white] {self}..."
117
+ ):
118
118
  async with self.substrate:
119
119
  return self
120
- except TimeoutException:
121
- err_console.print(
122
- "\n[red]Error[/red]: Timeout occurred connecting to substrate. "
123
- f"Verify your chain and network settings: {self}"
124
- )
125
- raise typer.Exit(code=1)
120
+ except TimeoutException:
121
+ err_console.print(
122
+ "\n[red]Error[/red]: Timeout occurred connecting to substrate. "
123
+ f"Verify your chain and network settings: {self}"
124
+ )
125
+ raise typer.Exit(code=1)
126
126
 
127
127
  async def __aexit__(self, exc_type, exc_val, exc_tb):
128
128
  await self.substrate.close()
@@ -283,7 +283,7 @@ class SubtensorInterface:
283
283
  self,
284
284
  runtime_api: str,
285
285
  method: str,
286
- params: Optional[Union[list[list[int]], dict[str, int]]],
286
+ params: Optional[Union[list[list[int]], list[int], dict[str, int]]],
287
287
  block_hash: Optional[str] = None,
288
288
  reuse_block: Optional[bool] = False,
289
289
  ) -> Optional[str]:
@@ -443,7 +443,7 @@ def get_explorer_url_for_network(
443
443
  explorer_opentensor_url = "{root_url}/query/{block_hash}".format(
444
444
  root_url=explorer_root_urls.get("opentensor"), block_hash=block_hash
445
445
  )
446
- explorer_taostats_url = "{root_url}/extrinsic/{block_hash}".format(
446
+ explorer_taostats_url = "{root_url}/hash/{block_hash}".format(
447
447
  root_url=explorer_root_urls.get("taostats"), block_hash=block_hash
448
448
  )
449
449
  explorer_urls["opentensor"] = explorer_opentensor_url
@@ -532,7 +532,7 @@ def format_error_message(
532
532
  err_docs = error_message.get("docs", [err_description])
533
533
  err_description = err_docs[0] if err_docs else err_description
534
534
 
535
- return f"Subtensor returned `{err_name}({err_type})` error. This means: `{err_description}`."
535
+ return f"Subtensor returned `{err_name}({err_type})` error. This means: '{err_description}'."
536
536
 
537
537
 
538
538
  def convert_blocks_to_time(blocks: int, block_time: int = 12) -> tuple[int, int, int]:
@@ -283,6 +283,7 @@ async def burned_register_extrinsic(
283
283
  try:
284
284
  wallet.unlock_coldkey()
285
285
  except KeyFileError:
286
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
286
287
  return False
287
288
 
288
289
  with console.status(
@@ -539,6 +540,7 @@ async def delegate_extrinsic(
539
540
  try:
540
541
  wallet.unlock_coldkey()
541
542
  except KeyFileError:
543
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
542
544
  return False
543
545
 
544
546
  print_verbose("Checking if hotkey is a delegate")
@@ -1100,6 +1102,7 @@ async def senate_vote(
1100
1102
  wallet.unlock_hotkey()
1101
1103
  wallet.unlock_coldkey()
1102
1104
  except KeyFileError:
1105
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
1103
1106
  return False
1104
1107
 
1105
1108
  console.print(f"Fetching proposals in [dark_orange]network: {subtensor.network}")
@@ -1323,6 +1326,7 @@ async def set_take(wallet: Wallet, subtensor: SubtensorInterface, take: float) -
1323
1326
  wallet.unlock_hotkey()
1324
1327
  wallet.unlock_coldkey()
1325
1328
  except KeyFileError:
1329
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
1326
1330
  return False
1327
1331
 
1328
1332
  result_ = await _do_set_take()
@@ -1724,6 +1728,7 @@ async def nominate(wallet: Wallet, subtensor: SubtensorInterface, prompt: bool):
1724
1728
  wallet.unlock_hotkey()
1725
1729
  wallet.unlock_coldkey()
1726
1730
  except KeyFileError:
1731
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
1727
1732
  return False
1728
1733
 
1729
1734
  print_verbose(f"Checking hotkey ({wallet.hotkey_str}) is a delegate")
@@ -494,6 +494,7 @@ async def set_children(
494
494
  netuid: Optional[int] = None,
495
495
  wait_for_inclusion: bool = True,
496
496
  wait_for_finalization: bool = True,
497
+ prompt: bool = True,
497
498
  ):
498
499
  """Set children hotkeys."""
499
500
  # Validate children SS58 addresses
@@ -520,7 +521,7 @@ async def set_children(
520
521
  netuid=netuid,
521
522
  hotkey=wallet.hotkey.ss58_address,
522
523
  children_with_proportions=children_with_proportions,
523
- prompt=True,
524
+ prompt=prompt,
524
525
  wait_for_inclusion=wait_for_inclusion,
525
526
  wait_for_finalization=wait_for_finalization,
526
527
  )
@@ -549,7 +550,7 @@ async def set_children(
549
550
  netuid=netuid,
550
551
  hotkey=wallet.hotkey.ss58_address,
551
552
  children_with_proportions=children_with_proportions,
552
- prompt=False,
553
+ prompt=prompt,
553
554
  wait_for_inclusion=True,
554
555
  wait_for_finalization=False,
555
556
  )
@@ -564,6 +565,7 @@ async def revoke_children(
564
565
  netuid: Optional[int] = None,
565
566
  wait_for_inclusion: bool = True,
566
567
  wait_for_finalization: bool = True,
568
+ prompt: bool = True,
567
569
  ):
568
570
  """
569
571
  Revokes the children hotkeys associated with a given network identifier (netuid).
@@ -575,7 +577,7 @@ async def revoke_children(
575
577
  netuid=netuid,
576
578
  hotkey=wallet.hotkey.ss58_address,
577
579
  children_with_proportions=[],
578
- prompt=True,
580
+ prompt=prompt,
579
581
  wait_for_inclusion=wait_for_inclusion,
580
582
  wait_for_finalization=wait_for_finalization,
581
583
  )
@@ -604,7 +606,7 @@ async def revoke_children(
604
606
  netuid=netuid,
605
607
  hotkey=wallet.hotkey.ss58_address,
606
608
  children_with_proportions=[],
607
- prompt=False,
609
+ prompt=prompt,
608
610
  wait_for_inclusion=True,
609
611
  wait_for_finalization=False,
610
612
  )
@@ -764,7 +766,7 @@ async def childkey_take(
764
766
  netuid=netuid,
765
767
  hotkey=wallet.hotkey.ss58_address,
766
768
  take=take,
767
- prompt=False,
769
+ prompt=prompt,
768
770
  wait_for_inclusion=True,
769
771
  wait_for_finalization=False,
770
772
  )
@@ -106,6 +106,7 @@ async def add_stake_extrinsic(
106
106
  try:
107
107
  wallet.unlock_coldkey()
108
108
  except KeyFileError:
109
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
109
110
  return False
110
111
 
111
112
  # Default to wallet's own hotkey if the value is not passed.
@@ -312,6 +313,7 @@ async def add_stake_multiple_extrinsic(
312
313
  try:
313
314
  wallet.unlock_coldkey()
314
315
  except KeyFileError:
316
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
315
317
  return False
316
318
 
317
319
  with console.status(
@@ -493,6 +495,7 @@ async def unstake_extrinsic(
493
495
  try:
494
496
  wallet.unlock_coldkey()
495
497
  except KeyFileError:
498
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
496
499
  return False
497
500
 
498
501
  if hotkey_ss58 is None:
@@ -663,6 +666,7 @@ async def unstake_multiple_extrinsic(
663
666
  try:
664
667
  wallet.unlock_coldkey()
665
668
  except KeyFileError:
669
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
666
670
  return False
667
671
 
668
672
  with console.status(
@@ -1178,6 +1182,7 @@ async def stake_add(
1178
1182
  (wallet.hotkey_str, wallet.hotkey.ss58_address)
1179
1183
  for wallet in all_hotkeys_
1180
1184
  if wallet.hotkey_str not in exclude_hotkeys
1185
+ and wallet.hotkey.ss58_address not in exclude_hotkeys
1181
1186
  ] # definitely wallets
1182
1187
 
1183
1188
  elif include_hotkeys:
@@ -1345,6 +1350,7 @@ async def unstake(
1345
1350
  (wallet.hotkey_str, wallet.hotkey.ss58_address)
1346
1351
  for wallet in all_hotkeys_
1347
1352
  if wallet.hotkey_str not in exclude_hotkeys
1353
+ and wallet.hotkey.ss58_address not in hotkeys_to_unstake_from
1348
1354
  ] # definitely wallets
1349
1355
 
1350
1356
  elif include_hotkeys:
@@ -103,6 +103,7 @@ async def register_subnetwork_extrinsic(
103
103
  try:
104
104
  wallet.unlock_coldkey()
105
105
  except KeyFileError:
106
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
106
107
  return False
107
108
 
108
109
  with console.status(":satellite: Registering subnet...", spinner="earth"):
@@ -399,6 +400,7 @@ async def pow_register(
399
400
  use_cuda,
400
401
  dev_id,
401
402
  threads_per_block,
403
+ prompt: bool,
402
404
  ):
403
405
  """Register neuron."""
404
406
 
@@ -406,7 +408,7 @@ async def pow_register(
406
408
  subtensor,
407
409
  wallet=wallet,
408
410
  netuid=netuid,
409
- prompt=True,
411
+ prompt=prompt,
410
412
  tpb=threads_per_block,
411
413
  update_interval=update_interval,
412
414
  num_processes=processors,
@@ -104,6 +104,7 @@ async def set_hyperparameter_extrinsic(
104
104
  try:
105
105
  wallet.unlock_coldkey()
106
106
  except KeyFileError:
107
+ err_console.print("Error decrypting coldkey (possibly incorrect password)")
107
108
  return False
108
109
 
109
110
  extrinsic = HYPERPARAMS.get(parameter)