Nothing Special   »   [go: up one dir, main page]

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

block/time: improve the test coverage for the BFT Time protocol #4174

Open
3 tasks
cason opened this issue Sep 24, 2024 · 0 comments
Open
3 tasks

block/time: improve the test coverage for the BFT Time protocol #4174

cason opened this issue Sep 24, 2024 · 0 comments
Labels
P:tech-debt Priority: Technical debt that needs to be paid off to enable us to move faster, reliably state testing related to unit testing in general

Comments

@cason
Copy link
Collaborator
cason commented Sep 24, 2024

The BFT Time protocol is responsible for assiging block times, and it is adopted in all release versions. From v1.x, it should be replaced by PBTS, but it is still supported and adopted by default (PBTS is enabled via a consensus parameter).

The main method for the timestamp computation is MedianTime of the types.Commit type. This method is not covered by any test unit in thetypes package. It relies on the WeightedMedian function from the types/time package, which has a single test unit, that essentially hasn't changed at all from its introduction in tendermint/tendermint#2203.

DoD

  • Write test units for the MedianTime method
  • Consider additional scenarios to test the WeightedMedian method
  • If some new critical scenario is identified, update the spec to document it
@cason cason added state P:tech-debt Priority: Technical debt that needs to be paid off to enable us to move faster, reliably testing related to unit testing in general labels Sep 24, 2024
@cason cason added this to CometBFT Sep 24, 2024
@github-project-automation github-project-automation bot moved this to Todo in CometBFT Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P:tech-debt Priority: Technical debt that needs to be paid off to enable us to move faster, reliably state testing related to unit testing in general
Projects
Status: Todo
Development

No branches or pull requests

1 participant