diff --git a/bin/proof-generator/include/nil/proof-generator/arg_parser.hpp b/bin/proof-generator/include/nil/proof-generator/arg_parser.hpp index 0f528fed..44b703eb 100644 --- a/bin/proof-generator/include/nil/proof-generator/arg_parser.hpp +++ b/bin/proof-generator/include/nil/proof-generator/arg_parser.hpp @@ -46,6 +46,7 @@ namespace nil { columns_params columns = all_columns_params[0]; lambda_param lambda = all_lambda_params[0]; grind_param grind = all_grind_params[0]; + std::size_t expand_factor = 2; }; std::optional parse_args(int argc, char* argv[]); diff --git a/bin/proof-generator/include/nil/proof-generator/prover.hpp b/bin/proof-generator/include/nil/proof-generator/prover.hpp index 3c86118f..bda66940 100644 --- a/bin/proof-generator/include/nil/proof-generator/prover.hpp +++ b/bin/proof-generator/include/nil/proof-generator/prover.hpp @@ -142,12 +142,14 @@ namespace nil { boost::filesystem::path circuit_file_name, boost::filesystem::path preprocessed_common_data_file_name, boost::filesystem::path assignment_table_file_name, - boost::filesystem::path proof_file + boost::filesystem::path proof_file, + std::size_t expand_factor ) : circuit_file_(circuit_file_name) , preprocessed_common_data_file_(preprocessed_common_data_file_name) , assignment_table_file_(assignment_table_file_name) - , proof_file_(proof_file) { + , proof_file_(proof_file) + , expand_factor_(expand_factor) { } bool generate_to_file(bool skip_verification) { @@ -334,7 +336,9 @@ namespace nil { // Lambdas and grinding bits should be passed threw preprocessor directives std::size_t table_rows_log = std::ceil(std::log2(table_description_->rows_amount)); - fri_params_.emplace(detail::create_fri_params(table_rows_log)); + fri_params_.emplace( + detail::create_fri_params(table_rows_log, 1, expand_factor_) + ); std::size_t permutation_size = table_description_->witness_columns + table_description_->public_input_columns + ComponentConstantColumns; @@ -364,6 +368,7 @@ namespace nil { const boost::filesystem::path preprocessed_common_data_file_; const boost::filesystem::path assignment_table_file_; const boost::filesystem::path proof_file_; + const std::size_t expand_factor_; // All set on prepare_for_operation() std::optional public_preprocessed_data_; diff --git a/bin/proof-generator/src/arg_parser.cpp b/bin/proof-generator/src/arg_parser.cpp index e9f4662a..785e2d9f 100644 --- a/bin/proof-generator/src/arg_parser.cpp +++ b/bin/proof-generator/src/arg_parser.cpp @@ -90,6 +90,7 @@ namespace nil { ("columns-params", po::value(&prover_options.columns)->default_value(prover_options.columns), "Columns params, use --list-columns-params to list") ("lambda-param", po::value(&prover_options.lambda)->default_value(prover_options.lambda), "Lambda param (9)") ("grind-param", po::value(&prover_options.lambda)->default_value(prover_options.lambda), "Grind param (69)") + ("expand-factor", po::value(&prover_options.expand_factor)->default_value(prover_options.expand_factor), "Expand factor") ("skip-verification", po::bool_switch(&prover_options.skip_verification), "Skip generated proof verifying step") ("verification-only", po::bool_switch(&prover_options.verification_only), "Read proof for verification instead of writing to it"); // clang-format on diff --git a/bin/proof-generator/src/main.cpp b/bin/proof-generator/src/main.cpp index f7fb4f98..f4c2925a 100644 --- a/bin/proof-generator/src/main.cpp +++ b/bin/proof-generator/src/main.cpp @@ -42,7 +42,8 @@ int run_prover(const nil::proof_generator::prover_options& prover_options) { prover_options.circuit_file_path, prover_options.preprocessed_common_data_path, prover_options.assignment_table_file_path, - prover_options.proof_file_path + prover_options.proof_file_path, + prover_options.expand_factor ); bool prover_result; try {