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

Plugin list in rpc #646

Merged
merged 6 commits into from Mar 20, 2019

Conversation

5 participants
@shargon
Copy link
Member

shargon commented Mar 19, 2019

Because now plugins are very important in NEO, we must provide a list of the plugins loaded to the user.

@shargon shargon requested review from jsolman, erikzhang and vncoelho Mar 19, 2019

@vncoelho

This comment has been minimized.

Copy link
Member

vncoelho commented Mar 19, 2019

Thanks for this @shargon's brother, I will check the call in our clients.

@vncoelho
Copy link
Member

vncoelho left a comment

{
  "jsonrpc": "2.0",
  "id": 5,
  "result": [
    {
      "name": "ApplicationLogs",
      "version": "2.10.0.0"
    },
    {
      "name": "ImportBlocks",
      "version": "2.10.0.0"
    },
    {
      "name": "RpcNep5Tracker",
      "version": "2.10.0.0"
    },
    {
      "name": "RpcSecurity",
      "version": "2.10.0.0"
    },
    {
      "name": "RpcSystemAssetTrackerPlugin",
      "version": "2.10.1.0"
    },
    {
      "name": "RpcWallet",
      "version": "2.10.0.0"
    },
    {
      "name": "SimplePolicyPlugin",
      "version": "2.10.0.0"
    },
    {
      "name": "StatesDumper",
      "version": "2.10.0.0"
    }
  ]
}
@jsolman
Copy link
Contributor

jsolman left a comment

It looks good to me.

Show resolved Hide resolved neo/Network/RPC/RpcServer.cs Outdated
Show resolved Hide resolved neo/Network/RPC/RpcServer.cs Outdated

Method name can be better as pointed out by Erik.

@igormcoelho

This comment has been minimized.

Copy link
Contributor

igormcoelho commented Mar 20, 2019

@shargon one nice thing would be nice to attach RPC methods to each RpcPlugin, because this is one of the main reasons we want this. It could be inside a details field.
For example:

{
 "jsonrpc": "2.0",
 "id": 5,
 "result": [
   {
     "name": "ApplicationLogs",
     "version": "2.10.0.0"
   },
                 ...
   {
     "name": "RpcWallet",
     "version": "2.10.0.0",  
     "details" : {
          "RpcPlugin": {
               "methods" : [ "method1", "method2", ... ]
          }
      } 
   },
   {
     "name": "SimplePolicyPlugin",
     "version": "2.10.0.0"
   },
             ...
]
}

vncoelho added some commits Mar 20, 2019

@shargon

This comment has been minimized.

Copy link
Member Author

shargon commented Mar 20, 2019

@igormcoelho But we don't have the rpc methods that the plugin expose

shargon and others added some commits Mar 20, 2019

@shargon shargon merged commit fe1834a into neo-project:master Mar 20, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@shargon shargon deleted the shargon:rpc-plugin-list branch Mar 20, 2019

@vncoelho

This comment has been minimized.

Copy link
Member

vncoelho commented Mar 20, 2019

Very good information you added, @erikzhang.

For reference and tests:

{
  "jsonrpc": "2.0",
  "id": 5,
  "result": [
    {
      "name": "ApplicationLogs",
      "version": "2.10.0.0",
      "interfaces": [
        "IRpcPlugin",
        "IPersistencePlugin"
      ]
    },
    {
      "name": "ImportBlocks",
      "version": "2.10.0.0",
      "interfaces": []
    },
    {
      "name": "RpcNep5Tracker",
      "version": "2.10.0.0",
      "interfaces": [
        "IPersistencePlugin",
        "IRpcPlugin"
      ]
    },
    {
      "name": "RpcSecurity",
      "version": "2.10.0.0",
      "interfaces": [
        "IRpcPlugin"
      ]
    },
    {
      "name": "RpcSystemAssetTrackerPlugin",
      "version": "2.10.1.0",
      "interfaces": [
        "IPersistencePlugin",
        "IRpcPlugin"
      ]
    },
    {
      "name": "RpcWallet",
      "version": "2.10.0.0",
      "interfaces": [
        "IRpcPlugin"
      ]
    },
    {
      "name": "SimplePolicyPlugin",
      "version": "2.10.0.0",
      "interfaces": [
        "ILogPlugin",
        "IPolicyPlugin"
      ]
    },
    {
      "name": "StatesDumper",
      "version": "2.10.0.0",
      "interfaces": [
        "IPersistencePlugin"
      ]
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.