bittensor.extrinsics.registration#

Module Contents#

Functions#

burned_register_extrinsic(subtensor, wallet, netuid[, ...])

Registers the wallet to chain by recycling TAO.

register_extrinsic(subtensor, wallet, netuid[, ...])

Registers the wallet to the chain.

run_faucet_extrinsic(subtensor, wallet[, ...])

Runs a continual POW to get a faucet of TAO on the test net.

swap_hotkey_extrinsic(subtensor, wallet, new_wallet[, ...])

exception bittensor.extrinsics.registration.MaxAttemptsException#

Bases: Exception

Common base class for all non-exit exceptions.

exception bittensor.extrinsics.registration.MaxSuccessException#

Bases: Exception

Common base class for all non-exit exceptions.

bittensor.extrinsics.registration.burned_register_extrinsic(subtensor, wallet, netuid, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#

Registers the wallet to chain by recycling TAO.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • netuid (int) – The netuid of the subnet to register on.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • subtensor (bittensor.subtensor) –

Returns:

Flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)

bittensor.extrinsics.registration.register_extrinsic(subtensor, wallet, netuid, wait_for_inclusion=False, wait_for_finalization=True, prompt=False, max_allowed_attempts=3, output_in_place=True, cuda=False, dev_id=0, tpb=256, num_processes=None, update_interval=None, log_verbose=False)#

Registers the wallet to the chain.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • netuid (int) – The netuid of the subnet to register on.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • max_allowed_attempts (int) – Maximum number of attempts to register the wallet.

  • cuda (bool) – If true, the wallet should be registered using CUDA device(s).

  • dev_id (Union[List[int], int]) – The CUDA device id to use, or a list of device ids.

  • tpb (int) – The number of threads per block (CUDA).

  • num_processes (int) – The number of processes to use to register.

  • update_interval (int) – The number of nonces to solve between updates.

  • log_verbose (bool) – If true, the registration process will log more information.

  • subtensor (bittensor.subtensor) –

  • output_in_place (bool) –

Returns:

Flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)

bittensor.extrinsics.registration.run_faucet_extrinsic(subtensor, wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False, max_allowed_attempts=3, output_in_place=True, cuda=False, dev_id=0, tpb=256, num_processes=None, update_interval=None, log_verbose=False)#

Runs a continual POW to get a faucet of TAO on the test net.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • max_allowed_attempts (int) – Maximum number of attempts to register the wallet.

  • cuda (bool) – If true, the wallet should be registered using CUDA device(s).

  • dev_id (Union[List[int], int]) – The CUDA device id to use, or a list of device ids.

  • tpb (int) – The number of threads per block (CUDA).

  • num_processes (int) – The number of processes to use to register.

  • update_interval (int) – The number of nonces to solve between updates.

  • log_verbose (bool) – If true, the registration process will log more information.

  • subtensor (bittensor.subtensor) –

  • output_in_place (bool) –

Returns:

Flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)

bittensor.extrinsics.registration.swap_hotkey_extrinsic(subtensor, wallet, new_wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#
Parameters:
  • subtensor (bittensor.subtensor) –

  • wallet (bittensor.wallet) –

  • new_wallet (bittensor.wallet) –

  • wait_for_inclusion (bool) –

  • wait_for_finalization (bool) –

  • prompt (bool) –

Return type:

bool