bittensor.core.extrinsics.asyncex.sudo#
Functions#
|
Sets the admin freeze window length (in blocks) at the end of a tempo. |
|
Sets the number of subnet mechanisms. |
|
Sets the emission split between mechanisms in a provided subnet. |
Module Contents#
- async bittensor.core.extrinsics.asyncex.sudo.sudo_set_admin_freeze_window_extrinsic(subtensor, wallet, window, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#
Sets the admin freeze window length (in blocks) at the end of a tempo.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – AsyncSubtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor Wallet instance.
window (int) – The amount of blocks to freeze in the end of a tempo.
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:
- async bittensor.core.extrinsics.asyncex.sudo.sudo_set_mechanism_count_extrinsic(subtensor, wallet, netuid, mech_count, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#
Sets the number of subnet mechanisms.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – Subtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor Wallet instance.
netuid (int) – The subnet unique identifier.
mech_count (int) – The amount of subnet mechanism to be set.
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:
- async bittensor.core.extrinsics.asyncex.sudo.sudo_set_mechanism_emission_split_extrinsic(subtensor, wallet, netuid, maybe_split, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#
Sets the emission split between mechanisms in a provided subnet.
- Parameters:
subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – AsyncSubtensor instance.
wallet (bittensor_wallet.Wallet) – Bittensor Wallet instance.
netuid (int) – The subnet unique identifier.
maybe_split (bittensor.core.types.Weights) – List of emission weights (positive integers) for each subnet mechanism.
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:
Note
The maybe_split list defines the relative emission share for each subnet mechanism. Its length must match the number of active mechanisms in the subnet or be shorter, but not equal to zero. For example, [3, 1, 1] distributes emissions in a 3:1:1 ratio across subnet mechanisms 0, 1, and 2. Each mechanism’s emission share is calculated as: share[i] = maybe_split[i] / sum(maybe_split)