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

Fixes the build #225

Merged
merged 8 commits into from
Sep 15, 2021
Merged

Fixes the build #225

merged 8 commits into from
Sep 15, 2021

Conversation

gtank
Copy link
Contributor

@gtank gtank commented Sep 15, 2021

These seem recent as of (variously) Rust 1.53 and 1.54. They were causing the style check to break the build.

@gtank gtank marked this pull request as draft September 15, 2021 02:07
@gtank
Copy link
Contributor Author

gtank commented Sep 15, 2021

Oh, come on!

@gtank gtank changed the title Fixes various new clippy warnings Fixes the build Sep 15, 2021
@gtank
Copy link
Contributor Author

gtank commented Sep 15, 2021

The code needs several fixes.

Upgrading to anything past our pinned version also causes a build error I can't figure out how to fix at the moment:

error[E0277]: the trait bound `ark_bls12_377::Parameters: Bls12Parameters` is not satisfied
  --> crates/bls-crypto/src/hash_to_curve/try_and_increment.rs:31:43
   |
31 |     TryAndIncrement<CompositeHasher<CRH>, <Parameters as Bls12Parameters>::G1Parameters>,
   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bls12Parameters` is not implemented for `ark_bls12_377::Parameters`
   |
  ::: /Users/gtank/.cargo/git/checkouts/algebra-7e23afa68841b66e/344b27d/ec/src/models/bls12/mod.rs:30:1
   |
30 | pub trait Bls12Parameters: 'static {
   | ---------------------------------- required by this bound in `Bls12Parameters`

error[E0277]: the trait bound `ark_bls12_377::Parameters: Bls12Parameters` is not satisfied
  --> crates/bls-crypto/src/hash_to_curve/try_and_increment.rs:37:35
   |
37 |     TryAndIncrement<DirectHasher, <Parameters as Bls12Parameters>::G1Parameters>,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bls12Parameters` is not implemented for `ark_bls12_377::Parameters`
   |
  ::: /Users/gtank/.cargo/git/checkouts/algebra-7e23afa68841b66e/344b27d/ec/src/models/bls12/mod.rs:30:1
   |
30 | pub trait Bls12Parameters: 'static {
   | ---------------------------------- required by this bound in `Bls12Parameters`

error[E0277]: the trait bound `ark_bls12_377::Parameters: Bls12Parameters` is not satisfied
  --> crates/bls-crypto/src/hash_to_curve/try_and_increment_cip22.rs:31:48
   |
31 |     TryAndIncrementCIP22<CompositeHasher<CRH>, <Parameters as Bls12Parameters>::G1Parameters>,
   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bls12Parameters` is not implemented for `ark_bls12_377::Parameters`
   |
  ::: /Users/gtank/.cargo/git/checkouts/algebra-7e23afa68841b66e/344b27d/ec/src/models/bls12/mod.rs:30:1
   |
30 | pub trait Bls12Parameters: 'static {
   | ---------------------------------- required by this bound in `Bls12Parameters`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `bls-crypto` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

@gtank
Copy link
Contributor Author

gtank commented Sep 15, 2021

Due to the risk of semantically important circuit changes, we're going to hang on to our 0.1.0 arkworks version. Conversation elsewhere with @kobigurk established that RUSTSEC-2021-0075 doesn't affect us here.

@gtank gtank marked this pull request as ready for review September 15, 2021 17:01
@kobigurk
Copy link
Collaborator

kobigurk commented Sep 15, 2021 via email

@gtank
Copy link
Contributor Author

gtank commented Sep 15, 2021

To be even more concrete, our pinned version predates the bug addressed in RUSTSEC-2021-0075, which was introduced in arkworks-rs/r1cs-std@f88d7c6 and resolved in arkworks-rs/r1cs-std@b6e7e94.

Further discussion (h/t @kobigurk):

@gtank gtank merged commit a3effd6 into celo-org:master Sep 15, 2021
@gtank gtank mentioned this pull request Sep 15, 2021
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.

2 participants