mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Add timing for block availability (#5510)
* Add timing for block availability * Attestation metrics analysis * Prettier printing * Add some metrics and timings to track late blocks * Update to latest unstable * fmt * Merge latest unstable * Small tweaks * Try pushing blob timing down into verification * Simplify for clippy
This commit is contained in:
@@ -19,6 +19,7 @@ pub enum Error {
|
||||
ParentStateMissing(Hash256),
|
||||
BlockReplayError(state_processing::BlockReplayError),
|
||||
RebuildingStateCaches(BeaconStateError),
|
||||
SlotClockError,
|
||||
}
|
||||
|
||||
pub enum ErrorCategory {
|
||||
@@ -39,7 +40,8 @@ impl Error {
|
||||
| Error::Unexpected
|
||||
| Error::ParentStateMissing(_)
|
||||
| Error::BlockReplayError(_)
|
||||
| Error::RebuildingStateCaches(_) => ErrorCategory::Internal,
|
||||
| Error::RebuildingStateCaches(_)
|
||||
| Error::SlotClockError => ErrorCategory::Internal,
|
||||
Error::Kzg(_)
|
||||
| Error::BlobIndexInvalid(_)
|
||||
| Error::KzgCommitmentMismatch { .. }
|
||||
|
||||
@@ -204,6 +204,12 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
executed_block,
|
||||
} = self;
|
||||
|
||||
let blobs_available_timestamp = verified_blobs
|
||||
.iter()
|
||||
.flatten()
|
||||
.map(|blob| blob.seen_timestamp())
|
||||
.max();
|
||||
|
||||
let Some(diet_executed_block) = executed_block else {
|
||||
return Err(AvailabilityCheckError::Unexpected);
|
||||
};
|
||||
@@ -231,6 +237,7 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
block_root,
|
||||
block,
|
||||
blobs: Some(verified_blobs),
|
||||
blobs_available_timestamp,
|
||||
};
|
||||
Ok(Availability::Available(Box::new(
|
||||
AvailableExecutedBlock::new(available_block, import_data, payload_verification_outcome),
|
||||
|
||||
Reference in New Issue
Block a user