Skip to content
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

Closed
akirillo opened this issue Jan 10, 2023 · 14 comments
Closed

Support for multiple devp2p capabilities #791

akirillo opened this issue Jan 10, 2023 · 14 comments
Assignees
Labels
A-devp2p Related to the Ethereum P2P protocol C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@akirillo
Copy link
Contributor

akirillo commented Jan 10, 2023

Describe the feature

The current implementation of p2p streams only supports a single capability, because we only support eth and are compatible with both eth/66 and eth/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 the P2PStream, assumes eth 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 of P2PStream, 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.

@akirillo akirillo added C-enhancement New feature or request A-devp2p Related to the Ethereum P2P protocol labels Jan 10, 2023
@akirillo akirillo self-assigned this Jan 14, 2023
@akirillo akirillo removed their assignment Jan 18, 2023
@mridullpandey
Copy link

Hello @akirillo Sir, Is this done!
If not I would love to take this

@akirillo
Copy link
Contributor Author

Hello @akirillo Sir, Is this done!

If not I would love to take this

Hi hi @mridullpandey, nope not done, I'm handling #908 right now so feel free to take this!

@gakonst
Copy link
Member

gakonst commented Feb 2, 2023

@mridullpandey let us know if you'll have some capacity on this; else can unassign^^

@gakonst gakonst added the D-good-first-issue Nice and easy! A great choice to get started label Feb 2, 2023
@anukul
Copy link

anukul commented Feb 12, 2023

Hi! I'd like to try this issue, if available.

@gakonst
Copy link
Member

gakonst commented Feb 12, 2023

@mridullpandey do you intend to take this? else we can give to @anukul!

@mridullpandey
Copy link

Yes for now i'm working on other issue so we can give it to @anukul

@mridullpandey mridullpandey removed their assignment Feb 12, 2023
@bharath-123
Copy link
Contributor

hey @anukul are you still on this?

@bharath-123
Copy link
Contributor

would love to take it up if not

@anukul
Copy link

anukul commented Apr 3, 2023

hey @bharath-123 i haven't gotten around to finishing this one, go for it.

@bharath-123
Copy link
Contributor

Thanks for assigning @gakonst ! Will take a look at this

@distributedstatemachine
Copy link
Contributor

@bharath-123 are you still working on this ? If not i would love to take it on

@onbjerg
Copy link
Collaborator

onbjerg commented May 29, 2023

Still relevant @mattsse @Rjected?

@gakonst
Copy link
Member

gakonst commented May 29, 2023

Yes we don't have support for eg adding snap or les.

@mattsse
Copy link
Collaborator

mattsse commented Dec 15, 2023

we support this now

@mattsse mattsse closed this as completed Dec 15, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devp2p Related to the Ethereum P2P protocol C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

No branches or pull requests

8 participants