lighthouse
lighthouse copied to clipboard
Add client support for the `lighthouse/peers` route
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, undercommon. This is to handle theDeserializelogic forInstants and exists alongside other utility crates likeclap_utils. - Addition of the
Deserializederive macro to various types underlighthouse_network(as this is where the majority of peer-related types exist) - Addition of the
get_lighthouse_peersfunction alongside the existingeth2API 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
Just bumping this. Anyone know the current state? @michaelsproul @jmcph4