Skip to content

Only allow one data column computation at a time for a given block #6764

Open
@jimmygchen

Description

@jimmygchen

Description

See this comment for context.

Currently we allow for reconstruction and multiple column computation for the same block to happen at the same time, this is wasteful and we can avoid this.

In PendingComponents, we track reconstruction with a bool reconstruction_started and we track blob to column computation with a data_column_recv. We should be able to replace the reconstruction_started usage with data_column_recv as well, and check if data_column_recv is Some before triggering either 1/ blob to column computation or 2/ column reconstruction.

/// This represents the components of a partially available block
///
/// The blobs are all gossip and kzg verified.
/// The block has completed all verifications except the availability check.
pub struct PendingComponents<E: EthSpec> {
pub block_root: Hash256,
pub verified_blobs: FixedVector<Option<KzgVerifiedBlob<E>>, E::MaxBlobsPerBlock>,
pub verified_data_columns: Vec<KzgVerifiedCustodyDataColumn<E>>,
pub executed_block: Option<DietAvailabilityPendingExecutedBlock<E>>,
pub reconstruction_started: bool,
/// Receiver for data columns that are computed asynchronously;
///
/// If `data_column_recv` is `Some`, it means data column computation or reconstruction has been
/// started. This can happen either via engine blobs fetching or data column reconstruction
/// (triggered when >= 50% columns are received via gossip).
pub data_column_recv: Option<oneshot::Receiver<DataColumnSidecarList<E>>>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockeddasData Availability SamplingoptimizationSomething to make Lighthouse run more efficiently.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions