Improve monitoring of timestamp correction and bounding (#13656)
* Include rejuvenated field in Clock parsing * Expand timestamp-correction logging info
This commit is contained in:
parent
39932d7664
commit
645598e615
|
@ -105,6 +105,7 @@ pub enum SysvarAccountType {
|
||||||
pub struct UiClock {
|
pub struct UiClock {
|
||||||
pub slot: Slot,
|
pub slot: Slot,
|
||||||
pub epoch: Epoch,
|
pub epoch: Epoch,
|
||||||
|
pub epoch_start_timestamp: UnixTimestamp,
|
||||||
pub leader_schedule_epoch: Epoch,
|
pub leader_schedule_epoch: Epoch,
|
||||||
pub unix_timestamp: UnixTimestamp,
|
pub unix_timestamp: UnixTimestamp,
|
||||||
}
|
}
|
||||||
|
@ -114,6 +115,7 @@ impl From<Clock> for UiClock {
|
||||||
Self {
|
Self {
|
||||||
slot: clock.slot,
|
slot: clock.slot,
|
||||||
epoch: clock.epoch,
|
epoch: clock.epoch,
|
||||||
|
epoch_start_timestamp: clock.epoch_start_timestamp,
|
||||||
leader_schedule_epoch: clock.leader_schedule_epoch,
|
leader_schedule_epoch: clock.leader_schedule_epoch,
|
||||||
unix_timestamp: clock.unix_timestamp,
|
unix_timestamp: clock.unix_timestamp,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1144,13 +1144,7 @@ impl Bank {
|
||||||
self.get_timestamp_estimate(estimate_type, epoch_start_timestamp)
|
self.get_timestamp_estimate(estimate_type, epoch_start_timestamp)
|
||||||
{
|
{
|
||||||
if timestamp_estimate > unix_timestamp {
|
if timestamp_estimate > unix_timestamp {
|
||||||
datapoint_info!(
|
|
||||||
"bank-timestamp-correction",
|
|
||||||
("from_genesis", unix_timestamp, i64),
|
|
||||||
("corrected", timestamp_estimate, i64),
|
|
||||||
);
|
|
||||||
unix_timestamp = timestamp_estimate;
|
unix_timestamp = timestamp_estimate;
|
||||||
|
|
||||||
let ancestor_timestamp = self.clock().unix_timestamp;
|
let ancestor_timestamp = self.clock().unix_timestamp;
|
||||||
if self
|
if self
|
||||||
.feature_set
|
.feature_set
|
||||||
|
@ -1159,6 +1153,13 @@ impl Bank {
|
||||||
{
|
{
|
||||||
unix_timestamp = ancestor_timestamp;
|
unix_timestamp = ancestor_timestamp;
|
||||||
}
|
}
|
||||||
|
datapoint_info!(
|
||||||
|
"bank-timestamp-correction",
|
||||||
|
("slot", self.slot(), i64),
|
||||||
|
("from_genesis", unix_timestamp, i64),
|
||||||
|
("corrected", timestamp_estimate, i64),
|
||||||
|
("ancestor_timestamp", ancestor_timestamp, i64),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue