Changes to get test_r1cs_ppzksnark passing

This commit is contained in:
Jack Grigg 2017-10-11 15:31:42 +01:00
parent 82e839e4ff
commit 8598c20d40
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
3 changed files with 6 additions and 5 deletions

View File

@ -83,7 +83,7 @@ bool run_r1cs_ppzksnark(const r1cs_example<Fr<ppT> > &example,
}
print_header("R1CS ppzkSNARK Prover");
r1cs_ppzksnark_proof<ppT> proof = r1cs_ppzksnark_prover<ppT>(keypair.pk, example.primary_input, example.auxiliary_input);
r1cs_ppzksnark_proof<ppT> proof = r1cs_ppzksnark_prover<ppT>(keypair.pk, example.primary_input, example.auxiliary_input, example.constraint_system);
printf("\n"); print_indent(); print_mem("after prover");
if (test_serialization)

View File

@ -394,7 +394,8 @@ r1cs_ppzksnark_keypair<ppT> r1cs_ppzksnark_generator(
template<typename ppT>
r1cs_ppzksnark_proof<ppT> r1cs_ppzksnark_prover(const r1cs_ppzksnark_proving_key<ppT> &pk,
const r1cs_ppzksnark_primary_input<ppT> &primary_input,
const r1cs_ppzksnark_auxiliary_input<ppT> &auxiliary_input);
const r1cs_ppzksnark_auxiliary_input<ppT> &auxiliary_input,
const r1cs_ppzksnark_constraint_system<ppT> &constraint_system);
/*
Below are four variants of verifier algorithm for the R1CS ppzkSNARK.

View File

@ -11,7 +11,7 @@
#include <cassert>
#include <cstdio>
#include "common/default_types/r1cs_ppzksnark_pp.hpp"
#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
#include "common/profiling.hpp"
#include "common/utils.hpp"
#include "relations/constraint_satisfaction_problems/r1cs/examples/r1cs_examples.hpp"
@ -29,6 +29,7 @@ void test_r1cs_ppzksnark(size_t num_constraints,
const bool test_serialization = true;
r1cs_example<Fr<ppT> > example = generate_r1cs_example_with_binary_input<Fr<ppT> >(num_constraints, input_size);
example.constraint_system.swap_AB_if_beneficial();
const bool bit = run_r1cs_ppzksnark<ppT>(example, test_serialization);
EXPECT_TRUE(bit);
@ -37,8 +38,7 @@ void test_r1cs_ppzksnark(size_t num_constraints,
TEST(zk_proof_systems, r1cs_ppzksnark)
{
default_r1cs_ppzksnark_pp::init_public_params();
start_profiling();
test_r1cs_ppzksnark<default_r1cs_ppzksnark_pp>(1000, 100);
test_r1cs_ppzksnark<alt_bn128_pp>(1000, 20);
}