-
Notifications
You must be signed in to change notification settings - Fork 25
Set bls_lagrange rand dependency to workspace. #462
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
base: unstable
Are you sure you want to change the base?
Conversation
b576653 to
0922b2a
Compare
Update to [email protected] and replace deprecated names.
0922b2a to
c0aaed1
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.
Pull Request Overview
This PR updates the bls_lagrange crate to use [email protected] by setting the dependency to workspace version and replacing deprecated method names with their current equivalents.
- Updates
randdependency from hardcoded "0.8.5" to workspace version - Replaces deprecated
thread_rng()withrand::rng() - Updates deprecated method names:
gen()→random(),gen_range()→random_range()
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| anchor/common/bls_lagrange/Cargo.toml | Updates rand dependency to use workspace version |
| anchor/common/bls_lagrange/src/lib.rs | Replaces deprecated rand method names with current equivalents |
Comments suppressed due to low confidence (5)
anchor/common/bls_lagrange/src/lib.rs:30
- The function
rand::rng()does not exist in rand 0.9. The correct replacement forthread_rng()isrand::thread_rng().
split_with_rng(key, threshold, ids, &mut rand::rng())
anchor/common/bls_lagrange/src/lib.rs:35
- The method
random()does not exist on RNG traits in rand 0.9. The correct method name isgen(), which remains unchanged from rand 0.8.
let ikm = zeroize::Zeroizing::new(rng.random::<[u8; 32]>());
anchor/common/bls_lagrange/src/lib.rs:60
- The method
random_range()does not exist on RNG traits in rand 0.9. The correct method name isgen_range(), which remains unchanged from rand 0.8.
let total = rng.random_range(2..=13);
anchor/common/bls_lagrange/src/lib.rs:61
- The method
random_range()does not exist on RNG traits in rand 0.9. The correct method name isgen_range(), which remains unchanged from rand 0.8.
let threshold = rng.random_range(2..=total);
anchor/common/bls_lagrange/src/lib.rs:84
- The method
random_range()does not exist on RNG traits in rand 0.9. The correct method name isgen_range(), which remains unchanged from rand 0.8.
let signers = rng.random_range(2..=total);
|
This breaks when building with However, we have been using the custom |
|
Ah thanks! I'd not checked with the blsful feature. |
Update to [email protected] and replace deprecated names.
Issue Addressed
Fixes #461
Proposed Changes
Use rand 0.9 and set to workspace version.
Additional Info
Its a very small change, understandable if you don't want to accept it :)