bittensor.core.extrinsics.prometheus

bittensor.core.extrinsics.prometheus#

Functions#

do_serve_prometheus(self, wallet, call_params[, ...])

Sends a serve prometheus extrinsic to the chain.

prometheus_extrinsic(subtensor, wallet, port, netuid)

Subscribes a Bittensor endpoint to the Subtensor chain.

Module Contents#

bittensor.core.extrinsics.prometheus.do_serve_prometheus(self, wallet, call_params, wait_for_inclusion=False, wait_for_finalization=True)[source]#

Sends a serve prometheus extrinsic to the chain.

Parameters:
Returns:

True if serve prometheus was successful. error (Optional[str]): Error message if serve prometheus failed, None otherwise.

Return type:

success (bool)

bittensor.core.extrinsics.prometheus.prometheus_extrinsic(subtensor, wallet, port, netuid, ip=None, wait_for_inclusion=False, wait_for_finalization=True)[source]#

Subscribes a Bittensor endpoint to the Subtensor chain.

Parameters:
  • subtensor (bittensor.core.subtensor.Subtensor) – Bittensor subtensor object.

  • wallet (bittensor_wallet.Wallet) – Bittensor wallet object.

  • ip (str) – Endpoint host port i.e., 192.122.31.4.

  • port (int) – Endpoint port number i.e., 9221.

  • netuid (int) – Network uid to serve on.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false 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 returns false if the extrinsic fails to be finalized within the timeout.

Returns:

Flag is true if extrinsic was finalized or uncluded in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)