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

Add support for discv5 discovery #2799

Open
arnetheduck opened this issue Oct 29, 2024 · 2 comments
Open

Add support for discv5 discovery #2799

arnetheduck opened this issue Oct 29, 2024 · 2 comments

Comments

@arnetheduck
Copy link
Member

discv4 is on its way out - following the next hard fork, discv5 should be enabled by most, if not all, execution clients.

Both discv4 and discv5 should run on the same UDP port (it's possible to detect from the handshake which one is intended) - if discv4 is tricky to support, we can simply remove it.

@tersec
Copy link
Contributor

tersec commented Oct 29, 2024

While in theory it supports an option to check for discv5:

DiscoveryType* {.pure.} = enum
None
V4
V5

and
discovery* {.
desc: "Specify method to find suitable peer in an Ethereum network (None, V4, V5)"
longDesc:
"- None: Disables the peer discovery mechanism (manual peer addition)\n" &
"- V4 : Node Discovery Protocol v4(default)\n" &
"- V5 : Node Discovery Protocol v5"
defaultValue: DiscoveryType.V4
defaultValueDesc: $DiscoveryType.V4
name: "discovery" .}: DiscoveryType

I'm not sure if it ever checks for which type to use:

# Start Eth node
if conf.maxPeers > 0:
nimbus.networkLoop = nimbus.ethNode.connectToNetwork(
enableDiscovery = conf.discovery != DiscoveryType.None,
waitForPeers = true)

@kdeme
Copy link
Contributor

kdeme commented Oct 30, 2024

I'm not sure if it ever checks for which type to use:

It does not. Unused config setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants