casper-network / casper-network/casper-node

Remove P dependency of networking component

Open
#4,563 0 comments 0 reactions 1 assignee Claimed by @marc-casperlabs View on GitHub
Dominant language
Rust
Stars
399
Forks
224
Avg merge
15h 44m
Merged PRs (30d)
2

Description

The networking component now has the capability (as per juliet) to route messages unseen based on channels to components. Additionally, outgoing requests do not even need to be routed, as the internal return address is passed with the callback for the response.
Ultimately, the networking component should lose its P type parameter, also causing a scrapping of the protocol (and networking component) Message type. Instead, components should define their own message types (like consensus) and encoding, only specifying the channel the relevant Bytes instance is sent through.
This allows for multiple benefits:
No more double encoding for consensus network messages
Potential for caching (i.e. in storage), as Bytes buffers are shared
Simplifcation of the networking component itself, which no longer has to deal with message deserialization
Removal of the msgpack dependency
This will also affect the Handshake itself, which should be made standalone. Potentially, a magic byte string send as the first bytes on the connection should be introduced for version negotiation, followed by a struct Handshake encoded using bytesrepr without having to rely on msgpack.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.