filecoin-project / bls-signatures

BLS Signatures in Rust
Other
72 stars 43 forks source link

Publish latest? #45

Closed cryptoquick closed 1 year ago

cryptoquick commented 2 years ago

I've been getting the following error:

error[E0277]: the trait bound `ChaCha8Rng: rand_core::RngCore` is not satisfied
  --> crypto/src/signature.rs:86:55
   |
86 |         let pk = bls_signatures::PrivateKey::generate(&mut rng);
   |                                                       ^^^^^^^^ the trait `rand_core::RngCore` is not implemented for `ChaCha8Rng`
   |
  ::: /home/hunter/.cargo/registry/src/github.com-1ecc6299db9ec823/bls-signatures-0.10.0/src/key.rs:88:24
   |
88 |     pub fn generate<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
   |                        ------- required by this bound in `bls_signatures::PrivateKey::generate`

error[E0277]: the trait bound `ChaCha8Rng: rand_core::CryptoRng` is not satisfied
  --> crypto/src/signature.rs:86:55
   |
86 |         let pk = bls_signatures::PrivateKey::generate(&mut rng);
   |                                                       ^^^^^^^^ the trait `rand_core::CryptoRng` is not implemented for `ChaCha8Rng`
   |
  ::: /home/hunter/.cargo/registry/src/github.com-1ecc6299db9ec823/bls-signatures-0.10.0/src/key.rs:88:34
   |
88 |     pub fn generate<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
   |                                  --------- required by this bound in `bls_signatures::PrivateKey::generate`

It took me a little while to realize the code I was reading in the repo wasn't the code I was using.

This is fixed when using this line in Cargo.toml:

bls-signatures = { git = "https://github.com/filecoin-project/bls-signatures.git", rev = "807e4326a2a847a059b4202b47340a69c7a4858e" }

Using rand 0.8.4, rand_core 0.6.3, and rand_chacha 0.3.1.

dignifiedquire commented 2 years ago

Yes, I will be publishing a new release in the next days

vmx commented 1 year ago

New releases have been published since then.