-
Notifications
You must be signed in to change notification settings - Fork 946
Reduce eth2 dependency space
#8524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,36 +5,33 @@ authors = ["Paul Hauner <[email protected]>"] | |
| edition = { workspace = true } | ||
|
|
||
| [features] | ||
| default = ["lighthouse"] | ||
| lighthouse = [] | ||
| default = [] | ||
| lighthouse = ["proto_array", "eth2_keystore", "eip_3076", "zeroize"] | ||
| events = ["reqwest-eventsource", "futures", "futures-util"] | ||
|
|
||
| [dependencies] | ||
| context_deserialize = { workspace = true } | ||
| educe = { workspace = true } | ||
| eip_3076 = { workspace = true } | ||
| either = { workspace = true } | ||
| enr = { version = "0.13.0", features = ["ed25519"] } | ||
| eth2_keystore = { workspace = true } | ||
| eip_3076 = { workspace = true, optional = true } | ||
| eth2_keystore = { workspace = true, optional = true } | ||
| ethereum_serde_utils = { workspace = true } | ||
| ethereum_ssz = { workspace = true } | ||
| ethereum_ssz_derive = { workspace = true } | ||
| futures = { workspace = true } | ||
| futures-util = "0.3.8" | ||
| libp2p-identity = { version = "0.2", features = ["peerid"] } | ||
| futures = { workspace = true, optional = true } | ||
| futures-util = { version = "0.3.8", optional = true } | ||
| mediatype = "0.19.13" | ||
| multiaddr = "0.18.2" | ||
| pretty_reqwest_error = { workspace = true } | ||
| proto_array = { workspace = true } | ||
| rand = { workspace = true } | ||
| proto_array = { workspace = true, optional = true } | ||
| reqwest = { workspace = true } | ||
| reqwest-eventsource = "0.6.0" | ||
| reqwest-eventsource = { version = "0.6.0", optional = true } | ||
| sensitive_url = { workspace = true } | ||
| serde = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| ssz_types = { workspace = true } | ||
| test_random_derive = { path = "../../common/test_random_derive" } | ||
| types = { workspace = true } | ||
| zeroize = { workspace = true } | ||
| zeroize = { workspace = true, optional = true } | ||
|
|
||
| [dev-dependencies] | ||
| rand = { workspace = true } | ||
| test_random_derive = { path = "../../common/test_random_derive" } | ||
| tokio = { workspace = true } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| //! This module exposes a superset of the `types` crate. It adds additional types that are only | ||
| //! required for the HTTP API. | ||
|
|
||
| pub use types::*; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like that the git blame for this line will now be your username 😉 |
||
|
|
||
| use crate::{ | ||
| CONSENSUS_BLOCK_VALUE_HEADER, CONSENSUS_VERSION_HEADER, EXECUTION_PAYLOAD_BLINDED_HEADER, | ||
| EXECUTION_PAYLOAD_VALUE_HEADER, Error as ServerError, | ||
| }; | ||
| use enr::{CombinedKey, Enr}; | ||
| use mediatype::{MediaType, MediaTypeList, names}; | ||
| use multiaddr::Multiaddr; | ||
| use reqwest::header::HeaderMap; | ||
| use serde::{Deserialize, Deserializer, Serialize}; | ||
| use serde_utils::quoted_u64::Quoted; | ||
|
|
@@ -18,9 +18,11 @@ use std::fmt::{self, Display}; | |
| use std::str::FromStr; | ||
| use std::sync::Arc; | ||
| use std::time::Duration; | ||
|
|
||
| #[cfg(test)] | ||
| use test_random_derive::TestRandom; | ||
| #[cfg(test)] | ||
| use types::test_utils::TestRandom; | ||
| pub use types::*; | ||
|
|
||
| // TODO(mac): Temporary module and re-export hack to expose old `consensus/types` via `eth2/types`. | ||
| pub use crate::beacon_response::*; | ||
|
|
@@ -557,9 +559,9 @@ pub struct ChainHeadData { | |
| #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
| pub struct IdentityData { | ||
| pub peer_id: String, | ||
| pub enr: Enr<CombinedKey>, | ||
| pub p2p_addresses: Vec<Multiaddr>, | ||
| pub discovery_addresses: Vec<Multiaddr>, | ||
| pub enr: String, | ||
| pub p2p_addresses: Vec<String>, | ||
| pub discovery_addresses: Vec<String>, | ||
| pub metadata: MetaData, | ||
| } | ||
|
|
||
|
|
@@ -2208,7 +2210,8 @@ pub enum ContentType { | |
| Ssz, | ||
| } | ||
|
|
||
| #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Encode, Decode, TestRandom)] | ||
| #[cfg_attr(test, derive(TestRandom))] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noting that this attribute means we will not be able to use This is fine at the moment, but might need to be adjusted in future. And in general I think we should be wary of putting any actual code behind |
||
| #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Encode, Decode)] | ||
| #[serde(bound = "E: EthSpec")] | ||
| pub struct BlobsBundle<E: EthSpec> { | ||
| pub commitments: KzgCommitments<E>, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing we could do is split the "standard" VC endpoints and Lighthouse VC endpoints. At the moment both are under the same feature as
lighthouse. Only the standard VC endpoints requireeip_3076, for example.