bittensor.extrinsics.registration#
Exceptions#
Common base class for all non-exit exceptions. |
|
Common base class for all non-exit exceptions. |
Functions#
|
Registers the wallet to the chain. |
|
Registers the wallet to chain by recycling TAO. |
|
Runs a continual POW to get a faucet of TAO on the test net. |
|
Module Contents#
- 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)[source]#
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 returnsfalse
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 returnsfalse
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 istrue
.- Return type:
success (bool)
- bittensor.extrinsics.registration.burned_register_extrinsic(subtensor, wallet, netuid, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)[source]#
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 returnsfalse
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 returnsfalse
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 istrue
.- Return type:
success (bool)
- exception bittensor.extrinsics.registration.MaxSuccessException[source]#
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception bittensor.extrinsics.registration.MaxAttemptsException[source]#
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- 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)[source]#
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 returnsfalse
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 returnsfalse
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 istrue
.- Return type:
success (bool)