Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jimmygchen opened this issue Jan 8, 2025 · 0 comments
Open
Labels
das Data Availability Sampling optimization Something to make Lighthouse run more efficiently.

Comments

@jimmygchen
Copy link
Member

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>>>,
}

@jimmygchen jimmygchen added optimization Something to make Lighthouse run more efficiently. das Data Availability Sampling labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling optimization Something to make Lighthouse run more efficiently.
Projects
None yet
Development

No branches or pull requests

1 participant