Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Functions
profile_tbcs_ppzksnark.cpp File Reference
#include <cstdio>
#include <libff/common/profiling.hpp>
#include <libff/common/utils.hpp>
#include <libsnark/common/default_types/tbcs_ppzksnark_pp.hpp>
#include <libsnark/relations/circuit_satisfaction_problems/tbcs/examples/tbcs_examples.hpp>
#include <libsnark/zk_proof_systems/ppzksnark/tbcs_ppzksnark/examples/run_tbcs_ppzksnark.hpp>
Include dependency graph for profile_tbcs_ppzksnark.cpp:

Go to the source code of this file.

Functions

int main (int argc, const char *argv[])
 

Detailed Description

Profiling program that exercises the ppzkSNARK (first generator, then prover, then verifier) on a synthetic TBCS instance.

The command

$ libsnark/tbcs_ppzksnark/examples/profile_tbcs_ppzksnark 1000 10

exercises the ppzkSNARK (first generator, then prover, then verifier) on an TBCS instance with 1000 gates and an input consisting of 10 bits.

Author
This file is part of libsnark, developed by SCIPR Lab and contributors (see AUTHORS).

Definition in file profile_tbcs_ppzksnark.cpp.

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Definition at line 28 of file profile_tbcs_ppzksnark.cpp.

29 {
30  default_tbcs_ppzksnark_pp::init_public_params();
31  libff::start_profiling();
32 
33  if (argc == 2 && strcmp(argv[1], "-v") == 0) {
34  libff::print_compilation_info();
35  return 0;
36  }
37 
38  if (argc != 3) {
39  printf("usage: %s num_gates primary_input_size\n", argv[0]);
40  return 1;
41  }
42  const int num_gates = atoi(argv[1]);
43  int primary_input_size = atoi(argv[2]);
44 
45  const size_t auxiliary_input_size = 0;
46  const size_t num_outputs = num_gates / 2;
47 
48  libff::enter_block("Generate TBCS example");
50  primary_input_size, auxiliary_input_size, num_gates, num_outputs);
51  libff::leave_block("Generate TBCS example");
52 
53  libff::print_header("(enter) Profile TBCS ppzkSNARK");
54  const bool test_serialization = true;
55  run_tbcs_ppzksnark<default_tbcs_ppzksnark_pp>(example, test_serialization);
56  libff::print_header("(leave) Profile TBCS ppzkSNARK");
57 }
Here is the call graph for this function:
libsnark::generate_tbcs_example
tbcs_example generate_tbcs_example(const size_t primary_input_size, const size_t auxiliary_input_size, const size_t num_gates, const size_t num_outputs)
Definition: tbcs_examples.cpp:22
libsnark::tbcs_example
Definition: tbcs_examples.hpp:25