Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/benches/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bls::Signature;
use kzg::{KzgCommitment, KzgProof};
use types::{
BeaconBlock, BeaconBlockFulu, Blob, BlobsList, ChainSpec, EmptyBlock, EthSpec, KzgProofs,
MainnetEthSpec, SignedBeaconBlock, beacon_block_body::KzgCommitments,
MainnetEthSpec, SignedBeaconBlock, kzg_ext::KzgCommitments,
};

fn create_test_block_and_blobs<E: EthSpec>(
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/beacon_proposer_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::num::NonZeroUsize;
use std::sync::Arc;
use tracing::instrument;
use typenum::Unsigned;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;
use types::{BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, Fork, Hash256, Slot};

/// The number of sets of proposer indices that should be cached.
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/data_availability_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::metrics::{
};
use crate::observed_data_sidecars::ObservationStrategy;
pub use error::{Error as AvailabilityCheckError, ErrorCategory as AvailabilityCheckErrorCategory};
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;

/// The LRU Cache stores `PendingComponents`, which store block and its associated blob data:
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use std::cmp::Ordering;
use std::num::NonZeroUsize;
use std::sync::Arc;
use tracing::{Span, debug, debug_span};
use types::beacon_block_body::KzgCommitments;
use types::data::BlobIdentifier;
use types::kzg_ext::KzgCommitments;
use types::{
BlobSidecar, BlockImportSource, ChainSpec, ColumnIndex, DataColumnSidecar,
DataColumnSidecarList, Epoch, EthSpec, Hash256, SignedBeaconBlock,
Expand Down Expand Up @@ -839,7 +839,7 @@ mod test {
use store::{HotColdDB, ItemStore, StoreConfig, database::interface::BeaconNodeBackend};
use tempfile::{TempDir, tempdir};
use tracing::{debug_span, info};
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;
use types::{ExecPayload, MinimalEthSpec};

const LOW_VALIDATOR_COUNT: usize = 32;
Expand Down
5 changes: 2 additions & 3 deletions beacon_node/beacon_chain/src/kzg_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use rayon::prelude::*;
use ssz_types::{FixedVector, VariableList};
use std::sync::Arc;
use tracing::instrument;
use types::beacon_block_body::KzgCommitments;
use types::data::{Cell, DataColumn, DataColumnSidecarError};
use types::kzg_ext::KzgCommitments;
use types::{
Blob, BlobSidecar, BlobSidecarList, ChainSpec, DataColumnSidecar, DataColumnSidecarList,
EthSpec, Hash256, KzgCommitment, KzgProof, SignedBeaconBlock, SignedBeaconBlockHeader,
Expand Down Expand Up @@ -448,8 +448,7 @@ mod test {
use kzg::{Kzg, KzgCommitment, trusted_setup::get_trusted_setup};
use types::{
BeaconBlock, BeaconBlockFulu, BlobsList, ChainSpec, EmptyBlock, EthSpec, ForkName,
FullPayload, KzgProofs, MainnetEthSpec, SignedBeaconBlock,
beacon_block_body::KzgCommitments,
FullPayload, KzgProofs, MainnetEthSpec, SignedBeaconBlock, kzg_ext::KzgCommitments,
};

type E = MainnetEthSpec;
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/light_client_server_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use store::DBColumn;
use store::KeyValueStore;
use tracing::debug;
use tree_hash::TreeHash;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;
use types::{
BeaconBlockRef, BeaconState, ChainSpec, Checkpoint, EthSpec, ForkName, Hash256,
LightClientBootstrap, LightClientFinalityUpdate, LightClientOptimisticUpdate,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/naive_aggregation_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::collections::HashMap;
use tree_hash::{MerkleHasher, TreeHash, TreeHashType};
use types::SlotData;
use types::consts::altair::SYNC_COMMITTEE_SUBNET_COUNT;
use types::sync_committee_contribution::SyncContributionData;
use types::sync_committee::SyncContributionData;
use types::{
Attestation, AttestationData, AttestationRef, CommitteeIndex, EthSpec, Hash256, Slot,
SyncCommitteeContribution,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/pre_finalization_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::num::NonZeroUsize;
use std::time::Duration;
use tracing::debug;
use types::Hash256;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;

const BLOCK_ROOT_CACHE_LIMIT: NonZeroUsize = new_non_zero_usize(512);
const LOOKUP_LIMIT: NonZeroUsize = new_non_zero_usize(8);
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/shuffling_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use oneshot_broadcast::{Receiver, Sender, oneshot};
use tracing::debug;
use types::{
AttestationShufflingId, BeaconState, Epoch, EthSpec, Hash256, RelativeEpoch,
beacon_state::CommitteeCache,
state::CommitteeCache,
};

use crate::{BeaconChainError, metrics};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use types::sync_committee::SyncCommitteeError;
use types::{
BeaconStateError, EthSpec, Hash256, SignedContributionAndProof, Slot,
SyncCommitteeContribution, SyncCommitteeMessage, SyncSelectionProof, SyncSubnetId,
sync_committee_contribution::Error as ContributionError,
sync_committee::SyncCommitteeContributionError as ContributionError,
};

/// Returned when a sync committee contribution was not successfully verified. It might not have been verified for
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/builder_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bls::PublicKeyBytes;
use context_deserialize::ContextDeserialize;
pub use eth2::Error;
use eth2::types::beacon_response::EmptyMetadata;
use eth2::types::builder_bid::SignedBuilderBid;
use eth2::types::builder::SignedBuilderBid;
use eth2::types::{
ContentType, EthSpec, ExecutionBlockHash, ForkName, ForkVersionDecode, ForkVersionedResponse,
SignedValidatorRegistrationData, Slot,
Expand Down Expand Up @@ -542,7 +542,7 @@ mod tests {
use super::*;
use bls::Signature;
use eth2::types::MainnetEthSpec;
use eth2::types::builder_bid::{BuilderBid, BuilderBidFulu};
use eth2::types::builder::{BuilderBid, BuilderBidFulu};
use eth2::types::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use mockito::{Matcher, Server, ServerGuard};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use ssz::{Decode, TryFromIter};
use ssz_types::{FixedVector, VariableList, typenum::Unsigned};
use strum::EnumString;
use superstruct::superstruct;
use types::beacon_block_body::KzgCommitments;
use types::data::BlobsList;
use types::execution::{ConsolidationRequests, DepositRequests, RequestType, WithdrawalRequests};
use types::kzg_ext::KzgCommitments;
use types::{Blob, KzgProof};

#[derive(Debug, PartialEq, Serialize, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/execution_layer/src/engines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use tokio::sync::{Mutex, RwLock, watch};
use tokio_stream::wrappers::WatchStream;
use tracing::{debug, error, info, warn};
use types::ExecutionBlockHash;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;

/// The number of payload IDs that will be stored for each `Engine`.
///
Expand Down
8 changes: 4 additions & 4 deletions beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub use engine_api::{http, http::HttpJsonRpc, http::deposit_methods};
use engines::{Engine, EngineError};
pub use engines::{EngineState, ForkchoiceState};
use eth2::types::{BlobsBundle, FullPayloadContents};
use eth2::types::{ForkVersionedResponse, builder_bid::SignedBuilderBid};
use eth2::types::{ForkVersionedResponse, builder::SignedBuilderBid};
use fixed_bytes::UintExtended;
use fork_choice::ForkchoiceUpdateParameters;
use logging::crit;
Expand All @@ -45,10 +45,10 @@ use tokio::{
use tokio_stream::wrappers::WatchStream;
use tracing::{Instrument, debug, debug_span, error, info, instrument, warn};
use tree_hash::TreeHash;
use types::beacon_block_body::KzgCommitments;
use types::builder_bid::BuilderBid;
use types::builder::BuilderBid;
use types::execution::BlockProductionVersion;
use types::non_zero_usize::new_non_zero_usize;
use types::kzg_ext::KzgCommitments;
use types::new_non_zero_usize;
use types::{
AbstractExecPayload, BlobsList, ExecutionPayloadDeneb, ExecutionRequests, KzgProofs,
SignedBlindedBeaconBlock,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/execution_layer/src/payload_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use lru::LruCache;
use parking_lot::Mutex;
use std::num::NonZeroUsize;
use tree_hash::TreeHash;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;
use types::{EthSpec, Hash256};

pub const DEFAULT_PAYLOAD_CACHE_SIZE: NonZeroUsize = new_non_zero_usize(10);
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/execution_layer/src/test_utils/mock_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use tokio_stream::StreamExt;
use tracing::{debug, error, info, warn};
use tree_hash::TreeHash;
use types::ExecutionBlockHash;
use types::builder_bid::{
use types::builder::{
BuilderBid, BuilderBidBellatrix, BuilderBidCapella, BuilderBidDeneb, BuilderBidElectra,
BuilderBidFulu, SignedBuilderBid,
};
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/http_api/src/block_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use state_processing::BlockReplayer;
use std::num::NonZeroUsize;
use std::sync::Arc;
use tracing::{debug, warn};
use types::beacon_block::BlindedBeaconBlock;
use types::non_zero_usize::new_non_zero_usize;
use types::block::BlindedBeaconBlock;
use types::new_non_zero_usize;
use warp_utils::reject::{beacon_state_error, custom_bad_request, unhandled_error};

const STATE_CACHE_SIZE: NonZeroUsize = new_non_zero_usize(2);
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/discovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use types::{ChainSpec, EnrForkId, EthSpec};
mod subnet_predicate;
use crate::discovery::enr::{NEXT_FORK_DIGEST_ENR_KEY, PEERDAS_CUSTODY_GROUP_COUNT_ENR_KEY};
pub use subnet_predicate::subnet_predicate;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;

/// Local ENR storage filename.
pub const ENR_FILENAME: &str = "enr.dat";
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/rpc/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::sync::Arc;
use strum::IntoStaticStr;
use superstruct::superstruct;
use types::data::BlobIdentifier;
use types::light_client_update::MAX_REQUEST_LIGHT_CLIENT_UPDATES;
use types::light_client::consts::MAX_REQUEST_LIGHT_CLIENT_UPDATES;
use types::{
ChainSpec, ColumnIndex, DataColumnSidecar, DataColumnsByRootIdentifier, Epoch, EthSpec,
ForkContext, Hash256, LightClientBootstrap, LightClientFinalityUpdate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use types::{
DataColumnSubnetId, EthSpec, Hash256, IndexedAttestation, LightClientFinalityUpdate,
LightClientOptimisticUpdate, ProposerSlashing, SignedAggregateAndProof, SignedBeaconBlock,
SignedBlsToExecutionChange, SignedContributionAndProof, SignedVoluntaryExit, SingleAttestation,
Slot, SubnetId, SyncCommitteeMessage, SyncSubnetId, beacon_block::BlockImportSource,
Slot, SubnetId, SyncCommitteeMessage, SyncSubnetId, block::BlockImportSource,
};

use beacon_processor::work_reprocessing_queue::QueuedColumnReconstruction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ use std::sync::Arc;
use std::time::Duration;
use store::KzgCommitment;
use tracing::{debug, debug_span, error, info, instrument, warn};
use types::beacon_block_body::format_kzg_commitments;
use types::data::FixedBlobSidecarList;
use types::kzg_ext::format_kzg_commitments;
use types::{BlockImportSource, DataColumnSidecarList, Epoch, Hash256};

/// Id associated to a batch processing request, either a sync batch or a parent lookup.
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/operation_pool/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use state_processing::common::{
use std::collections::HashMap;
use types::{
Attestation, BeaconState, ChainSpec, EthSpec,
beacon_state::BeaconStateBase,
consts::altair::{PARTICIPATION_FLAG_WEIGHTS, PROPOSER_WEIGHT, WEIGHT_DENOMINATOR},
state::BeaconStateBase,
};

pub const PROPOSER_REWARD_DENOMINATOR: u64 =
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/store/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::num::NonZeroUsize;
use strum::{Display, EnumString, VariantNames};
use superstruct::superstruct;
use types::EthSpec;
use types::non_zero_usize::new_non_zero_usize;
use types::new_non_zero_usize;
use zstd::{Decoder, Encoder};

#[cfg(all(feature = "redb", not(feature = "leveldb")))]
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/store/src/hdiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::ops::RangeInclusive;
use std::str::FromStr;
use std::sync::LazyLock;
use superstruct::superstruct;
use types::historical_summary::HistoricalSummary;
use types::state::HistoricalSummary;
use types::{BeaconState, ChainSpec, Epoch, EthSpec, Hash256, Slot, Validator};

static EMPTY_PUBKEY: LazyLock<PublicKeyBytes> = LazyLock::new(PublicKeyBytes::empty);
Expand Down
2 changes: 1 addition & 1 deletion consensus/state_processing/src/epoch_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -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>,
Expand Down
Original file line number Diff line number Diff line change
@@ -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>,
Expand Down
Original file line number Diff line number Diff line change
@@ -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>,
Expand Down
Original file line number Diff line number Diff line change
@@ -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>(
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
4 changes: 2 additions & 2 deletions consensus/state_processing/src/per_epoch_processing/resets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
Loading