besu
besu copied to clipboard
[SPIKE] Design for how to add discv5 support 3
- [ ] investigate how to utilise the discv5 library https://github.com/consensys/discovery
- [ ] look at Teku code - https://github.com/ConsenSys/teku/blob/ce6e13e32f2c5029aa05895f400c00a9c72a3f38/networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/discovery/discv5/DiscV5Service.java
- [ ] Come up with a plan for how to add support for discovery v5 - how to handle v5 incoming packets
- [ ] Share plan with other besu dev teams and get feedback
Note
Per Meredith, '... was chatting with Adrian Sutton and he mentioned that the teku discv5 implementation actually holds onto all live nodes in memory instead of just relying on the buckets data structure used within the discovery protocol. When peers are streamed from the discovery service, the bucket structure is searched as well as the list of active sessions.'
Timebox - 3 days
there is a spec discv5.1 using the consensys/discovery library which would be v5.1 https://github.com/ConsenSys/discovery/pull/72
Spoke with the other client teams. It looks like in Geth it is optional for users at this time (the client can run v4 and v5 simultaneously). We are going to have a discussion with them post-Merge to determine when/how we should move all Els to v5. And I would definitely recommend consolidating around the Teku library if it makes sense.
Discord context here on Eth R&D.