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: add node info api #353

Merged
merged 3 commits into from Sep 26, 2021
Merged

feat: add node info api #353

merged 3 commits into from Sep 26, 2021

Conversation

magicalne
Copy link
Contributor

Node info API will return godwoken version and backend configs.

$ curl http://localhost:8119 -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method":"gw_get_node_info", "params": [], "id": 1}' 

The response looks like:

{
  "jsonrpc": "2.0",
  "result": {
    "version": "0.6.4 145deca",
    "backends": [
      {
        "validator_code_hash": "0x8b00c1699f34524ddd5fe27c92a696fb63160ec63fafbbecd003cd659d88642e",
        "generator_code_hash": "0xef5effea165330db9bf6cee52fb8c42c44479e3a5e0c9d3972eb84e948734382",
        "validator_script_type_hash": "0xa16fc0d4cc190f560090f1a195113808b0128d2c2c4e7a7331e384b5b3f23d9d"
      },
      {
        "validator_code_hash": "0x5f29228f6b53741b6ba42a90fc18b32228fcbd74ee2cdc7f1cb6bad3b0a27f93",
        "generator_code_hash": "0xcbb3ea2f404cede64b72b6e3a1b4826aa04cefaf18f790e9d009ce0c604eeec7",
        "validator_script_type_hash": "0xdf17edcdcfc2635639186895d71d0e453cb5cb510252fd7fbec1d25858666605"
      },
      {
        "validator_code_hash": "0xbe4da16f86f199c7a4b73e06be9732e384b528c7072abca7a00cfaa4551114d1",
        "generator_code_hash": "0x2822eb72c552e1f25219ba27866f831200aeaa6dbb6d89688ce69cb25f9eb443",
        "validator_script_type_hash": "0xccff2ab8be3e794edd03e2f310e34bff95f404bb3c971e2c2a3c8d5056047f8b"
      }
    ]
  },
  "id": 1
}

@magicalne magicalne requested a review from a team September 23, 2021 11:42
crates/common/src/backend.rs Outdated Show resolved Hide resolved
crates/generator/src/backend_manage.rs Outdated Show resolved Hide resolved
crates/generator/src/backend_manage.rs Outdated Show resolved Hide resolved
crates/generator/src/generator.rs Outdated Show resolved Hide resolved
crates/rpc-server/src/registry.rs Outdated Show resolved Hide resolved
@jjyr jjyr merged commit 1defc7a into godwokenrises:master Sep 26, 2021
@magicalne magicalne deleted the node_info_api branch September 26, 2021 07:43
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.

None yet

2 participants