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

feat(dre): number of nodes per subnet for node operators #1017

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

NikolaMilosa
Copy link
Contributor

@NikolaMilosa NikolaMilosa commented Oct 18, 2024

Summary

This PR is focused into adding data related to number of nodes in subnets per node operator and adding a view of node provider data.

Node operator modifications

Equals to jq query:

dre registry | jq '[.nodes.[] | select(.subnet_id != null) | select(.node_provider_id == "sqhxa-h6ili-qkwup-ohzwn-yofnm-vvnp5-kxdhg-saabw-rvua3-xp325-zqe")] | length'

The zoomed in output of the command for each node_operator will be something like:

{
  "node_operator_principal_id": "fthz3-5otsb-xppaq-zhlut-dxel6-5fgxj-oz56h-r7zrz-xlq5z-cxpe4-uae",
  "node_allowance_remaining": 0,
  "node_allowance_total": 0,
  "node_provider_principal_id": "sqhxa-h6ili-qkwup-ohzwn-yofnm-vvnp5-kxdhg-saabw-rvua3-xp325-zqe",
  "node_provider_name": "43rd Big Idea Films",
  "dc_id": "hu1",
  "rewardable_nodes": {
    "type0": 14
  },
  "ipv6": "",
  "total_up_nodes": 14,
  "nodes_health": {
    "Healthy": [
      "5qmio-5ls3e-yujlz-eqt7k-qk5ys-bscfd-7w2rn-2q3fq-6smjq-n7asc-xae",
      "6pt6z-rdv25-glenj-xvuq3-zdeeu-4c74r-smqeh-tgt34-exgd6-2wxvv-eqe",
      "7r64j-zqmz7-krqtz-zetpm-x56et-wkege-el55a-nbgwx-dffso-lbtob-4qe",
      "akbo3-imbii-tzc4p-swdwz-hh2tg-i2ffj-tnzjy-zycuo-3xjcq-zxbth-aqe",
      "ayugg-n2ex3-azu4v-3sddp-mtbj5-k3ygp-tcmmy-pp2f3-3faes-hw77i-aqe",
      "ghmoa-vaks4-tubtk-z3wml-wglax-lrfzt-6lh7y-uwgzg-ly4iv-zubjh-iqe",
      "ham46-r7u4j-yoyrk-mrnxu-utzq3-c37he-vcns2-gc5yg-jxyv5-mvlhc-gae",
      "m2g5i-bmomq-dyjao-k642i-fsfxg-trxki-6i42q-hm6ec-xu5cd-n5jhq-sqe",
      "wh2dv-njrdv-4xdwd-dflb2-mjoel-l6pkz-e37ap-pkcjx-jyasn-hawsc-wqe",
      "wix7d-hb2a6-2pcsi-xwm54-gmlxk-gfh3d-dtfog-h7o35-vzm56-w7h34-6qe",
      "wqqsg-ww46o-muchq-pty53-amebx-mucdz-ugjkt-fvjqr-5ncmg-knqg4-aqe",
      "wxhcm-5armm-j6fvs-lts6q-waitz-k6t4q-ncfbh-2t6ee-nv2tn-keod2-uae",
      "xcfmt-vumwz-773ew-pvwnt-lgwlu-prfzm-lvitu-bx7ru-ncgqg-srhut-mae",
      "yqbqe-whgvn-teyic-zvtln-rcolf-yztin-ecal6-smlwy-6imph-6isdn-qqe"
    ]
  },
  "rewards_correct": true,
+ "nodes_in_subnets": 2
}

Node provider data

Added a dedicated section for node_providers in the dump. Current data (zoomed in to only node_providers):

    {
      "name": "DFINITY Operations SA",
      "principal": "bvcsg-3od6r-jnydw-eysln-aql7w-td5zn-ay5m6-sibd2-jzojt-anwag-mqe",
      "total_nodes": 63,
      "nodes_in_subnet": 36,
      "nodes_per_dc": {
        "mr1": 22,
        "sh1": 28,
        "zh2": 13
      }
    },
    {
      "name": "Origin Game",
      "principal": "cgmhq-c4zja-yov4u-zeyao-64ua5-idlhb-ezcgr-cultv-3vqjs-dhwo7-rqe",
      "total_nodes": 7,
      "nodes_in_subnet": 3,
      "nodes_per_dc": {
        "hk4": 7
      }
    },
    {
      "name": "Rachel Dymecki",
      "principal": "chnsu-yaqt5-6osy5-au4zn-li6yu-nufmw-dewrt-utkiu-twd76-ujypw-rae",
      "total_nodes": 1,
      "nodes_in_subnet": 0,
      "nodes_per_dc": {
        "at1": 1
      }
    }

@NikolaMilosa NikolaMilosa requested a review from a team as a code owner October 18, 2024 10:37
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I wouldn't know how they want to use dre tooling from pub. dashboard to get this info. Also I think they have everything they need to construct this aggregation is probably just a matter of adding this frontend side

@NikolaMilosa NikolaMilosa merged commit c32e885 into main Oct 21, 2024
4 checks passed
@NikolaMilosa NikolaMilosa deleted the nm-number-of-nodes-per-operator branch October 21, 2024 11:39
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

Successfully merging this pull request may close these issues.

3 participants