mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +00:00
Add specific log and metric for delayed blocks (#2308)
## Issue Addressed
NA
## Proposed Changes
- Adds a specific log and metric for when a block is enshrined as head with a delay that will caused bad attestations
- We *technically* already expose this information, but it's a little tricky to determine during debugging. This makes it nice and explicit.
- Fixes a minor reporting bug with the validator monitor where it was expecting agg. attestations too early (at half-slot rather than two-thirds-slot).
## Additional Info
NA
This commit is contained in:
@@ -528,8 +528,7 @@ impl<T: EthSpec> ValidatorMonitor<T> {
|
||||
.start_of(data.slot)
|
||||
.and_then(|slot_start| seen_timestamp.checked_sub(slot_start))
|
||||
.and_then(|gross_delay| {
|
||||
let production_delay = slot_clock.slot_duration() / 3;
|
||||
gross_delay.checked_sub(production_delay)
|
||||
gross_delay.checked_sub(slot_clock.unagg_attestation_production_delay())
|
||||
})
|
||||
.unwrap_or_else(|| Duration::from_secs(0))
|
||||
}
|
||||
@@ -619,8 +618,7 @@ impl<T: EthSpec> ValidatorMonitor<T> {
|
||||
.start_of(data.slot)
|
||||
.and_then(|slot_start| seen_timestamp.checked_sub(slot_start))
|
||||
.and_then(|gross_delay| {
|
||||
let production_delay = slot_clock.slot_duration() / 2;
|
||||
gross_delay.checked_sub(production_delay)
|
||||
gross_delay.checked_sub(slot_clock.agg_attestation_production_delay())
|
||||
})
|
||||
.unwrap_or_else(|| Duration::from_secs(0))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user