bittensor.extrinsics.registration
#
Module Contents#
Functions#
|
Registers the wallet to chain. |
|
Registers the wallet to chain by recycling TAO. |
|
Runs a continual POW to get a faucet of TAO on the test net. |
|
- 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 chain. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param netuid: The netuid of the subnet to register on. :type netuid: int :param wait_for_inclusion: 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.
- Parameters:
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) –
wallet (bittensor.wallet) –
netuid (int) –
wait_for_inclusion (bool) –
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.burned_register_extrinsic(subtensor, wallet, netuid, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#
Registers the wallet to chain by recycling TAO. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param netuid: The netuid of the subnet to register on. :type netuid: int :param wait_for_inclusion: 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.
- Parameters:
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) –
wallet (bittensor.wallet) –
netuid (int) –
wait_for_inclusion (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)
- exception bittensor.extrinsics.registration.MaxSuccessException#
Bases:
Exception
Common base class for all non-exit exceptions.
- exception bittensor.extrinsics.registration.MaxAttemptsException#
Bases:
Exception
Common base class for all non-exit exceptions.
- 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. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param prompt: If true, the call waits for confirmation from the user before proceeding. :type prompt: bool :param wait_for_inclusion: 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.
- Parameters:
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) –
wallet (bittensor.wallet) –
wait_for_inclusion (bool) –
prompt (bool) –
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)#