-
Notifications
You must be signed in to change notification settings - Fork 179
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
[randomness part 8] update math/rand usage in /cmd/bootstrap #4362
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4362 +/- ##
==========================================
- Coverage 53.75% 53.63% -0.12%
==========================================
Files 871 882 +11
Lines 80769 82048 +1279
==========================================
+ Hits 43420 44010 +590
- Misses 33915 34553 +638
- Partials 3434 3485 +51
Flags with carried forward coverage won't be shown. Click here to find out more.
|
cmd/bootstrap/cmd/clusters.go
Outdated
// and only depends on the number of clusters and nodes. | ||
// However, the list of nodes in each cluster if non-deterministic and produces | ||
// different lists on each function call. | ||
func constructClusterAssignment(participants flow.IdentityList) (flow.AssignmentList, flow.ClusterList) { |
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.
background discussion about this change happened in another PR: #4052 (comment)
208a099
to
bdb5330
Compare
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.
I think we can further cleanup the cluster constraint checking, by removing the now-extraneous checkClusterConstraint
. Otherwise looks good!
bors merge |
This is part of the work started in #4052.
Context is to update the usage of
math/rand
in all the repo, for two purposes:math/rand
in production code (seed length is too short, randomness quality isn't suited for production)math/rand
can be used in test files, the functionsSeed
andRead
are deprecated in Go1.20 and should not be used as the repo prepares to upgrade the Go version.This PR updated
/cmd/bootstrap
:math/rand
) by non-deterministic clustering (based oncrypto/rand
).crypto/rand
in :