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

Cli epoch-info: generate epoch-completed time from block times #18258

Merged

Conversation

CriesofCarrots
Copy link
Contributor

Problem

solana epoch-info uses recent performance samples to estimate the epoch's elapsed and total times. However, the samples only cover the last hour. This is a good enough estimate for the remaining epoch time, but we actually know the elapsed epoch time from the block times.

Summary of Changes

Use block times for the epoch-start and current Slots to calculate epoch-completed time and refine the total epoch time estimate.

Fixes #17472

t-nelson
t-nelson previously approved these changes Jun 28, 2021
Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

cli-output/src/cli_output.rs Show resolved Hide resolved
@mergify mergify bot dismissed t-nelson’s stale review June 28, 2021 19:11

Pull request has been modified.

@CriesofCarrots CriesofCarrots merged commit f2b0d56 into solana-labs:master Jun 28, 2021
mergify bot pushed a commit that referenced this pull request Jun 28, 2021
* Generate epoch-completed time from block times

* Add annotation when block times not available

(cherry picked from commit f2b0d56)
mergify bot pushed a commit that referenced this pull request Jun 28, 2021
* Generate epoch-completed time from block times

* Add annotation when block times not available

(cherry picked from commit f2b0d56)
mergify bot added a commit that referenced this pull request Jun 28, 2021
… (#18284)

* Generate epoch-completed time from block times

* Add annotation when block times not available

(cherry picked from commit f2b0d56)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
CriesofCarrots added a commit that referenced this pull request Jun 28, 2021
… (#18285)

* Generate epoch-completed time from block times

* Add annotation when block times not available

(cherry picked from commit f2b0d56)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
@CriesofCarrots CriesofCarrots deleted the epoch-completed-time branch July 28, 2021 22:30
This was referenced Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

solana epoch-info mis-estimates epoch duration as epoch end nears
2 participants