-
Notifications
You must be signed in to change notification settings - Fork 490
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
sortition: use external sortition package #5429
sortition: use external sortition package #5429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov Report
@@ Coverage Diff @@
## master #5429 +/- ##
==========================================
- Coverage 55.40% 55.39% -0.01%
==========================================
Files 447 447
Lines 63294 63294
==========================================
- Hits 35065 35062 -3
- Misses 25836 25844 +8
+ Partials 2393 2388 -5
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fd031b3
@cce please update go.sum |
rapid.Just(proto.RedoCommitteeSize), | ||
rapid.Just(proto.DownCommitteeSize), | ||
).Draw(t, "expectedSize").(uint64) | ||
//expectedSize := rapid.Uint64Range(1, totalMoney).Draw(t, "expectedSize").(uint64) // draw random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//expectedSize := rapid.Uint64Range(1, totalMoney).Draw(t, "expectedSize").(uint64) // draw random |
Or if you really need for local testing, it should be placed in the scope of totalMoney
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a nit about removing a commented out line in a test
Summary
This updates the data/committee package to use the new separate github.com/algorand/sortition package, which contains the same code as in github.com/algorand/data/committee/sortition.
Test Plan
Existing tests should pass, and added a new property-based test TestCompareSortitionImpls that I ran for 10M iterations.