feat: support disc v4/v5 mix mode in bootnode #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR to upstream link
Description
The p2p module in op-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:
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.Metadata
N/A