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

vote: Complete vote keeper #39

Merged
merged 18 commits into from
Nov 7, 2023

Conversation

romac
Copy link
Member

@romac romac commented Oct 31, 2023

Closes: #25

Based on the spec at #30 and the ADR at #32

@romac romac added the work in progress Work in progress label Oct 31, 2023
@romac romac force-pushed the romac/complete-vote-keeper branch from 08d3ae9 to 1a551d6 Compare November 1, 2023 11:58
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Merging #39 (ede3908) into romac/rust-state-machine (f53355f) will decrease coverage by 1.95%.
The diff coverage is 81.39%.

@@                     Coverage Diff                      @@
##           romac/rust-state-machine      #39      +/-   ##
============================================================
- Coverage                     86.21%   84.26%   -1.95%     
============================================================
  Files                            20       23       +3     
  Lines                          1037     1220     +183     
============================================================
+ Hits                            894     1028     +134     
- Misses                          143      192      +49     
Files Coverage Δ
Code/common/src/round.rs 98.00% <100.00%> (ø)
Code/round/src/events.rs 0.00% <ø> (ø)
Code/consensus/src/executor.rs 85.81% <50.00%> (-0.90%) ⬇️
Code/round/src/state_machine.rs 71.74% <0.00%> (ø)
Code/vote/src/count.rs 98.00% <97.69%> (+1.21%) ⬆️
Code/vote/src/value_weights.rs 91.84% <91.84%> (ø)
Code/test/src/value.rs 71.88% <0.00%> (-16.59%) ⬇️
Code/vote/src/lib.rs 57.89% <60.00%> (-34.96%) ⬇️
Code/vote/src/round_votes.rs 70.00% <70.00%> (ø)
Code/vote/src/round_weights.rs 45.83% <45.83%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@romac romac removed the work in progress Work in progress label Nov 2, 2023
@romac romac requested a review from ancazamfir November 2, 2023 14:52
@romac romac marked this pull request as ready for review November 2, 2023 14:52
@romac romac merged commit 52d51a4 into romac/rust-state-machine Nov 7, 2023
@romac romac deleted the romac/complete-vote-keeper branch November 7, 2023 12:24
@romac romac mentioned this pull request Nov 7, 2023
7 tasks
romac added a commit that referenced this pull request Nov 8, 2023
* Rename `Threshold::Init` to `Unreached`

* WIP: Pass votes directly to `VoteCount`

* Cleanup

* Split `compute_threshold` out of `add_vote`

* Only count a single vote per validator address

* Emit `PrecommitAny` message when we reach `Nil` threshold for precommits

* Doc comment

* Refactor `VoteCount` implementation

* Fix tests

* Split `vote` crate into more modules

* Add Skip threshold

* Refactor data kept by the `VoteKeeper` per-round

* Move dealing with skip threshold into `VoteKeeper`

* Rename `Event::RoundSkip` to `Event::SkipRound`

* Cleanup

* Include number of round to skip to in `SkipRound` message

* Parametrize over thresholds
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.

1 participant