-
Notifications
You must be signed in to change notification settings - Fork 57
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
Waku Mail Client implementation part II #4
Comments
What do you mean by consecutive here? The easiest to make sure it's a request-response flow would be if they share the same ID, like in JSON-RPC. I agree that the current way of doing it is awful but it kinda follows the request-response mechanism. The request is an envelope and envelope's hash is provided in the response message.
I don't see much value in using envelopes in p2p messages. Also, when sending a payload wrapped in an envelope both parties must agree on the payload data structure anyway. Today we discussed a possibility to change to protobuf to unify the serialization/deserialization part.
👍
I would like to hear some arguments why using an envelope is beneficial for p2p messages. the |
The discussed ID here is the fixed numerical ID of the RLPx network message, not the changing run-time ID of each individual request. Let's elaborate with an example - in the LES protocol, the I'll let @kdeme comment on the question regarding the use of |
Yes, regarding the use of the I just wanted to point out that it would probably be better if P2P Request complete data gets wrapped in some structure (e.g. can be as simple as an RLP blob I guess, and then the same for the P2P request of course). Reasoning would be that currently the mail server implementation is "mostly" agnostic to the transport. Whisper/Waku does not know about its details. Except for the P2P request complete packet currently. If we make this consistent however, then it really doesn't matter how we encode inside the structure, we can do RLP for now, change to Protobuf later or something else, no impact on the Waku/Whisper code. It would be either that, or move all the mailserver parts to be on the layer of Whisper to make it consistent (no |
Thanks @zah, TIL :) |
That sounds good to me @kdeme.
Agree. I would rather have a wrapping data structure but just something tailored for request-response rather than Happy to see a proposal about how the wrapping data structure for request-response flow could look like and how it would fit into RLPx. |
Also cc @iurimatias for client part |
# This is the 1st commit message: feat: Waku Sync Protocol periodic sync & peer manager Fixes ingess messages Bindings first draft Wrapping String to/from bytes Vector added missing binds & wraps added header files feat: negentropy c integ (#2448) * chore: move negentropy to a submodule * chore: add negentropy folder in vendor dir * moved submodule to c-wrapper branch * chore: updated negentropy * chore: udpate submodule URL to use https * chore: started integrating negetropy C wrapper * chore: fixed all compilation errors wrt C-wrapper integration * chore: include sync peers to be returned as part of REST API * chore: tested insert into storage and changes done for it. * chore: experimenting with callback * chore: first test for sync * chore: revert callback changes * chore: revert temp changes * chore: write tests to verify c integration * draft: in progress changes to integrate callback based method from C * chore: in progress callback integration * chore: first working sync example with c bindings * feat: added few tests for sync protocol * chore: copy negentropy so for build to work * chore: add negentropy as dependency for test targets * chore: try to fix CI compilation issue of negentropy * chore: apply suggestions from code review Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * chore: fix naming convention changes --------- Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> # This is the commit message #2: update ref # This is the commit message #3: update submodule # This is the commit message #4: chore: consider leak fix in negentropy
The Waku (Status Whisper fork) mail client implementation was started here: status-im/nim-eth#141
This issue is about improving the implementation by addressing the many todos (some from review) in the code.
However, that work showed some pain points that could/should be improved but ideally this will require some specification changes:
requestResponse
mechanism of the DSL thep2pRequest
packet and thep2pRequestComplete
packet should have consecutive ids. While it would be possible to alter the DSL to support the current situation, the specification would benefit from having them consecutive, as it would be more clear for implementers that they are a request & response type of message.p2pRequest
wraps its data structure in a regular Whisper/Waku envelope. Thep2pRequestComplete
does not do this. It would be an improvement if both were wrapped in an envelope, this would make it more consistent and allow for the format to be agnostic for the Waku messaging protocol. Furthermore, if necessary, it would allow for encryption as with regular messages.p2pRequestComplete
contains a (custom) requestId. If therequestResponse
system is used, we would have default access to such system. Theles
protocol already follows such practise: https://github.com/ethereum/devp2p/blob/master/caps/les.md#request-id . It would make sense to work in the same way here, especially if we move that data structure into an envelope, the requestId does not fit on that layer.p2pRequest
,p2pRequestComplete
) which validation should be done on the envelope (in second case, there is no envelope..), if any at all.The text was updated successfully, but these errors were encountered: