lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Add client support for the `lighthouse/peers` route

Open jmcph4 opened this issue 2 years ago • 1 comments

Issue Addressed

N/A

Proposed Changes

This PR implements the client-side of the (non-standard) lighthouse/peers HTTP API route. To achieve this, the following changes have been made:

  • Addition of a new crate, serde_utils, under common. This is to handle the Deserialize logic for Instants and exists alongside other utility crates like clap_utils.
  • Addition of the Deserialize derive macro to various types under lighthouse_network (as this is where the majority of peer-related types exist)
  • Addition of the get_lighthouse_peers function alongside the existing eth2 API methods

Additional Info

This functionality is desirable as it allows downstream crates to contact the extended HTTP API programmatically. Desire for such functionality has already been alluded to in the codebase:

https://github.com/sigp/lighthouse/blob/stable/common/eth2/src/lighthouse.rs#L415-L421

jmcph4 avatar Nov 20 '23 23:11 jmcph4

Just bumping this. Anyone know the current state? @michaelsproul @jmcph4

AgeManning avatar Jan 31 '24 17:01 AgeManning