From 462a33c503ee04d4d2725eeac2575c275cefc468 Mon Sep 17 00:00:00 2001 From: x-mass <36629999+x-mass@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:52:54 +0000 Subject: [PATCH] Poseidon refactor --- .../include/nil/proof-generator/prover.hpp | 12 +++++++----- libs/crypto3 | 2 +- libs/transpiler | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/proof-generator/include/nil/proof-generator/prover.hpp b/bin/proof-generator/include/nil/proof-generator/prover.hpp index 794ca308..0be1abab 100644 --- a/bin/proof-generator/include/nil/proof-generator/prover.hpp +++ b/bin/proof-generator/include/nil/proof-generator/prover.hpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -117,6 +117,7 @@ namespace nil { template typename FRIScheme::params_type create_fri_params( std::size_t degree_log, + std::size_t lambda, const int max_step = 1, std::size_t expand_factor = 0 ) { @@ -126,7 +127,8 @@ namespace nil { (1 << degree_log) - 1, // max_degree nil::crypto3::math::calculate_domain_set(degree_log + expand_factor, r), generate_random_step_list(r, max_step), - expand_factor + expand_factor, + lambda ); } } // namespace detail @@ -257,7 +259,7 @@ namespace nil { private: using BlueprintField = typename CurveType::base_field_type; using LpcParams = nil::crypto3::zk::commitments:: - list_polynomial_commitment_params; + list_polynomial_commitment_params; using Lpc = nil::crypto3::zk::commitments::list_polynomial_commitment; using LpcScheme = typename nil::crypto3::zk::commitments::lpc_commitment_scheme; using CircuitParams = nil::crypto3::zk::snark::placeholder_circuit_params; @@ -278,7 +280,7 @@ namespace nil { BOOST_LOG_TRIVIAL(info) << "Verifying proof..."; bool verification_result = nil::crypto3::zk::snark::placeholder_verifier::process( - *public_preprocessed_data_, + public_preprocessed_data_->common_data, proof, *table_description_, *constraint_system_, @@ -329,7 +331,7 @@ namespace nil { std::size_t table_rows_log = std::ceil(std::log2(table_description_->rows_amount)); fri_params_.emplace( - detail::create_fri_params(table_rows_log, 1, expand_factor_) + detail::create_fri_params(table_rows_log, all_lambda_params[LambdaParamIdx], 1, expand_factor_) ); std::size_t permutation_size = table_description_->witness_columns diff --git a/libs/crypto3 b/libs/crypto3 index d9f4661d..13909af0 160000 --- a/libs/crypto3 +++ b/libs/crypto3 @@ -1 +1 @@ -Subproject commit d9f4661d01510f5221ecc179c4253c7798719a99 +Subproject commit 13909af052a998c92d2a6a96e0bcfd21156aed72 diff --git a/libs/transpiler b/libs/transpiler index cc7cfa8c..2ee3908d 160000 --- a/libs/transpiler +++ b/libs/transpiler @@ -1 +1 @@ -Subproject commit cc7cfa8ca54572ae93efd7343a690c3d1e5dce49 +Subproject commit 2ee3908ddb300978b6abcf20814cafea5339e941