-
Notifications
You must be signed in to change notification settings - Fork 998
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-Libp2p Determining Request/Response data #861
Comments
Another alternative is to put requests and responses on a different libp2p protocol -- What do you think @mslipper |
Hmm this is true. I'm kind of in favor of exploring alternative serialization formats/a message envelope to get around this issue. Having alternative libp2p protocols seems like a hack to get around a self-imposed limitation IMO. |
I agree with @mslipper . Currently we (lighthouse) are building an SSZ req/resp object which has a prepended boolean which specifies whether its a request/response. |
Closing to keep discussion in #871 |
Currently Requests/Responses are encoded with SSZ and sent across the wire.
SSZ requires a known schema in order to decode the serialized message.
For a message received on the libp2p-RPC stream, one needs to know whether the message is a request or response to decode the message appropriately. Messages could include a prefix bit, specifying which object should be decoded.
Is there a better way to handle this? Should we specify this in the spec?
The text was updated successfully, but these errors were encountered: