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
[WIP] Adding gRPC support #1075
base: master
Are you sure you want to change the base?
Conversation
ec1c987
to
bc1fc8c
Compare
Question: Does using gRPC in this API means that someone using a language different from Go can perform calls to the RPC server? |
4ffa28f
to
90e4dbf
Compare
fd4343d
to
a23eeb0
Compare
First iteration of implementation done. All functionality that I could think of is covered. Please review if I missed parts. Starting the server and listening etc is also implemented, but not yet replaced in Also, if we are concerned about the HTTP1-only users, it might be worth it to provide an HTTP gateway the way lnd does it. (It's part of an extension protocol of GRPC that automatically maps a GRPC interface to REST.) The interface would be incompatible with the current JSON-RPC interface, though. |
4d3e6db
to
5348346
Compare
5cbed59
to
d83d4ab
Compare
466cf23
to
2563ac6
Compare
Implemented a wrapper client in Also, I have been running and testing the gRPC server on my own system successfully for some time now. |
To avoid confusion when introducing gRPC support.
@jcvernaleo (as per #1530)
Wow. |
One of the main design differences is that the
grpcServer
takes (only) aserver
as argument, which significantly eases the implementation. The current RPC server uses indirects for all theserver
functionality, sometimes even just putting top level methods in one of the indirects.Progress update:
TODOs:
getblocktemplate (maybe separate small HTTP server in the mining package
behind
--getblocktemplate <interface>
)WrappedBtcdClient
in thebtcrpc
packagethat uses the respective Go structs like
chainhash.Hash
,btcutil.Tx|Block
,wire.MsgTg
,...Some questions:
btcutil.Tx|Block.Serialize
safe instead ofBtcEncode
?All current methods and the new methods that cover them:
There are WebSocket-only commands:
Additions to the API that did not exist before:
These are mentioned in the code as not implemented, but desired: