bittensor.core.extrinsics.asyncex.commit_reveal

bittensor.core.extrinsics.asyncex.commit_reveal#

This module provides async functionality for commit reveal in the Bittensor network.

Functions#

commit_reveal_v3_extrinsic(subtensor, wallet, netuid, ...)

Commits and reveals weights for given subtensor and wallet with provided uids and weights.

Module Contents#

async bittensor.core.extrinsics.asyncex.commit_reveal.commit_reveal_v3_extrinsic(subtensor, wallet, netuid, uids, weights, version_key=version_as_int, wait_for_inclusion=False, wait_for_finalization=False)#

Commits and reveals weights for given subtensor and wallet with provided uids and weights.

Parameters:
  • subtensor (bittensor.core.async_subtensor.AsyncSubtensor) – The AsyncSubtensor instance.

  • wallet (bittensor_wallet.Wallet) – The wallet to use for committing and revealing.

  • netuid (int) – The id of the network.

  • uids (Union[numpy.typing.NDArray[numpy.int64], bittensor.utils.registration.torch.LongTensor, list]) – The uids to commit.

  • weights (Union[numpy.typing.NDArray[numpy.float32], bittensor.utils.registration.torch.FloatTensor, list]) – The weights associated with the uids.

  • version_key (int) – The version key to use for committing and revealing. Default is version_as_int.

  • wait_for_inclusion (bool) – Whether to wait for the inclusion of the transaction. Default is False.

  • wait_for_finalization (bool) – Whether to wait for the finalization of the transaction. Default is False.

Returns:

A tuple where the first element is a boolean indicating success or failure, and the second

element is a message associated with the result

Return type:

tuple[bool, str]