bittensor.core.extrinsics.prometheus#
Functions#
|
Sends a serve prometheus extrinsic to the chain. |
|
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:
self (bittensor.core.subtensor.Subtensor) – Bittensor subtensor object
wallet (bittensor_wallet.Wallet) – Wallet object.
call_params (bittensor.core.types.PrometheusServeCallParams) – Prometheus serve call parameters.
wait_for_inclusion (bool) – If
true
, waits for inclusion.wait_for_finalization (bool) – If
true
, waits for finalization.
- 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 returnsfalse
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 returnsfalse
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 istrue
.- Return type:
success (bool)