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

feat: support disc v4/v5 mix mode in bootnode #29717

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

2129zxl
Copy link

@2129zxl 2129zxl commented May 7, 2024

Description

The p2p module in geth has already implemented sharedUdp to enable coexistence of node discovery protocols for both v4 and v5. However, node discovery in the bootnode currently supports only a single protocol. This PR has achieved a mix of v4 and v5 protocols for the bootnode, allowing it to provide node discovery functionality to geth nodes running different versions simultaneously.

Tests

3 scenarios has been tested:

v4=true and v5=false, it only supported discv4
v5=true and v4=false, it only supported discv5 (defalut config)
v5=true and v4=true, it supported both discv5 and discv4

Additional context

A new configuration option --v4 has been added. The configuration method is similar to that of geth. When both are set to true, both protocols are supported simultaneously. The default values are --v5=true --v4=false, meaning only the v5 protocol is supported by default.

@Ashflower13
Copy link

Ashflower13 commented May 7, 2024 via email

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.

None yet

2 participants