Remove lighthouse_network dependency from eth2 crate #6679
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
N/A
Proposed Changes
The eth2 which contains our http api client crate depends on the lighthouse_network crate for some networking types.
This is completely unnecessary imo because we can just return strings/serde_json::Value types for the networking types.
These types don't require us using any of the functions on the type structs. They just exist for some typing.
This is an enormous source of pain for any dependency that pulls the eth2 crate for using a
BeaconNodeHttpClient
because importing lighthouse_network pulls in a bunch of other dependencies that just bloats the dep tree.I don't see any reason why the networking related types cannot be represented as
String
or json values. Let me know if that is not the case.Todo