Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for limited wallclock rollback #2785

Merged
merged 3 commits into from Dec 2, 2020
Merged

Allow for limited wallclock rollback #2785

merged 3 commits into from Dec 2, 2020

Conversation

mrBliss
Copy link
Contributor

@mrBliss mrBliss commented Dec 1, 2020

Fixes #2781.

By default, we will allow the system clock to roll back three seconds to account for time changes because of NTP. When this happens, TraceSystemClockMovedBack will be traced. Not that the current slot won't decrease, we'll just stay in the same slot longer.

When the system clock rolls back more than three seconds, we still shut down with the fatal SystemClockMovedBack exception.

@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Dec 1, 2020
@mrBliss mrBliss requested a review from edsko December 1, 2020 16:52
@mrBliss
Copy link
Contributor Author

mrBliss commented Dec 2, 2020

bors merge

iohk-bors bot added a commit that referenced this pull request Dec 2, 2020
2785: Allow for limited wallclock rollback r=mrBliss a=mrBliss

Fixes #2781.

By default, we will allow the system clock to roll back three seconds to account for time changes because of NTP. When this happens, `TraceSystemClockMovedBack` will be traced. Not that the current slot won't decrease, we'll just stay in the same slot longer.

When the system clock rolls back more than three seconds, we still shut down with the fatal `SystemClockMovedBack` exception.

Co-authored-by: Thomas Winant <thomas@well-typed.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 2, 2020

Build failed:

Both were isomorphic up to the time used (`UTCTime` vs `RelativeTime`).
Generalise `TraceBlockchainTimeEvent` over the time and use that in both places.
@mrBliss
Copy link
Contributor Author

mrBliss commented Dec 2, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 2, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for limited wallclock rollback
2 participants