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

chore(sdk): add NetworkPrimitives for NetworkManager #12530

Merged

Conversation

lakshya-sky
Copy link
Contributor

@lakshya-sky lakshya-sky commented Nov 13, 2024

closes #12517

@klkvr
Copy link
Collaborator

klkvr commented Nov 14, 2024

you should also add generic to its implementations, eg here:

impl NetworkManager {

this would highlight some more places where generic is required

@mattsse mattsse added the A-networking Related to networking in general label Nov 14, 2024
@Rjected Rjected changed the title add networkprimitives for netoworkmanager chore(sdk): add NetworkPrimitives for NetworkManager Nov 14, 2024
@lakshya-sky
Copy link
Contributor Author

@klkvr could you help me a bit here? I've updated all the places but it seems I can't keep up with the chain of all generics.

@@ -15,6 +15,7 @@ reth-network-api.workspace = true
reth-network-peers.workspace = true
reth-primitives.workspace = true
reth-tracing.workspace = true
reth-eth-wire-types.workspace = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should avoid this additional import and instead re-export EthNetworkPrimitives from the network crate

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this I'd like to change separately

@klkvr
Copy link
Collaborator

klkvr commented Nov 15, 2024

@lakshya-sky the issue is that here stream expects a stream of NodeEvents with default generic but it is actually generic over NetworkEventListenerProvider::NetworkPrimitives

I think for now it should be OK to remove NetworkPrimitives generic from NodeEvent and instead just convert Established events into Other variant

or as Matt mentioned we can just avoid touching events for now

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse added this pull request to the merge queue Nov 16, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 16, 2024
@mattsse mattsse merged commit 2dc9a06 into paradigmxyz:main Nov 16, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce NetworkPrimitives generic to NetworkManager
3 participants