mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Remove consensus/types re-exports (#8540)
There are certain crates which we re-export within `types` which creates a fragmented DevEx, where there are various ways to import the same crates.
```rust
// consensus/types/src/lib.rs
pub use bls::{
AggregatePublicKey, AggregateSignature, Error as BlsError, Keypair, PUBLIC_KEY_BYTES_LEN,
PublicKey, PublicKeyBytes, SIGNATURE_BYTES_LEN, SecretKey, Signature, SignatureBytes,
get_withdrawal_credentials,
};
pub use context_deserialize::{ContextDeserialize, context_deserialize};
pub use fixed_bytes::FixedBytesExtended;
pub use milhouse::{self, List, Vector};
pub use ssz_types::{BitList, BitVector, FixedVector, VariableList, typenum, typenum::Unsigned};
pub use superstruct::superstruct;
```
This PR removes these re-exports and makes it explicit that these types are imported from a non-`consensus/types` crate.
Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -27,14 +27,17 @@ fs2 = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
kzg = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
milhouse = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
serde_repr = { workspace = true }
|
||||
serde_yaml = { workspace = true }
|
||||
snap = { workspace = true }
|
||||
ssz_types = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
swap_or_not_shuffle = { workspace = true }
|
||||
tree_hash = { workspace = true }
|
||||
tree_hash_derive = { workspace = true }
|
||||
typenum = { workspace = true }
|
||||
types = { workspace = true }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
use super::*;
|
||||
use crate::decode::{ssz_decode_file, ssz_decode_state, yaml_decode_file};
|
||||
use serde::Deserialize;
|
||||
use ssz_types::FixedVector;
|
||||
use tree_hash::Hash256;
|
||||
use typenum::Unsigned;
|
||||
use types::{
|
||||
BeaconBlockBody, BeaconBlockBodyCapella, BeaconBlockBodyDeneb, BeaconBlockBodyElectra,
|
||||
BeaconBlockBodyFulu, BeaconBlockBodyGloas, BeaconState, FixedVector, FullPayload, Unsigned,
|
||||
light_client_update,
|
||||
BeaconBlockBodyFulu, BeaconBlockBodyGloas, BeaconState, FullPayload, light_client_update,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
|
||||
@@ -5,12 +5,14 @@ use crate::cases::common::{DecimalU128, DecimalU256, SszStaticType};
|
||||
use crate::cases::ssz_static::{check_serialization, check_tree_hash};
|
||||
use crate::decode::{context_yaml_decode_file, log_file_access, snappy_decode_file};
|
||||
use context_deserialize::{ContextDeserialize, context_deserialize};
|
||||
use milhouse::Vector;
|
||||
use serde::{Deserialize, Deserializer, de::Error as SerdeError};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use ssz_types::{BitList, BitVector, FixedVector, VariableList};
|
||||
use tree_hash::TreeHash;
|
||||
use tree_hash_derive::TreeHash;
|
||||
use types::typenum::*;
|
||||
use types::{BitList, BitVector, FixedVector, ForkName, VariableList, Vector};
|
||||
use typenum::*;
|
||||
use types::ForkName;
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[context_deserialize(ForkName)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#![cfg(feature = "ef_tests")]
|
||||
|
||||
use ef_tests::*;
|
||||
use typenum::Unsigned;
|
||||
use types::*;
|
||||
|
||||
// Check that the hand-computed multiplications on EthSpec are correctly computed.
|
||||
|
||||
Reference in New Issue
Block a user