diff --git a/.circleci/config.yml b/.circleci/config.yml index 61ac8f7ed7..d1cb4b75b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" @@ -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: @@ -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 diff --git a/README.md b/README.md index 60908a51d6..dc196c22ce 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/proof/groth16.rs b/src/proof/groth16.rs index 9f8f35c646..9d0030d564 100644 --- a/src/proof/groth16.rs +++ b/src/proof/groth16.rs @@ -104,17 +104,7 @@ impl Groth16Prover { params: &groth16::Parameters, mut rng: R, ) -> Result, SynthesisError> { - self.generate_groth16_proof(multi_frame, params, &mut rng) - } - - fn generate_groth16_proof( - &self, - multiframe: MultiFrame<'_, Scalar, IO, Witness>, - groth_params: &groth16::Parameters, - rng: &mut R, - ) -> Result, 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)] @@ -146,9 +136,7 @@ impl Groth16Prover { 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)); @@ -162,7 +150,7 @@ impl Groth16Prover { ); 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();