Correct Bank timestamp drift every slot (#12737) (#12777)

* Move timestamp helper to sdk

* Add Bank method for getting timestamp estimate

* Return sysvar info from Bank::clock

* Add feature-gated timestamp correction

* Rename unix_timestamp method to be more descriptive

* Review comments

* Add timestamp metric

(cherry picked from commit b028c47d2b)

# Conflicts:
#	runtime/src/feature_set.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
mergify[bot]
2020-10-10 00:42:44 +00:00
committed by GitHub
parent 2996cebfaa
commit 567a1cb944
5 changed files with 418 additions and 152 deletions

View File

@@ -45,6 +45,7 @@ pub mod short_vec;
pub mod slot_hashes;
pub mod slot_history;
pub mod stake_history;
pub mod stake_weighted_timestamp;
pub mod system_instruction;
pub mod system_program;
pub mod sysvar;