|
void | initialize_suboptions (boost::program_options::options_description &options, boost::program_options::options_description &all_options, boost::program_options::positional_options_description &pos) override |
| Instantiation can now set up the boost program_options structures. More...
|
|
void | parse_suboptions (const boost::program_options::variables_map &vm) override |
|
void | subcommand_usage (const char *argv0) override |
| Any command-specific output for usage. More...
|
|
Protected Member Functions inherited from zethtool::generic_subcommand< verify_cmd > |
void | initialize_suboptions (boost::program_options::options_description &options, boost::program_options::options_description &, boost::program_options::positional_options_description &) override |
| Instantiation can now set up the boost program_options structures. More...
|
|
void | parse_suboptions (const boost::program_options::variables_map &vm) override |
|
int | execute_subcommand (const global_options &options) override |
|
Protected Member Functions inherited from libtool::subcommand< GlobalOptionsT > |
void | usage (const char *argv0, const boost::program_options::options_description &options) |
|
virtual int | execute_subcommand (const GlobalOptionsT &global)=0 |
| Execute the command using global options defined by the caller. More...
|
|
Definition at line 16 of file verify_cmd.cpp.
◆ base_class
◆ verify_cmd()
zethtool::commands::verify_cmd::verify_cmd |
( |
const std::string & |
subcommand_name, |
|
|
const std::string & |
description |
|
) |
| |
|
inline |
◆ execute_generic()
template<typename ppT , typename snarkT >
int zethtool::commands::verify_cmd::execute_generic |
( |
const global_options & |
| ) |
|
|
inline |
Definition at line 28 of file verify_cmd.cpp.
30 ppT::init_public_params();
31 libff::inhibit_profiling_info =
true;
32 libff::inhibit_profiling_counters =
true;
34 typename snarkT::verification_key verification_key;
37 snarkT::verification_key_read_bytes(verification_key, in_s);
40 libsnark::r1cs_primary_input<libff::Fr<ppT>> primary_input;
47 typename snarkT::proof proof;
50 snarkT::proof_read_bytes(proof, in_s);
54 std::cout <<
"verification failed.\n";
◆ initialize_suboptions()
void zethtool::commands::verify_cmd::initialize_suboptions |
( |
boost::program_options::options_description & |
options, |
|
|
boost::program_options::options_description & |
all_options, |
|
|
boost::program_options::positional_options_description & |
pos |
|
) |
| |
|
inlineoverrideprotectedvirtual |
Instantiation can now set up the boost program_options structures.
Implements libtool::subcommand< GlobalOptionsT >.
Definition at line 62 of file verify_cmd.cpp.
69 all_options.add(options).add_options()(
70 "vk_file", po::value<std::string>(),
"Verification key file");
71 all_options.add_options()(
73 po::value<std::string>(),
74 "Primary input file");
75 all_options.add_options()(
76 "proof_file", po::value<std::string>(),
"Proof file");
78 pos.add(
"vk_file", 1);
79 pos.add(
"primary_input_file", 1);
80 pos.add(
"proof_file", 1);
◆ parse_suboptions()
void zethtool::commands::verify_cmd::parse_suboptions |
( |
const boost::program_options::variables_map & |
vm | ) |
|
|
inlineoverrideprotectedvirtual |
Instantiation can record any command-specific information from the parsed variables_map.
Implements libtool::subcommand< GlobalOptionsT >.
Definition at line 83 of file verify_cmd.cpp.
88 if (vm.count(
"vk_file") == 0) {
89 throw po::error(
"vk_file not specified");
91 if (vm.count(
"primary_input_file") == 0) {
92 throw po::error(
"primary_input_file not specified");
94 if (vm.count(
"proof_file") == 0) {
95 throw po::error(
"proof_file not specified");
98 vk_file = vm[
"vk_file"].as<std::string>();
99 proof_file = vm[
"proof_file"].as<std::string>();
◆ subcommand_usage()
void zethtool::commands::verify_cmd::subcommand_usage |
( |
const char * |
argv0 | ) |
|
|
inlineoverrideprotectedvirtual |
◆ primary_input_file
std::string zethtool::commands::verify_cmd::primary_input_file |
|
protected |
◆ proof_file
std::string zethtool::commands::verify_cmd::proof_file |
|
protected |
◆ vk_file
std::string zethtool::commands::verify_cmd::vk_file |
|
protected |
The documentation for this class was generated from the following file: