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

JSON-RPC #589

Open
odrotleff opened this issue Feb 4, 2018 · 7 comments
Open

JSON-RPC #589

odrotleff opened this issue Feb 4, 2018 · 7 comments

Comments

@odrotleff
Copy link

Is there a reason the wallet RPC protocol does not follow the JSON-RPC standard? Implementation would be much easier if one could use JSON-RPC libraries.

@cryptocode
Copy link
Contributor

cryptocode commented Feb 4, 2018

The formatting part is due to Boost. Some discussion here: #526

@odrotleff
Copy link
Author

That is also disappointing, but I meant following the JSON-RPC specification (http://www.jsonrpc.org/specification).

A rpc call is represented by sending a Request object to a Server. The Request object has the following members:

  • jsonrpc
    A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
  • method
    A String containing the name of the method to be invoked. Method names that begin with the word rpc followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and MUST NOT be used for anything else.
  • params
    A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.
  • id
    An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]

@cryptocode
Copy link
Contributor

cryptocode commented Feb 4, 2018

Yeah, sure, supporting json-rpc would be nice, but the first step would be to introduce a proper json library. And all this breaks existing clients, so it's definitely an RPC protocol bump.

@odrotleff
Copy link
Author

Gotcha, agreed. Is someone already working on this? My C++ is a little rusty :)

@cryptocode
Copy link
Contributor

@odrotleff Not that I'm aware of. One idea that's been talked about is to move the RPC stuff out of core and reimplement it in terms of a C api (I'm working on one api proposal, others are possibly too)

@rkeene rkeene added this to the V20.0 milestone Aug 23, 2018
@rkeene
Copy link
Contributor

rkeene commented Aug 23, 2018

There has been work on this as part of #947

@zhyatt
Copy link
Collaborator

zhyatt commented Apr 4, 2019

Related to #1434

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

No branches or pull requests

4 participants