Skip to content

Commit a1869e8

Browse files
committed
Merge branch 'main' into develop
2 parents d08d7d5 + 707ee84 commit a1869e8

File tree

6 files changed

+200
-17
lines changed

6 files changed

+200
-17
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
Entries are listed in reverse chronological order.
4+
5+
## 1.0.1
6+
7+
* Tweaks to crate metadata.
8+
* Minor documentation changes.
9+
* Adds a regression test for deserialize-and-verify for proofs created using
10+
v1.0.0, to ensure they continue to verify in future versions.
11+
12+
## 1.0.0
13+
14+
* Minor tweaks to the prerelease version.
15+
* Preliminary support for R1CS proofs, but this feature is hard-disabled in the
16+
published crate.
17+
18+
## 1.0.0-pre.0
19+
20+
Initial prerelease version, supporting single and aggregated range proofs, and
21+
multiparty proof aggregation.
22+

Cargo.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bulletproofs"
3-
version = "1.0.0"
4-
authors = ["Cathie Yun <cathie@chain.com>",
3+
version = "1.0.1"
4+
authors = ["Cathie Yun <cathieyun@gmail.com>",
55
"Henry de Valence <[email protected]>",
66
"Oleg Andreev <[email protected]>"]
77
readme = "README.md"
@@ -28,11 +28,19 @@ clear_on_drop = "0.2"
2828
hex = "0.3"
2929
criterion = "0.2"
3030
bincode = "1"
31+
rand_chacha = "0.1"
3132

3233
[features]
3334
avx2_backend = ["curve25519-dalek/avx2_backend"]
3435
yoloproofs = []
3536

37+
[[test]]
38+
name = "range_proof"
39+
40+
[[test]]
41+
name = "r1cs"
42+
required-features = ["yoloproofs"]
43+
3644
[[bench]]
3745
name = "range_proof"
3846
harness = false
@@ -41,7 +49,3 @@ harness = false
4149
name = "r1cs"
4250
harness = false
4351
required-features = ["yoloproofs"]
44-
45-
[[test]]
46-
name = "r1cs"
47-
required-features = ["yoloproofs"]

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ The development roadmap can be found in the
4242

4343
The constraint system API is provided **FOR EXPERIMENTS ONLY**, and must be
4444
enabled by specifying the `yoloproofs` feature. It is not covered by semver
45-
compatibility and is **SUBJECT TO CHANGE WITHOUT NOTICE**.
45+
compatibility and is **SUBJECT TO CHANGE WITHOUT NOTICE**.
46+
47+
Currently, the `yoloproofs` feature is disabled in the published version of the
48+
crate, so it can only be used by specifying a git dependency on the `develop`
49+
branch. This means that it is not possible to publish a crate using the R1CS
50+
API, because it is **FOR EXPERIMENTS ONLY**.
4651

4752
## Documentation
4853

@@ -61,10 +66,10 @@ the library's [internal documentation][doc_internal]:
6166

6267
## Comparative Performance
6368

64-
The following table gives comparative timings for proving and
65-
verification of a 64-bit rangeproof on an i7-7800X with Turbo Boost
66-
disabled. Times are in microseconds (lower is better), with the
67-
relative speed compared to the fastest implementation.
69+
The following table gives comparative timings for proving and verification of a
70+
64-bit rangeproof on an Intel Skylake-X i7-7800X (@3.5GHz, Turbo Boost
71+
disabled). Times are in microseconds (lower is better), with the relative
72+
speed compared to the fastest implementation.
6873

6974
| Implementation | Group | Proving (μs) | rel | Verification (μs) | rel |
7075
|----------------|------------------|-------------:|----------:|------------------:|----------:|
@@ -74,12 +79,22 @@ relative speed compared to the fastest implementation.
7479
| libsecp-endo | secp256k1 | 16800 | **2.30x** | 2080 | **2.00x** |
7580
| Monero | ed25519 (unsafe) | 53300 | **7.30x** | 4810 | **4.63x** |
7681

82+
Use of the `curve25519-dalek` IFMA backend gives another 1.5x speedup on a
83+
Cannonlake i3-8121U, increasing the verification speedup **3x** over libsecp
84+
and **7x** over Monero, but these processors are not yet generally available.
85+
7786
This crate also contains other benchmarks; see the *Tests and Benchmarks*
78-
section below for details.
87+
section below for details on how to run them all.
7988

8089
## Example
8190

91+
The following example shows how to create and verify a 32-bit rangeproof.
92+
8293
```rust
94+
# // The #-commented lines are hidden in Rustdoc but not in raw
95+
# // markdown rendering, and contain boilerplate code so that the
96+
# // code in the README.md is actually run as part of the test suite.
97+
#
8398
# extern crate rand;
8499
# use rand::thread_rng;
85100
#
@@ -133,8 +148,8 @@ assert!(
133148

134149
## Tests and Benchmarks
135150

136-
Run tests with `cargo test`.
137-
Run benchmarks with `cargo bench`. This crate uses [criterion.rs][criterion] for benchmarks.
151+
Run tests with `cargo test`. Run benchmarks with `cargo bench`. This crate
152+
uses [criterion.rs][criterion] for benchmarks.
138153

139154
## Features
140155

src/generators.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ impl<'a> BulletproofGensShare<'a> {
266266

267267
#[cfg(test)]
268268
mod tests {
269-
extern crate hex;
270269
use super::*;
271270

272271
#[test]

src/inner_product_proof.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,11 @@ pub fn inner_product(a: &[Scalar], b: &[Scalar]) -> Scalar {
394394
mod tests {
395395
use super::*;
396396

397-
use rand::OsRng;
398397
use sha3::Sha3_512;
399398
use util;
400399

401400
fn test_helper_create(n: usize) {
402-
let mut rng = OsRng::new().unwrap();
401+
let mut rng = rand::thread_rng();
403402

404403
use generators::BulletproofGens;
405404
let bp_gens = BulletproofGens::new(n, 1);

0 commit comments

Comments
 (0)