bittensor.core.chain_data.neuron_info#

Classes#

NeuronInfo

Represents the metadata of a neuron including keys, UID, stake, rankings, and other attributes.

Module Contents#

class bittensor.core.chain_data.neuron_info.NeuronInfo#

Represents the metadata of a neuron including keys, UID, stake, rankings, and other attributes.

Variables:
  • hotkey (str) – The hotkey associated with the neuron.

  • coldkey (str) – The coldkey associated with the neuron.

  • uid (int) – The unique identifier for the neuron.

  • netuid (int) – The network unique identifier for the neuron.

  • active (int) – The active status of the neuron.

  • stake (Balance) – The balance staked to this neuron.

  • stake_dict (dict[str, Balance]) – A dictionary mapping coldkey to the amount staked.

  • total_stake (Balance) – The total amount of stake.

  • rank (float) – The rank score of the neuron.

  • emission (float) – The emission rate.

  • incentive (float) – The incentive value.

  • consensus (float) – The consensus score.

  • trust (float) – The trust score.

  • validator_trust (float) – The validation trust score.

  • dividends (float) – The dividends value.

  • last_update (int) – The timestamp of the last update.

  • validator_permit (bool) – Validator permit status.

  • weights (list[list[int]]) – List of weights associated with the neuron.

  • bonds (list[list[int]]) – List of bonds associated with the neuron.

  • pruning_score (int) – The pruning score of the neuron.

  • prometheus_info (Optional[PrometheusInfo]) – Information related to Prometheus.

  • axon_info (Optional[AxonInfo]) – Information related to Axon.

  • is_null (bool) – Indicator if this is a null neuron.

active: int#
axon_info: bittensor.core.chain_data.axon_info.AxonInfo | None = None#
bonds: list[list[int]]#
coldkey: str#
consensus: float#
dividends: float#
emission: float#
classmethod from_vec_u8(vec_u8)#

Instantiates NeuronInfo from a byte vector.

Parameters:

vec_u8 (bytes)

Return type:

NeuronInfo

classmethod from_weights_bonds_and_neuron_lite(neuron_lite, weights_as_dict, bonds_as_dict)#

Creates an instance of NeuronInfo from NeuronInfoLite and dictionaries of weights and bonds.

Parameters:
  • neuron_lite (NeuronInfoLite) – A lite version of the neuron containing basic attributes.

  • weights_as_dict (dict[int, list[tuple[int, int]]]) – A dictionary where the key is the UID and the value is a list of weight tuples associated with the neuron.

  • bonds_as_dict (dict[int, list[tuple[int, int]]]) – A dictionary where the key is the UID and the value is a list of bond tuples associated with the neuron.

Returns:

An instance of NeuronInfo populated with the provided weights and bonds.

Return type:

NeuronInfo

static get_null_neuron()#

Returns a null NeuronInfo instance.

Return type:

NeuronInfo

hotkey: str#
incentive: float#
is_null: bool = False#
last_update: int#
netuid: int#
prometheus_info: bittensor.core.chain_data.prometheus_info.PrometheusInfo | None = None#
pruning_score: int#
rank: float#
stake: bittensor.utils.balance.Balance#
stake_dict: dict[str, bittensor.utils.balance.Balance]#
total_stake: bittensor.utils.balance.Balance#
trust: float#
uid: int#
validator_permit: bool#
validator_trust: float#
weights: list[list[int]]#