bittensor.core.extrinsics.registration#
This module provides sync functionalities for registering a wallet with the subtensor network using Proof-of-Work (PoW).
Functions#
|
Registers the wallet to chain by recycling TAO. |
|
Registers a neuron on the Bittensor subnet with provided netuid using the provided wallet. |
|
Registers a new subnetwork on the Bittensor blockchain. |
|
Set the identity information for a given subnet. |
Module Contents#
- bittensor.core.extrinsics.registration.burned_register_extrinsic(subtensor, wallet, netuid, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)[source]#
Registers the wallet to chain by recycling TAO.
- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
netuid (int) – The
netuidof the subnet to register on.period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
- Returns:
The result object of the extrinsic execution.
- Return type:
- bittensor.core.extrinsics.registration.register_extrinsic(subtensor, wallet, netuid, max_allowed_attempts=3, output_in_place=True, cuda=False, dev_id=0, tpb=256, num_processes=None, update_interval=None, log_verbose=False, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)[source]#
Registers a neuron on the Bittensor subnet with provided netuid using the provided wallet.
- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – Subtensor object to use for chain interactions
wallet (bittensor_wallet.Wallet) – Bittensor wallet object.
netuid (int) – The
netuidof the subnet to register on.max_allowed_attempts (int) – Maximum number of attempts to register the wallet.
output_in_place (bool) – Whether the POW solving should be outputted to the console as it goes along.
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 (Optional[int]) – The number of processes to use to register.
update_interval (Optional[int]) – The number of nonces to solve between updates.
log_verbose (bool) – If True, the registration process will log more information.
period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
- Returns:
The result object of the extrinsic execution.
- Return type:
- bittensor.core.extrinsics.registration.register_subnet_extrinsic(subtensor, wallet, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)[source]#
Registers a new subnetwork on the Bittensor blockchain.
- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – The subtensor interface to send the extrinsic.
wallet (bittensor_wallet.Wallet) – The wallet to be used for subnet registration.
period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
- Returns:
The result object of the extrinsic execution.
- Return type:
- bittensor.core.extrinsics.registration.set_subnet_identity_extrinsic(subtensor, wallet, netuid, subnet_name, github_repo, subnet_contact, subnet_url, logo_url, discord, description, additional, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)[source]#
Set the identity information for a given subnet.
- Parameters:
subtensor (bittensor.core.subtensor.Subtensor) – An instance of the Subtensor class to interact with the blockchain.
wallet (bittensor_wallet.Wallet) – A wallet instance used to sign and submit the extrinsic.
netuid (int) – The unique ID for the subnet.
subnet_name (str) – The name of the subnet to assign the identity information.
github_repo (str) – URL of the GitHub repository related to the subnet.
subnet_contact (str) – Subnet’s contact information, e.g., email or contact link.
subnet_url (str) – The URL of the subnet’s primary web portal.
logo_url (str) – The URL of the logo’s primary web portal.
discord (str) – Discord server or contact for the subnet.
description (str) – A textual description of the subnet.
additional (str) – Any additional metadata or information related to the subnet.
period (Optional[int]) – The number of blocks during which the transaction will remain valid after it’s submitted. If the transaction is not included in a block within that number of blocks, it will expire and be rejected. You can think of it as an expiration date for the transaction.
raise_error (bool) – Raises a relevant exception rather than returning False if unsuccessful.
wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction.
wait_for_finalization (bool) – Whether to wait for the finalization of the transaction.
- Returns:
The result object of the extrinsic execution.
- Return type: