Skip to content

Commit

Permalink
Merge pull request #50 from penumbra-zone/disable-features
Browse files Browse the repository at this point in the history
disable default internal parallelism (rayon)
  • Loading branch information
redshiftzero authored Mar 13, 2023
2 parents 64ef13b + 33ddb19 commit 877f970
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
# 0.2.0

* Fix: Use compressed representation for public elements in-circuit.

# 0.3.0

* Disable internal parallelism
19 changes: 12 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "decaf377"
version = "0.2.0"
version = "0.3.0"
authors = ["Henry de Valence <[email protected]>", "redshiftzero <[email protected]>"]
description = "A prime-order group designed for use in SNARKs over BLS12-377"
edition = "2018"
Expand All @@ -17,19 +17,24 @@ tracing = "0.1"
tracing-subscriber = "0.2"
anyhow = "1.0"
ark-relations = "0.3"
ark-r1cs-std = {version = "0.3", optional=true }
ark-std = "0.3"
ark-ec = "0.3"
ark-ff = "0.3"
ark-r1cs-std = { version = "0.3", optional=true, default-features=false }
ark-std = { version = "0.3", default-features=false }
ark-ec = { version = "0.3", default-features=false }
ark-ff = { version = "0.3", default-features=false }
ark-serialize = "0.3"
ark-bls12-377 = "0.3"
ark-ed-on-bls12-377 = { version = "0.3", features = ["r1cs"] }
ark-groth16 = { version = "0.3", optional=true }
ark-groth16 = { version = "0.3", default-features=false, optional=true }
ark-snark = { version = "0.3", optional=true }
zeroize = "1.4"

# This matches what ark-std (a library for no_std compatibility) does, having
# a default feature of std - without the ark-std std feature, decaf377 doesn't
# compile
[features]
default = []
default = ["std"]
std = ["ark-std/std"]
parallel = ["ark-ff/parallel", "ark-ec/parallel", "ark-groth16/parallel", "ark-std/parallel", "ark-r1cs-std/parallel"]
r1cs = ["ark-r1cs-std", "ark-groth16", "ark-snark"]

[dev-dependencies]
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ functionality, and works the same way inside and outside of a circuit.
More details are available on the [Penumbra
website](https://protocol.penumbra.zone/main/crypto/decaf377.html).

## Features

* `std`: default, for use in `std` environments,
* `r1cs`: enables rank-1 constraint system gadgets,
* `parallel`: enables the use of parallelism.

## Benchmarks

Run `criterion` benchmarks using:
Expand Down

0 comments on commit 877f970

Please sign in to comment.