-
Notifications
You must be signed in to change notification settings - Fork 231
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
Feature guard the networking stuff #289
Comments
Are you just talking about the |
Also does this mean you've implemented your own tendermint rpc client in rust? Can you provide a link? |
We multiplex all rpc requests to the websocket endpoint, so we use async-tungstenite but not hyper. |
Actually we are using the rpc data types, but not the networking part. |
This might be a bit offtopic but is there any public record on why you chose async-tungstenite over e.g. rust-websocket, or even a full blown jsonrpc client library like parity's (which uses websocket-rs if I'm not mistaken)? We also use async-tungstenite for the (websocket part of) events subscription (#279) support but I'm wondering if it's worth out time caring about serilazation of the encapsulating jsonrpc messages even if this is all easy (or other details like the ping/pong control messages). We had for instance longish discussions on the jsonrpc ID field (e.g. here and here and here and offline). If there are other reasons besides async-tungstenite being really lightweight, I'm curious to learn more about them. |
Seems like hyper updated the to use socket2 instead of net2: hyperium/hyper#2206 I think we don't need to do anything here as this should automatically be updated. We only set to 0.13 here: tendermint-rs/tendermint/Cargo.toml Line 41 in b881142
and the latest hyper release 0.13.6 includes switching to socket2 as far as I can see. |
Oh I see, tokio still uses mio and this still uses net2: tokio-rs/tokio#1190 |
Ah, yeah, I guess this is the real issue, hyper is fine. |
I guess lightweight and executor agnostic(work with both tokio and smol). |
Yeah, absolutely. I wish we could only focus on these and that's about it. |
@yihuang From the conversation it wasn't clear that you depend on any of the rpc code, could you explain which parts you use in what way so we get a better understanding of how to separate the code paths. |
We used the data types in |
@yihuang we are still figuring out what the best overall structure should be for this repository and this feedback is really valuable to us in understanding how devs (plan to) use this library. We should consider breaking out the "core" types (those that live in "endpoint" in rust) into a separate crate or even moving them back to the tendermint crate. It sounds like developers should be able to use these types (go-version) without caring about the actual networking layer that provides an actual rpc endpoint: |
Alternatively we introduce fine-grained feature flags in the rpc crate which on-demand enable the client, event_listener and such. I'd assume the endpoints rightfully live in the rpc crate and it would cause more confusion and depedency hell spreading the types over both crates, unless I'm missing something. |
Sounds like the best path to move forward. |
no_std
, after separating out networking features.The text was updated successfully, but these errors were encountered: