Skip to content

Commit 6f1633a

Browse files
authored
Merge pull request #235 from dalek-cryptography/merge-develop-into-main-without-yoloproofs
Merge develop branch into main, disabling R1CS proofs
2 parents 267d1e3 + 91ec8d9 commit 6f1633a

28 files changed

+4151
-319
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ rust:
66

77
env:
88
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES=''
9-
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='avx2_backend'
9+
# Disabled for now along with the yoloproofs feature.
10+
#- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='yoloproofs'
1011
# run cargo bench with a filter that matches no benchmarks.
1112
# this ensures the benchmarks build but doesn't run them on the CI server.
12-
- TEST_COMMAND=bench EXTRA_FLAGS='"DONTRUNBENCHMARKS"' FEATURES='avx2_backend'
13-
14-
before_script:
15-
- rustup component add rustfmt-preview
13+
- TEST_COMMAND=bench EXTRA_FLAGS='"DONTRUNBENCHMARKS"' FEATURES=''
1614

1715
matrix:
1816
include:
19-
- rust: nightly
17+
- rust: nightly-2018-12-04
18+
before_script:
19+
- rustup component add rustfmt-preview
2020
script:
2121
- cargo fmt --all -- --check
2222

Cargo.toml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ keywords = ["cryptography", "ristretto", "zero-knowledge", "bulletproofs"]
1212
description = "A pure-Rust implementation of Bulletproofs using Ristretto"
1313

1414
[dependencies]
15-
curve25519-dalek = { version = "1.0.0-pre.0", features = ["serde"] }
16-
subtle = "2.0.0-pre.0"
15+
curve25519-dalek = { version = "1", features = ["serde"] }
16+
subtle = "2"
1717
sha3 = "0.8"
1818
digest = "0.8"
19-
rand = "0.5"
19+
rand = "0.6"
2020
byteorder = "1"
2121
serde = "1"
2222
serde_derive = "1"
2323
failure = "0.1"
24-
merlin = "1.0.0-pre.0"
24+
merlin = "1"
2525
clear_on_drop = "0.2"
2626

2727
[dev-dependencies]
@@ -31,8 +31,18 @@ bincode = "1"
3131

3232
[features]
3333
avx2_backend = ["curve25519-dalek/avx2_backend"]
34+
# Disable the yoloproofs feature for the released crate, so that it's not possible for someone to publish a crate using R1CS proofs yet.
35+
# yoloproofs = []
3436

3537
[[bench]]
36-
name = "bulletproofs"
38+
name = "range_proof"
39+
harness = false
40+
41+
[[bench]]
42+
name = "r1cs"
3743
harness = false
44+
required-features = ["yoloproofs"]
3845

46+
[[test]]
47+
name = "r1cs"
48+
required-features = ["yoloproofs"]

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,22 @@ This library provides implementations of:
2828

2929
* A programmable constraint system API for expressing rank-1
3030
constraint systems, and proving and verifying proofs of arbitrary
31-
statements (under development in the `circuit` branch);
31+
statements (unstable, under development with the `yoloproofs` feature);
3232

33-
* Online multi-party computation for aggregated circuit proofs
33+
* Online multi-party computation for aggregated constraint system proofs
3434
(planned future work).
35-
35+
3636
These proofs are implemented using [Merlin transcripts][doc_merlin],
3737
allowing them to be arbitrarily composed with other proofs without
3838
implementation changes.
3939

40+
The development roadmap can be found in the
41+
[Milestones][gh_milestones] section of the [Github repo][gh_repo].
42+
43+
The constraint system API is provided **FOR EXPERIMENTS ONLY**, and must be
44+
enabled by specifying the `yoloproofs` feature. It is not covered by semver
45+
compatibility and is **SUBJECT TO CHANGE WITHOUT NOTICE**.
46+
4047
## Documentation
4148

4249
The user-facing documentation for this functionality can be [found
@@ -48,9 +55,9 @@ the library's [internal documentation][doc_internal]:
4855
* how [the range proof protocol works][rp_notes];
4956
* how [the inner product proof protocol works][ipp_notes];
5057
* how [the aggregation protocol works][agg_notes];
51-
* how the Bulletproof circuit proofs work (under development);
58+
* how the Bulletproof constraint system proofs work (under development);
5259
* how the constraint system reduction works (under development);
53-
* how the aggregated circuit proofs work (future work).
60+
* how the aggregated constraint system proofs work (future work).
5461

5562
## Comparative Performance
5663

@@ -70,12 +77,6 @@ relative speed compared to the fastest implementation.
7077
This crate also contains other benchmarks; see the *Tests and Benchmarks*
7178
section below for details.
7279

73-
## WARNING
74-
75-
This code is still research-quality. It is not (yet) suitable for
76-
deployment. The development roadmap can be found in the
77-
[Milestones][gh_milestones] section of the [Github repo][gh_repo].
78-
7980
## Example
8081

8182
```rust
@@ -137,6 +138,10 @@ Run benchmarks with `cargo bench`. This crate uses [criterion.rs][criterion] for
137138

138139
## Features
139140

141+
The `yoloproofs` feature enables support for rank-1 constraint system proofs.
142+
It is **UNSTABLE AND UNSUITABLE FOR DEPLOYMENT**, and **PROVIDED FOR TESTING
143+
ONLY**.
144+
140145
The `avx2_backend` feature enables `curve25519-dalek`'s AVX2 backend,
141146
which implements curve arithmetic using [parallel
142147
formulas][parallel_edwards]. To use it for Bulletproofs, the

0 commit comments

Comments
 (0)