mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 13:17:09 +00:00
Resolve merge conflicts
This commit is contained in:
@@ -6,9 +6,7 @@ use crate::data_availability_checker::overflow_lru_cache::{
|
||||
DataAvailabilityCheckerInner, ReconstructColumnsDecision,
|
||||
};
|
||||
use crate::data_availability_router::AvailabilityCache;
|
||||
use crate::{
|
||||
BeaconChain, BeaconChainTypes, BeaconStore, BlockProcessStatus, CustodyContext, metrics,
|
||||
};
|
||||
use crate::{BeaconChain, BeaconChainTypes, BlockProcessStatus, CustodyContext, metrics};
|
||||
use educe::Educe;
|
||||
use kzg::Kzg;
|
||||
use slot_clock::SlotClock;
|
||||
@@ -28,7 +26,6 @@ use types::{
|
||||
|
||||
mod error;
|
||||
mod overflow_lru_cache;
|
||||
mod state_lru_cache;
|
||||
|
||||
use crate::data_availability_checker::error::Error;
|
||||
use crate::data_column_verification::{
|
||||
@@ -54,7 +51,6 @@ use types::new_non_zero_usize;
|
||||
/// `PendingComponents` are now never removed from the cache manually are only removed via LRU
|
||||
/// eviction to prevent race conditions (#7961), so we expect this cache to be full all the time.
|
||||
const OVERFLOW_LRU_CAPACITY_NON_ZERO: NonZeroUsize = new_non_zero_usize(32);
|
||||
const STATE_LRU_CAPACITY_NON_ZERO: NonZeroUsize = new_non_zero_usize(32);
|
||||
|
||||
/// Cache to hold fully valid data that can't be imported to fork-choice yet. After Dencun hard-fork
|
||||
/// blocks have a sidecar of data that is received separately from the network. We call the concept
|
||||
@@ -123,13 +119,11 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
complete_blob_backfill: bool,
|
||||
slot_clock: T::SlotClock,
|
||||
kzg: Arc<Kzg>,
|
||||
store: BeaconStore<T>,
|
||||
custody_context: Arc<CustodyContext<T::EthSpec>>,
|
||||
spec: Arc<ChainSpec>,
|
||||
) -> Result<Self, AvailabilityCheckError> {
|
||||
let inner = DataAvailabilityCheckerInner::new(
|
||||
OVERFLOW_LRU_CAPACITY_NON_ZERO,
|
||||
store,
|
||||
custody_context.clone(),
|
||||
spec.clone(),
|
||||
)?;
|
||||
@@ -360,7 +354,6 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
/// Collects metrics from the data availability checker.
|
||||
pub fn metrics(&self) -> DataAvailabilityCheckerMetrics {
|
||||
DataAvailabilityCheckerMetrics {
|
||||
state_cache_size: self.availability_cache.state_cache_size(),
|
||||
block_cache_size: self.availability_cache.block_cache_size(),
|
||||
}
|
||||
}
|
||||
@@ -575,7 +568,6 @@ impl<T: BeaconChainTypes> AvailabilityCache<T> for DataAvailabilityChecker<T> {
|
||||
|
||||
/// Helper struct to group data availability checker metrics.
|
||||
pub struct DataAvailabilityCheckerMetrics {
|
||||
pub state_cache_size: usize,
|
||||
pub block_cache_size: usize,
|
||||
}
|
||||
|
||||
@@ -927,7 +919,6 @@ mod test {
|
||||
use std::collections::HashSet;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use store::HotColdDB;
|
||||
use types::data::DataColumn;
|
||||
use types::{
|
||||
ChainSpec, ColumnIndex, DataColumnSidecarFulu, EthSpec, ForkName, MainnetEthSpec, Slot,
|
||||
@@ -1135,7 +1126,7 @@ mod test {
|
||||
let invalid_sidecar = DataColumnSidecar::Fulu(DataColumnSidecarFulu {
|
||||
column: DataColumn::<E>::empty(),
|
||||
index: *d.index(),
|
||||
kzg_commitments: d.kzg_commitments().clone(),
|
||||
kzg_commitments: d.kzg_commitments().unwrap().clone(),
|
||||
kzg_proofs: d.kzg_proofs().clone(),
|
||||
signed_block_header: d.signed_block_header().unwrap().clone(),
|
||||
kzg_commitments_inclusion_proof: d
|
||||
@@ -1265,10 +1256,9 @@ mod test {
|
||||
let slot_clock = TestingSlotClock::new(
|
||||
Slot::new(0),
|
||||
Duration::from_secs(0),
|
||||
Duration::from_secs(spec.seconds_per_slot),
|
||||
spec.get_slot_duration(),
|
||||
);
|
||||
let kzg = get_kzg(&spec);
|
||||
let store = Arc::new(HotColdDB::open_ephemeral(<_>::default(), spec.clone()).unwrap());
|
||||
let ordered_custody_column_indices = generate_data_column_indices_rand_order::<E>();
|
||||
let custody_context = Arc::new(CustodyContext::new(
|
||||
NodeCustodyType::Fullnode,
|
||||
@@ -1280,7 +1270,6 @@ mod test {
|
||||
complete_blob_backfill,
|
||||
slot_clock,
|
||||
kzg,
|
||||
store,
|
||||
custody_context,
|
||||
spec,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user