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

Base: Replace average block time with average since last hour #480

Closed
RiccardoM opened this issue Oct 28, 2021 · 0 comments · Fixed by #498
Closed

Base: Replace average block time with average since last hour #480

RiccardoM opened this issue Oct 28, 2021 · 0 comments · Fixed by #498
Assignees
Labels
base section/home Related to the home page

Comments

@RiccardoM
Copy link
Contributor

Currently BigDipper is showing the average time block since the genesis. Even though it might be interesting to show, this does not actually correspond to a valid block time that might be used inside computations. For example, let's consider the Desmos testnet and see what are the current averages.

Query
query AVBT {
  average_block_time_from_genesis {
    average_time
  }
  average_block_time_per_day {
    average_time
  }
  average_block_time_per_hour {
    average_time
  }
  average_block_time_per_minute {
    average_time
  }
}
{
  "data": {
    "average_block_time_from_genesis": [
      {
        "average_time": 5.8159952235726715
      }
    ],
    "average_block_time_per_day": [
      {
        "average_time": 5.670395760204752
      }
    ],
    "average_block_time_per_hour": [
      {
        "average_time": 5.679996694006309
      }
    ],
    "average_block_time_per_minute": [
      {
        "average_time": 5.649819909090909
      }
    ]
  }
}

As you can see, the average_block_time_from_genesis is around 5.81 seconds, while the other averages are all around 5.67 to 5.65 seconds. This is due to the fact that the average_block_time_from_genesis also considers all the chain halts that have happened. This way, the average block time will always be larger than the actual average, which might result in problems later on.

This is a problem for people that might use this value for some calculations (eg. estimated upgrade time) due to the fact that if a larger average time is considered, the upgrade will happen way before the time wanted. Considering an upgrade to happen in 30.860 blocks (~ 2 days considering a bloc time of 5.6 seconds), if the displayed average is 0.2 seconds larger (so it's 5.8 seconds), this means the upgrade will happen almost 2 hours before the estimated time. This actually happened inside our Desmos testnet.

@RiccardoM RiccardoM added section/home Related to the home page base labels Oct 28, 2021
@ryuash ryuash assigned yayay927 and unassigned ryuash Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base section/home Related to the home page
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants