Skip to content

Conversation

@flcl42
Copy link
Contributor

@flcl42 flcl42 commented Jan 2, 2026

Requires

Changes

  • Optimize allocations via deduplication of enrs
  • Refactor a bit

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@flcl42 flcl42 changed the title [WIP] Optimize discv5 Optimize discv5 Jan 6, 2026
@flcl42 flcl42 marked this pull request as ready for review January 6, 2026 15:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the discv5 discovery protocol by updating the Lantern.Discv5 package from preview.6 to preview.7, implementing allocation optimizations through ENR deduplication, and refactoring various aspects of the discovery code.

Key changes:

  • Updates Lantern.Discv5.WireProtocol package to version 1.0.0-preview.7
  • Refactors node discovery logic with improved variable naming and code patterns
  • Modifies logging levels and async operations in the discovery handler

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Directory.Packages.props Updates Lantern.Discv5.WireProtocol package version to preview.7
src/Nethermind/Nethermind.Runner/packages.lock.json Updates lock file with new package versions and transitive dependencies
src/Nethermind/Nethermind.Runner/configs/base-sepolia.json Fixes trailing whitespace formatting
src/Nethermind/Nethermind.Network.Discovery/Discv5/NettyDiscoveryV5Handler.cs Updates copyright year, changes logging levels, and modernizes code style
src/Nethermind/Nethermind.Network.Discovery/Discv5/DiscoveryV5App.cs Refactors discovery logic with improved naming, optimizes allocations, and changes async patterns

@flcl42 flcl42 merged commit cba46c2 into master Jan 8, 2026
80 checks passed
@flcl42 flcl42 deleted the optimize-discv5 branch January 8, 2026 08:25
stdevMac pushed a commit that referenced this pull request Jan 8, 2026
* Update schema

* Fix schema

* No need in type cast

* Use improved discv5; refactor

* Update PierTwo.Lantern.Discv5.WireProtocol

* Less errors

* Pooled
stdevMac pushed a commit that referenced this pull request Jan 9, 2026
* Update schema

* Fix schema

* No need in type cast

* Use improved discv5; refactor

* Update PierTwo.Lantern.Discv5.WireProtocol

* Less errors

* Pooled
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.

5 participants