Skip to content

Commit

Permalink
Merge branch 'release/1.0.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Aug 1, 2019
2 parents 6a17ceb + 4ff5253 commit b5a33d9
Show file tree
Hide file tree
Showing 24 changed files with 1,494 additions and 686 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
language: rust
cache: cargo

rust:
- nightly

env:
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES=''
# Disabled for now along with the yoloproofs feature.
#- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='yoloproofs'
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='yoloproofs'
# run cargo bench with a filter that matches no benchmarks.
# this ensures the benchmarks build but doesn't run them on the CI server.
- TEST_COMMAND=bench EXTRA_FLAGS='"DONTRUNBENCHMARKS"' FEATURES=''

matrix:
fast_finish: true
include:
- rust: nightly-2018-12-04
before_script:
- rustup component add rustfmt-preview
script:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

Entries are listed in reverse chronological order.

## 1.0.4

* Change doc-include paths to allow compilation on the latest Rust nightly
(which changed the path root).
* Various changes to the (unreleased, unstable) R1CS implementation, which is
disabled in the released version of the code.

## 1.0.3

* Mistakes were made. Yanked and replaced by 1.0.4 above.

## 1.0.2

* Updates the library to use the renamed functions in Merlin 1.1.
Expand Down
15 changes: 11 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "bulletproofs"
version = "1.0.2"
version = "1.0.4"
authors = ["Cathie Yun <[email protected]>",
"Henry de Valence <[email protected]>",
"Oleg Andreev <[email protected]>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/dalek-cryptography/bulletproofs"
categories = ["cryptography"]
keywords = ["cryptography", "ristretto", "zero-knowledge", "bulletproofs"]
keywords = ["cryptography", "crypto", "ristretto", "zero-knowledge", "bulletproofs"]
description = "A pure-Rust implementation of Bulletproofs using Ristretto"

[dependencies]
Expand All @@ -32,8 +32,11 @@ rand_chacha = "0.1"

[features]
avx2_backend = ["curve25519-dalek/avx2_backend"]
# Disable the yoloproofs feature for the released crate, so that it's not possible for someone to publish a crate using R1CS proofs yet.
# yoloproofs = []
# Disable the yoloproofs feature in the released crate.
# To test it, use a git dependency on the develop branch and enable the
# yoloproofs feature. Note that this means it's impossible to publish a crate
# depending on the unstable R1CS API.
#yoloproofs = []

[[test]]
name = "range_proof"
Expand All @@ -46,6 +49,10 @@ required-features = ["yoloproofs"]
name = "range_proof"
harness = false

[[bench]]
name = "generators"
harness = false

[[bench]]
name = "r1cs"
harness = false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FEATURES :=
FEATURES := yoloproofs

doc:
cargo rustdoc --features "$(FEATURES)" -- --html-in-header docs/assets/rustdoc-include-katex-header.html
Expand Down
26 changes: 26 additions & 0 deletions benches/generators.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
extern crate bulletproofs;
use bulletproofs::{BulletproofGens, PedersenGens};

#[macro_use]
extern crate criterion;
use criterion::Criterion;

fn pc_gens(c: &mut Criterion) {
c.bench_function("PedersenGens::new", |b| b.iter(|| PedersenGens::default()));
}

fn bp_gens(c: &mut Criterion) {
c.bench_function_over_inputs(
"BulletproofGens::new",
|b, size| b.iter(|| BulletproofGens::new(*size, 1)),
(0..10).map(|i| 2 << i),
);
}

criterion_group! {
bp,
bp_gens,
pc_gens,
}

criterion_main!(bp);
Loading

0 comments on commit b5a33d9

Please sign in to comment.