Add metrics for invalid vote timestamps (#32206)

This commit is contained in:
Ashwin Sekar 2023-06-20 10:29:13 -07:00 committed by GitHub
parent 2e9aeff8dd
commit 4ba78de8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -463,6 +463,12 @@ impl Tower {
} else {
// If the previous vote did not send a timestamp due to clock error,
// use the last good timestamp + 1
datapoint_info!(
"refresh-timestamp-missing",
("heaviest-slot", heaviest_slot_on_same_fork, i64),
("last-timestamp", self.last_timestamp.timestamp, i64),
("last-slot", self.last_timestamp.slot, i64),
);
self.last_timestamp.timestamp.saturating_add(1)
};
@ -629,6 +635,13 @@ impl Tower {
timestamp,
};
return Some(timestamp);
} else {
datapoint_info!(
"backwards-timestamp",
("slot", current_slot, i64),
("timestamp", timestamp, i64),
("last-timestamp", self.last_timestamp.timestamp, i64),
)
}
}
None