Go to the source code of this file.
 | 
| bool  | process_generator_command_line (const int argc, const char **argv, std::string &architecture_params_fn, std::string &computation_bounds_fn, std::string &proving_key_fn, std::string &verification_key_fn) | 
|   | 
| int  | main (int argc, const char *argv[]) | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          const char *  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 59 of file demo_ram_ppzksnark_generator.cpp.
   63     std::string architecture_params_fn = 
"architecture_params.txt";
 
   64     std::string computation_bounds_fn = 
"computation_bounds.txt";
 
   65     std::string proving_key_fn = 
"proving_key.txt";
 
   66     std::string verification_key_fn = 
"verification_key.txt";
 
   68     std::string architecture_params_fn;
 
   69     std::string computation_bounds_fn;
 
   70     std::string proving_key_fn;
 
   71     std::string verification_key_fn;
 
   76             architecture_params_fn,
 
   77             computation_bounds_fn,
 
   79             verification_key_fn)) {
 
   83     libff::start_profiling();
 
   87     std::ifstream f_ap(architecture_params_fn);
 
   90     std::ifstream f_rp(computation_bounds_fn);
 
   91     size_t tinyram_input_size_bound, tinyram_program_size_bound, time_bound;
 
   92     f_rp >> tinyram_input_size_bound >> tinyram_program_size_bound >>
 
   95     const size_t boot_trace_size_bound =
 
   96         tinyram_program_size_bound + tinyram_input_size_bound;
 
   99         ram_ppzksnark_generator<default_ram_ppzksnark_pp>(
 
  100             ap, boot_trace_size_bound, time_bound);
 
  102     std::ofstream pk(proving_key_fn);
 
  106     std::ofstream vk(verification_key_fn);
 
 
 
 
◆ process_generator_command_line()
      
        
          | bool process_generator_command_line  | 
          ( | 
          const int  | 
          argc,  | 
        
        
           | 
           | 
          const char **  | 
          argv,  | 
        
        
           | 
           | 
          std::string &  | 
          architecture_params_fn,  | 
        
        
           | 
           | 
          std::string &  | 
          computation_bounds_fn,  | 
        
        
           | 
           | 
          std::string &  | 
          proving_key_fn,  | 
        
        
           | 
           | 
          std::string &  | 
          verification_key_fn  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Author
 - This file is part of libsnark, developed by SCIPR Lab and contributors (see AUTHORS). 
 
- Copyright
 - MIT license (see LICENSE file) 
 
Definition at line 20 of file demo_ram_ppzksnark_generator.cpp.
   29         po::options_description desc(
"Usage");
 
   30         desc.add_options()(
"help", 
"print this help message")(
 
   31             "architecture_params",
 
   32             po::value<std::string>(&architecture_params_fn)->required())(
 
   34             po::value<std::string>(&computation_bounds_fn)->required())(
 
   35             "proving_key", po::value<std::string>(&proving_key_fn)->required())(
 
   37             po::value<std::string>(&verification_key_fn)->required());
 
   40         po::store(po::parse_command_line(argc, argv, desc), vm);
 
   42         if (vm.count(
"help")) {
 
   43             std::cout << desc << 
"\n";
 
   48     } 
catch (std::exception &e) {
 
   49         std::cerr << 
"Error: " << e.what() << 
"\n";
 
 
 
 
 
bool process_generator_command_line(const int argc, const char **argv, std::string &architecture_params_fn, std::string &computation_bounds_fn, std::string &proving_key_fn, std::string &verification_key_fn)