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

Option to run Discovery V4 and V5 on the same port #7213

Merged
merged 115 commits into from
Aug 12, 2024
Merged

Conversation

alexb5dh
Copy link
Contributor

@alexb5dh alexb5dh commented Jun 23, 2024

  • Versions to use (v4, v5, both) are now configurable, but same port is used when multiple are enabled. In such case same UDP connection (Netty IDatagramChannel) is used.
  • Channel is injected into Lantern.Discv5 implementation via adapter for its IUdpConnection.
  • Connection-management code moved from DiscoveryApp to a new DiscoveryConnectionsPool.
  • Discovery initialization code moved from InitializeNetwork to a new CompositeDiscoveryApp.
  • When both versions are enabled, all incoming messages are received by v4 handler first, which than forwards it to v5 if it doesn't manage to recognize the format. Otherwise, only enabled handler is being used.

Depends on Pier-Two/Lantern.Discv5#105 being published on Nuget

@flcl42 flcl42 requested a review from marcindsobczak July 22, 2024 13:47
@alexb5dh alexb5dh force-pushed the discv5-v4-same-port branch from 806a358 to ae96529 Compare August 5, 2024 12:31
@alexb5dh alexb5dh force-pushed the discv5-v4-same-port branch from 496c199 to 9c971c1 Compare August 12, 2024 17:25
@alexb5dh alexb5dh merged commit b865db8 into master Aug 12, 2024
66 checks passed
@alexb5dh alexb5dh deleted the discv5-v4-same-port branch August 12, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants