Skip to content
This repository has been archived by the owner on Dec 9, 2021. It is now read-only.

I get errors when I run the tests #96

Closed
Federico2014 opened this issue Jan 19, 2021 · 2 comments
Closed

I get errors when I run the tests #96

Federico2014 opened this issue Jan 19, 2021 · 2 comments

Comments

@Federico2014
Copy link

I run the test_proof_trivial_recursive() test on the master branch, but get syntactic errors as follows:

cargo test --color=always --no-run --package plonky --test prove_and_verify_recursive test_proof_trivial_recursive -- --exact
Compiling plonky v0.1.0
warning: unused import: std::collections::HashSet
--> src/field/field.rs:3:5
|
3 | use std::collections::HashSet;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> src/bigint/bigint_arithmetic.rs:53:50
|
53 | debug_assert!(!borrow, "a < b: {:?} < {:?}", a, b);
| ^ the trait std::array::LengthAtMost32 is not implemented for [u64; N]
|
= note: required because of the requirements on the impl of std::fmt::Debug for [u64; N]
= note: required by std::fmt::Debug::fmt
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> src/bigint/bigint_arithmetic.rs:53:53
|
53 | debug_assert!(!borrow, "a < b: {:?} < {:?}", a, b);
| ^ the trait std::array::LengthAtMost32 is not implemented for [u64; N]
|
= note: required because of the requirements on the impl of std::fmt::Debug for [u64; N]
= note: required by std::fmt::Debug::fmt
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound &mut [{integer}; N]: std::iter::IntoIterator is not satisfied
--> src/bigint/bigint_arithmetic.rs:108:23
|
108 | for limb_i in &mut limbs {
| ^^^^^^^^^^ the trait std::iter::IntoIterator is not implemented for &mut [{integer}; N]
|
= help: the following implementations were found:
<&'a [T; N] as std::iter::IntoIterator>
<&'a [T] as std::iter::IntoIterator>
<&'a mut [T; N] as std::iter::IntoIterator>
<&'a mut [T] as std::iter::IntoIterator>
= note: required by std::iter::IntoIterator::into_iter

error[E0369]: binary operation != cannot be applied to type [u64; N]
--> src/bigint/bigint_inverse.rs:18:13
|
18 | while u != one && v != one {
| - ^^ --- [u64; N]
| |
| [u64; N]

error[E0369]: binary operation != cannot be applied to type [u64; N]
--> src/bigint/bigint_inverse.rs:18:25
|
18 | while u != one && v != one {
| - ^^ --- [u64; N]
| |
| [u64; N]

error[E0369]: binary operation == cannot be applied to type [u64; N]
--> src/bigint/bigint_inverse.rs:50:10
|
50 | if u == one {
| - ^^ --- [u64; N]
| |
| [u64; N]

error: aborting due to 6 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0369.
For more information about an error, try rustc --explain E0277.
error: could not compile plonky.

@dlubarov
Copy link
Contributor

Hi, it looks like you're using the stable compiler? We currently rely on nightly for const generics.

I noticed that min_const_generics was stabilized recently (rust-lang/rust#79135), though, so maybe we can get back on stable. If not, I'll update the readme to mention nightly.

Our recursion circuit has a few known bugs (which we're working on), by the way; there may be runtime errors if generating recursive proofs. But it should at least compile on nightly.

@Federico2014
Copy link
Author

Hi, it looks like you're using the stable compiler? We currently rely on nightly for const generics.

I noticed that min_const_generics was stabilized recently (rust-lang/rust#79135), though, so maybe we can get back on stable. If not, I'll update the readme to mention nightly.

Our recursion circuit has a few known bugs (which we're working on), by the way; there may be runtime errors if generating recursive proofs. But it should at least compile on nightly.

After I update the compiler to the lastest nightly version, it can compile now, thank you very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants