Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVM] Make metagraph data available as precompile #1032

Open
3 tasks
gztensor opened this issue Nov 27, 2024 · 1 comment
Open
3 tasks

[EVM] Make metagraph data available as precompile #1032

gztensor opened this issue Nov 27, 2024 · 1 comment
Assignees

Comments

@gztensor
Copy link
Contributor

gztensor commented Nov 27, 2024

Add a new precompile contract that will expose following state to EVM in the following methods. All methods should accept netuid as a parameter. Also, all methods except get get_netuid_count accept uid parameter.

Method State returned
get_uid_count SubnetworkN
get_stake Total stake of the neuron in Tao
get_rank Rank score of the neuron
get_trust Trust score assigned to the neuron by other neurons
get_consensus Consensus score of the neuron
get_incentive Incentive score representing the neuron's incentive alignment
get_dividends Dividends earned by the neuron
get_emission Emission received by the neuron (with 18 decimals)
get_vtrust Validator trust score indicating the network's trust in the neuron as a validator
get_validator_status Validator status of the neuron
get_last_updated Number of blocks since the neuron's last update
get_is_active Activity status of the neuron
get_axon Network endpoint information of the neuron
get_hotkey Hotkey (public key as bytes32) of the neuron
get_coldkey Coldkey (public key as bytes32) of the neuron

Acceptance Criteria:

  • Precompile implemented
  • ABI and sol files added
  • e2e JS tests implemented for each method
@open-junius open-junius self-assigned this Nov 29, 2024
@camfairchild
Copy link
Contributor

We also need (either a second precompile, etc.) access to the current subnets to verify a subnet is still registered/when it deregisters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants