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

cs/state: modify if condition in recordMetrics #4192

Closed
melekes opened this issue Nov 26, 2019 · 0 comments · Fixed by #4194
Closed

cs/state: modify if condition in recordMetrics #4192

melekes opened this issue Nov 26, 2019 · 0 comments · Fixed by #4194
Assignees
Labels
T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@melekes
Copy link
Contributor

melekes commented Nov 26, 2019

See #4146 (comment)

The only time where len(vals) != len(precommits) is when height=1 (first block does not have any precommits).

Similar loop exists in state/execution.go

@melekes melekes added the T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. label Nov 26, 2019
@melekes melekes self-assigned this Nov 26, 2019
melekes added a commit that referenced this issue Nov 26, 2019
also, do not send any LastCommitInfo.Votes for 1st block.

remember that the first LastCommit is intentionally empty, so it makes
sense for LastCommitInfo.Votes to also be empty. Because we can't really
tell if validator signed or not. Similar for ^ metrics, we can't say if
particular validator was missing or not.

Closes #4192
melekes added a commit that referenced this issue Dec 18, 2019
also

    - do not send any LastCommitInfo.Votes for 1st block.
    - use cs.LastValidators (not cs.Validators) in recordMetrics when counting missing validators

note:

remember that the first LastCommit is intentionally empty, so it makes
sense for LastCommitInfo.Votes to also be empty. Because we can't really
tell if validator signed or not. Similar for ^ metrics, we can't say if
particular validator was missing or not.

Closes #4192
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant