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

Replace lazy_static = "1.4" with once_cell = "1" #67

Closed
hansieodendaal opened this issue Aug 24, 2023 · 0 comments · Fixed by #69
Closed

Replace lazy_static = "1.4" with once_cell = "1" #67

hansieodendaal opened this issue Aug 24, 2023 · 0 comments · Fixed by #69

Comments

@hansieodendaal
Copy link
Contributor

Then use as use once_cell::sync::Lazy;

We have moved away from lazy_static is it is unmaintained

SWvheerden pushed a commit that referenced this issue Sep 20, 2023
Extended commitment generators are currently
[produced](https://github.com/tari-project/bulletproofs-plus/blob/502ae9fa35a39afc5793210e4301023a7ca7ea60/src/ristretto.rs#L154-L179)
using the `lazy_static` macro. Unfortunately, `lazy_static` is [no
longer actively maintained](https://crates.io/crates/lazy_static). Other
repositories in the ecosystem are moving to `once_cell`, which is
[actively maintained](https://crates.io/crates/once_cell).

This PR migrates from `lazy_static` to `once_cell`. In the process, it
cleans up the construction. Specifically, it moves from using word-based
numbering (_e.g._ `ONE`, `TWO`) in hash inputs to numerals, which
simplifies the design. It also adds a useful test that asserts the
number of generators matches the size of `ExtensionDegree` to avoid
panics.

Closes #67.

BREAKING CHANGE: Modifies the construction of commitment generators.
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 a pull request may close this issue.

1 participant