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

Add command for fetching compute committees #104

Closed
matevz opened this issue Jul 6, 2023 · 1 comment · Fixed by #235
Closed

Add command for fetching compute committees #104

matevz opened this issue Jul 6, 2023 · 1 comment · Fixed by #235

Comments

@matevz
Copy link
Member

matevz commented Jul 6, 2023

Currently, you can do oasis net show nodes, but you cannot determine which of those are actually elected in the (compute) committee for each ParaTime. Add something like oasis net show committee <ParaTimeID> which dumps the list of nodes in the given compute committee (and optionally for the specific block height).

@matevz
Copy link
Member Author

matevz commented Jul 6, 2023

Cheatsheet:

cc.RootHash().GetRuntimeState(ctx, &roothash.RuntimeRequest{Height: height, RuntimeID: runtimeID})
{
  "runtime": {
    ... snip descriptor ...
  },
  "genesis_block": {
    "header": {
      "version": 0,
      "namespace": "000000000000000000000000000000000000000000000000f80306c9858e7279",
      "round": 0,
      "timestamp": "2022-12-16T16:21:36+01:00",
      "header_type": 1,
      "previous_hash": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
      "io_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
      "state_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
      "messages_hash": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
      "in_msgs_hash": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a"
    }
  },
  "current_block": {
    "header": {
      "version": 0,
      "namespace": "000000000000000000000000000000000000000000000000f80306c9858e7279",
      "round": 622601,
      "timestamp": "2023-07-06T15:16:57+02:00",
      "header_type": 1,
      "previous_hash": "bdd2620678a6a495c7753bc3f2b9b501015559c1a24230b1ce499b51b2d3c9cb",
      "io_root": "e537e21170cd4e95bad8f42ed0158711cef96546abe830f0c635633a4f63bbee",
      "state_root": "6f87f15d07a4e3acc8b676cb5257262d9b6a6036a4bdd0082889ca7bc5cf8a3b",
      "messages_hash": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a",
      "in_msgs_hash": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a"
    }
  },
  "current_block_height": 14660194,
  "last_normal_round": 622601,
  "last_normal_height": 14660194,
  "executor_pool": {
    "runtime": {
      ... snip descriptor ...
    },
    "committee": {
      "kind": "executor",
      "members": [
        {
          "role": "worker",
          "public_key": "jU3L9MZTHv1v7XgbrMj/uUdUvnJmMSUmosFgjbOR3tA="
        },
        {
          "role": "worker",
          "public_key": "aUWd3B3JH+ixfplKiKKPhU+MQ866u246PT2LZd8MADI="
        },
        {
          "role": "worker",
          "public_key": "ITrwEekdZNqXrEzvw3GT6Q3AtHDd51f19nD2nVU/f0c="
        },
        {
          "role": "worker",
          "public_key": "+JOOp6OMmzldm9Dy7Cnbl/FE66bNkU0TJquOYnQIv7s="
        },
        {
          "role": "worker",
          "public_key": "4wqhqp5wDAfvQxNZUUSDmM2fVYrkxKq/tqjnnCe72Uw="
        },
        {
          "role": "backup-worker",
          "public_key": "rK6mrmCRi2dYPNraNwqg2jgEVi4sd6hi53JmT2HVGxQ="
        },
        {
          "role": "backup-worker",
          "public_key": "C+AWG4iXz590kCdbO/DAb4sBZr+umjyp683ucmawdM4="
        },
        {
          "role": "backup-worker",
          "public_key": "bKvnByvx8qwF41EqOG6wdmatGzz/qT2nbHC8i8VM65k="
        },
        {
          "role": "backup-worker",
          "public_key": "Weh9Ef8IwZaj02lgIpg9nGUpmR1YkOj3yzso8xSHdW8="
        },
        {
          "role": "backup-worker",
          "public_key": "fn3LWIvMtary53Apk1srDB/I9SxjbpYf9Tt2bH3Qkf4="
        },
        {
          "role": "backup-worker",
          "public_key": "XCiPWblWT3n1aN2NI0vslmlfV9GOkxE2Ih2SI66ZR38="
        },
        {
          "role": "backup-worker",
          "public_key": "NM/XberrrMrvavGDCYc9CX8HPT1TPz1YHWuBaDArDHc="
        }
      ],
      "runtime_id": "000000000000000000000000000000000000000000000000f80306c9858e7279",
      "valid_for": 24420
    },
    "round": 622601,
    "discrepancy": false,
    "next_timeout": 0
  },
  "liveness_stats": {
    "total_rounds": 103,
    "good_rounds": [
      103,
      88,
      103,
      103,
      103,
      103,
      103,
      103,
      103,
      103,
      103,
      103
    ]
  }
}

Extract the executors in the committee->members field.

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 a pull request may close this issue.

1 participant