frost icon indicating copy to clipboard operation
frost copied to clipboard

Bump MSRV to 1.73

Open StackOverflowExcept1on opened this issue 1 year ago • 4 comments

Motivation:

  1. We can get rid of lazy_static! in favor of std::sync::LazyLock
  2. We can use {integer}::div_ceil https://github.com/ZcashFoundation/frost/blob/ca33dad959e55bc66d5feac53a1275faae79377b/frost-core/src/scalar_mul.rs#L28
  3. Crates from RustCrypto already have pre-releases that require Rust 1.73+ or even Rust 1.81+ in some cases. For example: https://github.com/RustCrypto/elliptic-curves/blob/master/k256/Cargo.toml
  4. Starting with 1.81 we can use core::error::Error and remove the thiserror-nostd-notrait dependency in favor of thiserror: https://github.com/dtolnay/thiserror/pull/373

StackOverflowExcept1on avatar Nov 10 '24 13:11 StackOverflowExcept1on

This is REALLY tempting, but we might want to give a bit more time to crate users to update their Rust. I'm leaving this open while we consider it. Thanks for pointing these out!

conradoplg avatar Nov 11 '24 22:11 conradoplg

Providing the full context:

  • LazyLock requires MSRV 1.80, but OnceLock could also be used to get rid of lazy_static!, and it only requires MSRV 1.70.
  • {integer}::div_ceil requires MSRV 1.73.
  • RustCrypto had an MSRV of 1.73 as their last common MSRV IIRC (the latest non-pre-release of k256 is actually MSRV 1.65), but have bumped to 1.81 in pre-releases of crates that were using generic-array to instead use hybrid-array, which has an MSRV of 1.81 simply to remove its std feature flag and replace std::error::Error with core::error::Error: https://github.com/RustCrypto/hybrid-array/pull/85
    • Based on https://github.com/RustCrypto/hybrid-array/pull/85#issuecomment-2342331651 I believe they plan to hold off actually cutting releases of those downstream crates (such as the aforementioned k256) until 1.81 is at N - 3 (i.e. waiting until the release of Rust 1.84 in early 2025). And I do not think that the FROST crates should depend on pre-releases of those crates.

str4d avatar Nov 11 '24 23:11 str4d

Thanks - I guess we better wait until 1.84 at least.

It seems sensible to follow RustCrypto MSRV so we might already do the first two.

conradoplg avatar Nov 11 '24 23:11 conradoplg

We've decided to update to 1.73 for now

mpguerra avatar Nov 19 '24 14:11 mpguerra

Any news on that?

StackOverflowExcept1on avatar Jun 03 '25 12:06 StackOverflowExcept1on

Any news on that?

I think that's still blocked on k256 0.14.0 being released, but maybe we can try the pre-release version...

conradoplg avatar Jun 03 '25 15:06 conradoplg