mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 02:12:33 +00:00
Persist data columns to store (#6255)
* Persist data columns (from das PR #5196)
This commit is contained in:
@@ -108,14 +108,14 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
let custody_column_count =
|
||||
custody_subnet_count.saturating_mul(spec.data_columns_per_subnet());
|
||||
|
||||
let overflow_cache = DataAvailabilityCheckerInner::new(
|
||||
let inner = DataAvailabilityCheckerInner::new(
|
||||
OVERFLOW_LRU_CAPACITY,
|
||||
store,
|
||||
custody_column_count,
|
||||
spec.clone(),
|
||||
)?;
|
||||
Ok(Self {
|
||||
availability_cache: Arc::new(overflow_cache),
|
||||
availability_cache: Arc::new(inner),
|
||||
slot_clock,
|
||||
kzg,
|
||||
log: log.clone(),
|
||||
@@ -123,6 +123,12 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn get_custody_columns_count(&self) -> usize {
|
||||
self.availability_cache
|
||||
.custody_subnet_count()
|
||||
.saturating_mul(self.spec.data_columns_per_subnet())
|
||||
}
|
||||
|
||||
/// Checks if the block root is currenlty in the availability cache awaiting import because
|
||||
/// of missing components.
|
||||
pub fn get_execution_valid_block(
|
||||
|
||||
Reference in New Issue
Block a user