mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Remove remaining facade module re-exports from consensus/types (#8672)
Removes the remaining facade re-exports from `consensus/types`. I have left `graffiti` as I think it has some utility so am leaning towards keeping it in the final API design. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::metrics;
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use safe_arith::SafeArith;
|
||||
use tracing::instrument;
|
||||
use types::epoch_cache::{EpochCache, EpochCacheError, EpochCacheKey};
|
||||
use types::state::{EpochCache, EpochCacheError, EpochCacheKey};
|
||||
use types::{ActivationQueue, BeaconState, ChainSpec, EthSpec, ForkName, Hash256};
|
||||
|
||||
/// Precursor to an `EpochCache`.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use crate::EpochProcessingError;
|
||||
use crate::per_epoch_processing::single_pass::{SinglePassConfig, process_epoch_single_pass};
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::chain_spec::ChainSpec;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::{ChainSpec, EthSpec};
|
||||
use types::state::BeaconState;
|
||||
|
||||
/// Slow version of `process_inactivity_updates` that runs a subset of single-pass processing.
|
||||
///
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::EpochProcessingError;
|
||||
use milhouse::List;
|
||||
use types::attestation::ParticipationFlags;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::EthSpec;
|
||||
use types::state::BeaconState;
|
||||
|
||||
pub fn process_participation_flag_updates<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
use crate::EpochProcessingError;
|
||||
use safe_arith::SafeArith;
|
||||
use std::sync::Arc;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::chain_spec::ChainSpec;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::{ChainSpec, EthSpec};
|
||||
use types::state::BeaconState;
|
||||
|
||||
pub fn process_sync_committee_updates<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::EpochProcessingError;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::EthSpec;
|
||||
use types::state::BeaconState;
|
||||
|
||||
pub fn process_participation_record_updates<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::EpochProcessingError;
|
||||
use safe_arith::SafeArith;
|
||||
use types::historical_summary::HistoricalSummary;
|
||||
use types::state::HistoricalSummary;
|
||||
use types::{BeaconState, EthSpec};
|
||||
|
||||
pub fn process_historical_summaries_update<E: EthSpec>(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use super::errors::EpochProcessingError;
|
||||
use crate::per_epoch_processing::single_pass::{SinglePassConfig, process_epoch_single_pass};
|
||||
use safe_arith::SafeArith;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::chain_spec::ChainSpec;
|
||||
use types::core::ChainSpec;
|
||||
use types::state::BeaconState;
|
||||
use types::{BeaconStateError, EthSpec};
|
||||
|
||||
/// This implementation is now only used in phase0. Later hard forks use single-pass.
|
||||
|
||||
@@ -2,8 +2,8 @@ use super::errors::EpochProcessingError;
|
||||
use safe_arith::SafeArith;
|
||||
use tree_hash::TreeHash;
|
||||
use typenum::Unsigned;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::EthSpec;
|
||||
use types::state::BeaconState;
|
||||
|
||||
pub fn process_historical_roots_update<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
@@ -2,8 +2,8 @@ use super::errors::EpochProcessingError;
|
||||
use milhouse::List;
|
||||
use safe_arith::SafeArith;
|
||||
use typenum::Unsigned;
|
||||
use types::beacon_state::BeaconState;
|
||||
use types::eth_spec::EthSpec;
|
||||
use types::core::EthSpec;
|
||||
use types::state::BeaconState;
|
||||
|
||||
pub fn process_eth1_data_reset<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
@@ -49,60 +49,6 @@ pub use sync_committee::*;
|
||||
pub use validator::*;
|
||||
pub use withdrawal::*;
|
||||
|
||||
// Temporary facade modules to maintain backwards compatibility for Lighthouse.
|
||||
pub mod eth_spec {
|
||||
pub use crate::core::EthSpec;
|
||||
}
|
||||
|
||||
pub mod chain_spec {
|
||||
pub use crate::core::ChainSpec;
|
||||
}
|
||||
|
||||
pub mod beacon_block {
|
||||
pub use crate::block::{BlindedBeaconBlock, BlockImportSource};
|
||||
}
|
||||
|
||||
pub mod beacon_block_body {
|
||||
pub use crate::kzg_ext::{KzgCommitments, format_kzg_commitments};
|
||||
}
|
||||
|
||||
pub mod beacon_state {
|
||||
pub use crate::state::{
|
||||
BeaconState, BeaconStateBase, CommitteeCache, compute_committee_index_in_epoch,
|
||||
compute_committee_range_in_epoch, epoch_committee_count,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod graffiti {
|
||||
pub use crate::core::GraffitiString;
|
||||
}
|
||||
|
||||
pub mod historical_summary {
|
||||
pub use crate::state::HistoricalSummary;
|
||||
}
|
||||
|
||||
pub mod epoch_cache {
|
||||
pub use crate::state::{EpochCache, EpochCacheError, EpochCacheKey};
|
||||
}
|
||||
|
||||
pub mod non_zero_usize {
|
||||
pub use crate::core::new_non_zero_usize;
|
||||
}
|
||||
|
||||
pub mod builder_bid {
|
||||
pub use crate::builder::*;
|
||||
}
|
||||
|
||||
pub mod light_client_update {
|
||||
pub use crate::light_client::consts::{
|
||||
CURRENT_SYNC_COMMITTEE_INDEX, CURRENT_SYNC_COMMITTEE_INDEX_ELECTRA, FINALIZED_ROOT_INDEX,
|
||||
FINALIZED_ROOT_INDEX_ELECTRA, MAX_REQUEST_LIGHT_CLIENT_UPDATES, NEXT_SYNC_COMMITTEE_INDEX,
|
||||
NEXT_SYNC_COMMITTEE_INDEX_ELECTRA,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod sync_committee_contribution {
|
||||
pub use crate::sync_committee::{
|
||||
SyncCommitteeContributionError as Error, SyncContributionData,
|
||||
};
|
||||
pub use crate::core::{GRAFFITI_BYTES_LEN, Graffiti, GraffitiString};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user