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:
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.
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