besu icon indicating copy to clipboard operation
besu copied to clipboard

[SPIKE] Design for how to add discv5 support 3

Open macfarla opened this issue 2 years ago • 2 comments

  • [ ] 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

macfarla avatar Jul 12 '22 23:07 macfarla

there is a spec discv5.1 using the consensys/discovery library which would be v5.1 https://github.com/ConsenSys/discovery/pull/72

macfarla avatar Jul 19 '22 01:07 macfarla

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.

non-fungible-nelson avatar Jul 19 '22 16:07 non-fungible-nelson