Re-integration of Discovery v5
pipermerriam opened this issue · 0 comments
What is wrong?
The DDHT application is ready to be re-integrated into the main Trinity codebase.
https://github.com/ethereum/ddht/
How can it be fixed
- The
p2p/discv5
directory should be fully removed. - The ENR code needs to be extracted into a standalone library
- The
ddht
application needs to be released on pypi and installed as a dependency.
A new --enable-discovery-v5
flag should be added to allow running the new discovery service. It should run alongside the existing v4 discovery.
The new discovery service should manage an ENR record with a special field in it to indicate beam sync support. This is a stop-gap solution for the promised topic system that discv5 will support.
The new discovery service should respond to PeerCandidateRequest
events sent across the event bus. We should query our ENR database for records that signal beam sync support and prioritize returning these when fielding requests for connection candidates.