bittensor.utils.registration.async_pow#
This module provides async utilities for solving Proof-of-Work (PoW) challenges in Bittensor network.
Functions#
|
Creates a proof of work for the given subtensor and wallet. |
Module Contents#
- async bittensor.utils.registration.async_pow.create_pow_async(subtensor, wallet, netuid, output_in_place=True, cuda=False, dev_id=0, tpb=256, num_processes=None, update_interval=None, log_verbose=False)#
Creates a proof of work for the given subtensor and wallet.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – The subtensor instance.
wallet (bittensor_wallet.Wallet) – The wallet to create a proof of work for.
netuid (int) – The netuid for the subnet to create a proof of work for.
output_in_place (bool) – If true, prints the progress of the proof of work to the console in-place. Meaning the progress is printed on the same lines.
cuda (bool) – If true, uses CUDA to solve the proof of work.
dev_id (Union[list[int], int]) – The CUDA device id(s) to use. If cuda is true and dev_id is a list, then multiple CUDA devices will be used to solve the proof of work.
tpb (int) – The number of threads per block to use when solving the proof of work. Should be a multiple of 32.
num_processes (int) – The number of processes to use when solving the proof of work. If None, then the number of processes is equal to the number of CPU cores.
update_interval (int) – The number of nonces to run before checking for a new block.
log_verbose (bool) – If true, prints the progress of the proof of work more verbosely.
- Returns:
The proof of work solution or None if the wallet is already registered or there is a different error.
- Raises:
ValueError – If the subnet does not exist.
- Return type:
bittensor.utils.registration.POWSolution