dalek-cryptography / bulletproofs

A pure-Rust implementation of Bulletproofs using Ristretto.
MIT License
1.02k stars 216 forks source link

feature(external_doc) feature removed in latest nightly #343

Closed hammadtq closed 3 years ago

hammadtq commented 3 years ago

Latest nightly builds are throwing this error

"feature(external_doc)" ^^^^^^^^^^^^ feature has been removed

I have tried nightly latest, rustup default nightly-2021-06-16 and rustup default nightly-2021-06-01. This issue is not present in 2021-06-01. Also this issue is affecting subtle and other dalek libraries.

Docs show latest stable build 1.53.0 got released on 2021-06-17 if I am seeing this right!

Also, I have a question, while playing with these nightly versions, I found some bugs, for example, below error:

--> src/main.rs:42:5
   |
42 |     &blinding,
   |     ^^^^^^^^^ expected struct `curve25519_dalek::scalar::Scalar`, found a different struct `curve25519_dalek::scalar::Scalar`
   |
   = note: expected reference `&curve25519_dalek::scalar::Scalar` (struct `curve25519_dalek::scalar::Scalar`)
              found reference `&curve25519_dalek::scalar::Scalar` (struct `curve25519_dalek::scalar::Scalar`)
   = note: perhaps two different versions of crate `curve25519_dalek` are being used?

Updating the nightly build resolved this error, so I am assuming something was breaking in that particular nightly build. I am supposing depending on nightly builds will cause problems in the future?

dan-da commented 3 years ago

hmm, trying to build for the first time and with nightly-2021-06-01 I get this error:

error[E0635]: unknown feature `try_trait`
 --> src/lib.rs:4:12
  |
4 | #![feature(try_trait)]
  |            ^^^^^^^^^

After commenting out lib.rs line 4 it builds.

PanosChtz commented 3 years ago

Not sure if this is related, but with the original nightly-2019-07-31 I get this error

error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
   --> /Users/pchatzig/.cargo/registry/src/github.com-1ecc6299db9ec823/subtle-2.4.0/src/lib.rs:513:1
    |
513 | impl<T> From<CtOption<T>> for Option<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
    |
    = note: only traits defined in the current crate can be implemented for a type parameter

error: aborting due to previous error

For more information about this error, try `rustc --explain E0210`.
error: Could not compile `subtle`.

with nightly-2021-06-01 I get

error[E0658]: `#[doc(include)]` is experimental
  --> /Users/pchatzig/.cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-2.1.2/src/lib.rs:22:34
   |
22 | #![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #44732 <https://github.com/rust-lang/rust/issues/44732> for more information
   = help: add `#![feature(external_doc)]` to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `curve25519-dalek`
hammadtq commented 3 years ago

Latest nightly builds are throwing this error

"feature(external_doc)" ^^^^^^^^^^^^ feature has been removed

I have tried nightly latest, rustup default nightly-2021-06-16 and rustup default nightly-2021-06-01. This issue is not present in 2021-06-01. Also this issue is affecting subtle and other dalek libraries.

Docs show latest stable build 1.53.0 got released on 2021-06-17 if I am seeing this right!

Also, I have a question, while playing with these nightly versions, I found some bugs, for example, below error:

--> src/main.rs:42:5
   |
42 |     &blinding,
   |     ^^^^^^^^^ expected struct `curve25519_dalek::scalar::Scalar`, found a different struct `curve25519_dalek::scalar::Scalar`
   |
   = note: expected reference `&curve25519_dalek::scalar::Scalar` (struct `curve25519_dalek::scalar::Scalar`)
              found reference `&curve25519_dalek::scalar::Scalar` (struct `curve25519_dalek::scalar::Scalar`)
   = note: perhaps two different versions of crate `curve25519_dalek` are being used?

Updating the nightly build resolved this error, so I am assuming something was breaking in that particular nightly build. I am supposing depending on nightly builds will cause problems in the future?

This issue has been resolved. There are a bunch of things going on here but main branch that one needs to look here is "develop" instead of main. The issue "feature(external_doc)" ^^^^^^^^^^^^ feature has been removed is caused by curve25519-dalek version, one needs to use at least version 3. Bulletproofs were indeed moved to stable build #318 but docs features still build with nightly.

Also, if someone is interested, the crate on crates.io is not this repo anymore, it's a fork and has different versioning.

I am posting my cargo.toml that worked with the example given in the readme here.

[dependencies]
hex = "*"
merlin = { version = "2", default-features = false }
bincode = "*"

curve25519-dalek = { version = "3", default-features = false, features = ["u64_backend", "serde"] }
rand = "0.7"

[dependencies.bulletproofs]
git = "https://github.com/dalek-cryptography/bulletproofs"
branch = "develop"
features = ["yoloproofs"]

This should compile with latest nightly rustc 1.55.0-nightly (5a7834050 2021-06-23) and stable rustc 1.53.0 (53cb7b09b 2021-06-17)