mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Gloas payload cache (#9209)
In Gloas, beacon blocks are imported into fork choice immediately - the payload envelope and data columns arrive separately. KZG commitments moved from the column sidecar into the execution payload bid, so the existing `DataAvailabilityChecker` (which assumes block and data are coupled) can't be used for Gloas. * Introduced `PendingPayloadCache` to keep track of payload and data columns per block root. * Added gossip column verification * Added support for Gloas data column reconstruction * Payload envelope verification simplified: removed `MaybeAvailableEnvelope`, `ExecutedEnvelope`, `EnvelopeImportData` Not yet implemented (tracked with TODOs): - Proper lookup sync for Gloas columns arriving before blocks - Partial column merging for Gloas - Moving `load_gloas_payload_bid` disk reads off the async runtime - Backfill/range sync for Gloas Based on @eserilev's PR and work in progress. See also #9202 for verification. Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: Daniel Knopik <daniel@dknopik.de> Co-Authored-By: Daniel Knopik <107140945+dknopik@users.noreply.github.com> Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ use types::{BeaconStateError, ColumnIndex, Hash256};
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
InvalidBlobs(KzgError),
|
||||
MissingBid(Hash256),
|
||||
InvalidColumn((Option<ColumnIndex>, KzgError)),
|
||||
ReconstructColumnsError(KzgError),
|
||||
KzgCommitmentMismatch {
|
||||
@@ -23,6 +24,7 @@ pub enum Error {
|
||||
RebuildingStateCaches(BeaconStateError),
|
||||
SlotClockError,
|
||||
InvalidAvailableBlockData,
|
||||
InvalidVariant,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
@@ -38,6 +40,7 @@ impl Error {
|
||||
match self {
|
||||
Error::SszTypes(_)
|
||||
| Error::MissingBlobs
|
||||
| Error::MissingBid(_)
|
||||
| Error::MissingCustodyColumns
|
||||
| Error::StoreError(_)
|
||||
| Error::DecodeError(_)
|
||||
@@ -46,7 +49,8 @@ impl Error {
|
||||
| Error::BlockReplayError(_)
|
||||
| Error::RebuildingStateCaches(_)
|
||||
| Error::SlotClockError
|
||||
| Error::InvalidAvailableBlockData => ErrorCategory::Internal,
|
||||
| Error::InvalidAvailableBlockData
|
||||
| Error::InvalidVariant => ErrorCategory::Internal,
|
||||
Error::InvalidBlobs { .. }
|
||||
| Error::InvalidColumn { .. }
|
||||
| Error::ReconstructColumnsError { .. }
|
||||
|
||||
@@ -109,7 +109,7 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
/// Returns the indices of cached custody columns
|
||||
/// Returns the indices of cached sampling columns
|
||||
pub fn get_cached_data_columns_indices(&self) -> Vec<ColumnIndex> {
|
||||
self.verified_data_columns
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user