-
Notifications
You must be signed in to change notification settings - Fork 224
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
[rpc] module concerns #337
Comments
Just to relay the conclusion from out of band conversations, I think this makes sense. Going with |
referencing this: #289 (comment) (@xla)
Makes most sense to me. |
Given all the recent work with the |
Motivation
As we are introducing an rpc service (aka light-node #219), now is a good time to look at different options regarding the rpc client (and soon server) lib.
The current approach seems to be to write all types and logic from scratch.
This has the major benefit that we don't introduce any dependencies, and, that we can manually guarantee compatibility with the go implementation (which might not always adhere to standards, e.g. see: tendermint/tendermint#2949).
The major drawback here is that we need to implement details that are not directly tied to tendermint core types or business logic. e.g., we need to make the jsonrpc wrapper type is properly tested (#298), or that we care about control messages in the web-socket implementation (#311).
Actionable Items
Reconsider using a library for most of the rpc server (and partly client) logic.
For that a brief writeup (adr) on pros and cons on libraries leaving a documentation trace why a particular choice was made would be ideal.
Currently paritiy's crates look most promising here:
But they might soon be replaced by an asny/awaitified variant: https://github.com/paritytech/jsonrpsee
Also, consider making the rpc module a separate crate, see: #7 (comment)
Drawbacks
related
tendermint go rpc issue: RPC Design tendermint/tendermint#3367
adr regarding rpc in tendermint go: ADR-057: RPC tendermint/tendermint#4857
subscript / event listener issue: Event subscription ADR and refactor event_listener module #313
async/await and rpc: De-asyncify RPC client & requester? #318
light node: Light Client RPC Service #219
crate dependency hell: Feature guard the networking stuff #289 and related: Cleaner directory structure #7; also over at crypto.com: at: Problem: deprecated net2 crate crypto-com/thaler#1675 (comment)
The text was updated successfully, but these errors were encountered: