mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
Merge remote-tracking branch 'origin/unstable' into gloas-containers
This commit is contained in:
@@ -15,11 +15,13 @@ db-key = "0.0.5"
|
||||
directory = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
ethereum_ssz_derive = { workspace = true }
|
||||
fixed_bytes = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
leveldb = { version = "0.8.6", optional = true, default-features = false }
|
||||
logging = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
milhouse = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
redb = { version = "2.1.3", optional = true }
|
||||
safe_arith = { workspace = true }
|
||||
@@ -31,6 +33,7 @@ strum = { workspace = true }
|
||||
superstruct = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
typenum = { workspace = true }
|
||||
types = { workspace = true }
|
||||
xdelta3 = { workspace = true }
|
||||
zstd = { workspace = true }
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
//! of elements. To find the chunk index of a vector index: `cindex = vindex / chunk_size`.
|
||||
use self::UpdatePattern::*;
|
||||
use crate::*;
|
||||
use milhouse::{List, Vector};
|
||||
use ssz::{Decode, Encode};
|
||||
use typenum::Unsigned;
|
||||
use types::historical_summary::HistoricalSummary;
|
||||
|
||||
/// Description of how a `BeaconState` field is updated during state processing.
|
||||
@@ -784,6 +786,7 @@ impl From<milhouse::Error> for ChunkError {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use types::MainnetEthSpec as TestSpec;
|
||||
use types::*;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use crate::hdiff::HierarchyConfig;
|
||||
use crate::superstruct;
|
||||
use crate::{DBColumn, Error, StoreItem};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz::{Decode, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::io::{Read, Write};
|
||||
use std::num::NonZeroUsize;
|
||||
use strum::{Display, EnumString, EnumVariantNames};
|
||||
use strum::{Display, EnumString, VariantNames};
|
||||
use superstruct::superstruct;
|
||||
use types::EthSpec;
|
||||
use types::non_zero_usize::new_non_zero_usize;
|
||||
use zstd::{Decoder, Encoder};
|
||||
@@ -267,7 +267,7 @@ mod test {
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Display, EnumString, EnumVariantNames,
|
||||
Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Display, EnumString, VariantNames,
|
||||
)]
|
||||
#[strum(serialize_all = "lowercase")]
|
||||
pub enum DatabaseBackend {
|
||||
|
||||
@@ -3,6 +3,7 @@ use crate::hot_cold_store::{BytesKey, HotColdDBError};
|
||||
use crate::{
|
||||
ColumnIter, ColumnKeyIter, DBColumn, Error, KeyValueStoreOp, get_key_for_col, metrics,
|
||||
};
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use leveldb::{
|
||||
compaction::Compaction,
|
||||
database::{
|
||||
@@ -16,7 +17,7 @@ use leveldb::{
|
||||
use std::collections::HashSet;
|
||||
use std::marker::PhantomData;
|
||||
use std::path::Path;
|
||||
use types::{EthSpec, FixedBytesExtended, Hash256};
|
||||
use types::{EthSpec, Hash256};
|
||||
|
||||
use super::interface::WriteOptions;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::{DBColumn, hdiff};
|
||||
use leveldb::error::Error as LevelDBError;
|
||||
use ssz::DecodeError;
|
||||
use state_processing::BlockReplayError;
|
||||
use types::{BeaconStateError, EpochCacheError, Hash256, InconsistentFork, Slot, milhouse};
|
||||
use types::{BeaconStateError, EpochCacheError, Hash256, InconsistentFork, Slot};
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
use crate::{DBColumn, StoreConfig, StoreItem, metrics};
|
||||
use bls::PublicKeyBytes;
|
||||
use itertools::Itertools;
|
||||
use milhouse::List;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz::{Decode, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -11,7 +12,7 @@ use std::str::FromStr;
|
||||
use std::sync::LazyLock;
|
||||
use superstruct::superstruct;
|
||||
use types::historical_summary::HistoricalSummary;
|
||||
use types::{BeaconState, ChainSpec, Epoch, EthSpec, Hash256, List, Slot, Validator};
|
||||
use types::{BeaconState, ChainSpec, Epoch, EthSpec, Hash256, Slot, Validator};
|
||||
|
||||
static EMPTY_PUBKEY: LazyLock<PublicKeyBytes> = LazyLock::new(PublicKeyBytes::empty);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ use crate::{
|
||||
metrics::{self, COLD_METRIC, HOT_METRIC},
|
||||
parse_data_column_key,
|
||||
};
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use itertools::{Itertools, process_results};
|
||||
use lru::LruCache;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
@@ -38,6 +39,7 @@ use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tracing::{debug, error, info, instrument, warn};
|
||||
use typenum::Unsigned;
|
||||
use types::data_column_sidecar::{ColumnIndex, DataColumnSidecar, DataColumnSidecarList};
|
||||
use types::*;
|
||||
use zstd::{Decoder, Encoder};
|
||||
|
||||
@@ -2,9 +2,9 @@ use crate::errors::HandleUnavailable;
|
||||
use crate::{Error, HotColdDB, ItemStore};
|
||||
use std::borrow::Cow;
|
||||
use std::marker::PhantomData;
|
||||
use typenum::Unsigned;
|
||||
use types::{
|
||||
BeaconState, BeaconStateError, BlindedPayload, EthSpec, Hash256, SignedBeaconBlock, Slot,
|
||||
typenum::Unsigned,
|
||||
};
|
||||
|
||||
/// Implemented for types that have ancestors (e.g., blocks, states) that may be iterated over.
|
||||
@@ -387,8 +387,8 @@ mod test {
|
||||
use crate::{MemoryStore, StoreConfig as Config};
|
||||
use beacon_chain::test_utils::BeaconChainHarness;
|
||||
use beacon_chain::types::MainnetEthSpec;
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use std::sync::Arc;
|
||||
use types::FixedBytesExtended;
|
||||
|
||||
fn get_state<E: EthSpec>() -> BeaconState<E> {
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
|
||||
@@ -3,11 +3,12 @@ use crate::chunked_vector::{
|
||||
load_variable_list_from_db, load_vector_from_db,
|
||||
};
|
||||
use crate::{DBColumn, Error, KeyValueStore, KeyValueStoreOp};
|
||||
use ssz::{Decode, DecodeError, Encode};
|
||||
use milhouse::{List, Vector};
|
||||
use ssz::{BitVector, Decode, DecodeError, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::sync::Arc;
|
||||
use superstruct::superstruct;
|
||||
use types::historical_summary::HistoricalSummary;
|
||||
use types::superstruct;
|
||||
use types::*;
|
||||
|
||||
/// DEPRECATED Lightweight variant of the `BeaconState` that is stored in the database.
|
||||
|
||||
Reference in New Issue
Block a user