Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ commands:
steps:
- save_cache:
name: "Save rustup cache"
key: cargo-v2-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{arch}}
key: cargo-v2-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
paths:
- "~/.cargo"
- "~/.rustup"
Expand All @@ -56,7 +56,6 @@ commands:
- restore_cache:
keys:
- cargo-v2-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
- repo-source-{{ .Branch }}-{{ .Revision }}

install_gpu_deps:
steps:
Expand All @@ -79,9 +78,7 @@ jobs:
- run:
name: Calculate dependencies
command: cargo generate-lockfile
- restore_cache:
keys:
- cargo-v2-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
- restore_rustup_cache
- run: cargo update
- run: cargo fetch
- run: rm -rf .git
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ Lurk backend integration is still immature, so current performance is not repres
## Submodules

Lurk source files used in tests are in the [lurk-lib](https://github.com/lurk-lang/lurk-lib) submodule. You must
initialize and update submodules before test will pass.
initialize and update submodules before test will pass:

```
git submodule update --init --recursive
```

## Repl

Expand Down
18 changes: 3 additions & 15 deletions src/proof/groth16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,7 @@ impl Groth16Prover<Bls12> {
params: &groth16::Parameters<Bls12>,
mut rng: R,
) -> Result<groth16::Proof<Bls12>, SynthesisError> {
self.generate_groth16_proof(multi_frame, params, &mut rng)
}

fn generate_groth16_proof<R: RngCore>(
&self,
multiframe: MultiFrame<'_, Scalar, IO<Scalar>, Witness<Scalar>>,
groth_params: &groth16::Parameters<Bls12>,
rng: &mut R,
) -> Result<groth16::Proof<Bls12>, SynthesisError> {
let create_proof = |p| groth16::create_random_proof(multiframe, p, rng);
create_proof(groth_params)
groth16::create_random_proof(multi_frame, params, &mut rng)
}

#[allow(clippy::too_many_arguments)]
Expand Down Expand Up @@ -146,9 +136,7 @@ impl Groth16Prover<Bls12> {
let last_multiframe = multiframes.last().unwrap().clone();
for multiframe in multiframes.into_iter() {
statements.push(multiframe.public_inputs());
let proof = self
.generate_groth16_proof(multiframe.clone(), params, &mut rng)
.unwrap();
let proof = self.prove(multiframe.clone(), params, &mut rng).unwrap();

proofs.push(proof.clone());
multiframe_proofs.push((multiframe, proof));
Expand All @@ -162,7 +150,7 @@ impl Groth16Prover<Bls12> {
);

let dummy_proof = self
.generate_groth16_proof(dummy_multiframe.clone(), params, &mut rng)
.prove(dummy_multiframe.clone(), params, &mut rng)
.unwrap();

let dummy_statement = dummy_multiframe.public_inputs();
Expand Down