-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support for multiple devp2p capabilities #791
Comments
Hello @akirillo Sir, Is this done! |
Hi hi @mridullpandey, nope not done, I'm handling #908 right now so feel free to take this! |
@mridullpandey let us know if you'll have some capacity on this; else can unassign^^ |
Hi! I'd like to try this issue, if available. |
@mridullpandey do you intend to take this? else we can give to @anukul! |
Yes for now i'm working on other issue so we can give it to @anukul |
hey @anukul are you still on this? |
would love to take it up if not |
hey @bharath-123 i haven't gotten around to finishing this one, go for it. |
Thanks for assigning @gakonst ! Will take a look at this |
@bharath-123 are you still working on this ? If not i would love to take it on |
Yes we don't have support for eg adding snap or les. |
we support this now |
Describe the feature
The current implementation of p2p streams only supports a single capability, because we only support
eth
and are compatible with botheth/66
andeth/67
.We should implement support for multiple capabilities using message ID multiplexing.
Additional context
We already have some of the logic for message ID multiplexing via the calculation of message ID offsets, but we can't yet fully support multiple capabilities. Currently, the
EthStream
directly wraps theP2PStream
, assumeseth
is the only supported capability and just subtracts the offset for every message in the stream before decoding.To support multiple capabilities we'd need to create a new Stream type (which might need to implement
Future
or something similar) to go on top ofP2PStream
, containing its capability.The
P2PStream
would still send pings and handle pongs, but now contain a map of capabilities to their respective stream / channel. It would determine the intended capability (based on the shared capabilities / offsets), and send the message to that capabilities' stream. Each stream would be responsible for containing the offset for that stream and would only increment / decrement message IDs.The text was updated successfully, but these errors were encountered: