mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-26 17:23:41 +00:00
Metrics and DEBG log for late gossip blocks (#2533)
## Issue Addressed Which issue # does this PR address? ## Proposed Changes - Add a counter metric to log when a block is received late from gossip. - Also push a `DEBG` log for the above condition. - Use Debug (`?`) instead of Display (`%`) for a bunch of logs in the beacon processor, so we don't have to deal with concatenated block roots. - Add new ERRO and CRIT to HTTP API to alert users when they're publishing late blocks. ## Additional Info NA
This commit is contained in:
@@ -2932,6 +2932,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.beacon_state
|
||||
.previous_epoch()
|
||||
.start_slot(T::EthSpec::slots_per_epoch());
|
||||
let head_proposer_index = new_head.beacon_block.message().proposer_index();
|
||||
|
||||
// Update the snapshot that stores the head of the chain at the time it received the
|
||||
// block.
|
||||
@@ -2962,9 +2963,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
debug!(
|
||||
self.log,
|
||||
"Delayed head block";
|
||||
"delay" => ?block_delay,
|
||||
"root" => ?beacon_block_root,
|
||||
"block_root" => ?beacon_block_root,
|
||||
"proposer_index" => head_proposer_index,
|
||||
"slot" => head_slot,
|
||||
"block_delay" => ?block_delay,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user