Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 2ef304e

Browse files
committed
Style fix
1 parent 1aecdeb commit 2ef304e

File tree

4 files changed

+16
-40
lines changed

4 files changed

+16
-40
lines changed

bin/proof-generator/include/nil/proof-generator/arg_parser.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ namespace nil {
4242
boost::log::trivial::severity_level log_level = boost::log::trivial::severity_level::info;
4343
bool skip_verification = false;
4444
bool verification_only = false;
45-
CurvesVariant elliptic_curve_type = type_identity<nil::crypto3::algebra::curves::pallas> {};
46-
HashesVariant hash_type = type_identity<nil::crypto3::hashes::keccak_1600<256>> {};;
45+
CurvesVariant elliptic_curve_type = type_identity<nil::crypto3::algebra::curves::pallas>{};
46+
HashesVariant hash_type = type_identity<nil::crypto3::hashes::keccak_1600<256>>{};
47+
;
4748
std::size_t lambda = 9;
4849
std::size_t grind = 69;
4950
std::size_t expand_factor = 2;

bin/proof-generator/include/nil/proof-generator/arithmetization_params.hpp

+6-28
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#include <nil/crypto3/algebra/curves/pallas.hpp>
2424
#include <nil/crypto3/algebra/curves/vesta.hpp>
25-
2625
#include <nil/crypto3/hash/keccak.hpp>
2726
#include <nil/crypto3/hash/poseidon.hpp>
2827
#include <nil/crypto3/hash/sha2.hpp>
@@ -32,38 +31,17 @@
3231
namespace nil {
3332
namespace proof_generator {
3433

35-
// Available in runtime columns params. Order is:
36-
// witness | public_input | component_constant | component_selector |
37-
// lookup_constant | lookup_selector
38-
constexpr std::array<columns_params, 4> all_columns_params = {{
39-
{15, 1, 5, 50, 30, 6},
40-
{15, 1, 5, 60, 0, 0},
41-
{15, 1, 2, 50, 14, 6},
42-
{15, 1, 5, 30, 30, 6}
43-
// Add more params as needed.
44-
}};
45-
46-
constexpr std::array<LambdaParam, 1> all_lambda_params = {
47-
20
48-
// Add more params as needed.
49-
};
50-
51-
constexpr std::array<GrindParam, 1> all_grind_params = {
52-
69
53-
// Add more params as needed.
54-
};
55-
56-
using CurveTypes = std::tuple<
57-
nil::crypto3::algebra::curves::pallas
58-
// Add more curves as needed.
59-
>;
34+
using CurveTypes = std::tuple<nil::crypto3::algebra::curves::pallas
35+
// Add more curves as needed.
36+
>;
6037

6138
using HashTypes = std::tuple<
6239
nil::crypto3::hashes::keccak_1600<256>,
6340
nil::crypto3::hashes::sha2<256>,
64-
nil::crypto3::hashes::poseidon<nil::crypto3::hashes::detail::mina_poseidon_policy<nil::crypto3::algebra::curves::pallas::base_field_type>>
41+
nil::crypto3::hashes::poseidon<nil::crypto3::hashes::detail::mina_poseidon_policy<
42+
nil::crypto3::algebra::curves::pallas::base_field_type>>
6543
// Add more hashes as needed.
66-
>;
44+
>;
6745

6846
} // namespace proof_generator
6947
} // namespace nil

bin/proof-generator/include/nil/proof-generator/prover.hpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,18 @@
3030
#include <nil/crypto3/algebra/fields/arithmetic_params/pallas.hpp>
3131
#include <nil/crypto3/marshalling/zk/types/commitments/eval_storage.hpp>
3232
#include <nil/crypto3/marshalling/zk/types/commitments/lpc.hpp>
33-
#include <nil/crypto3/marshalling/zk/types/placeholder/proof.hpp>
3433
#include <nil/crypto3/marshalling/zk/types/placeholder/common_data.hpp>
34+
#include <nil/crypto3/marshalling/zk/types/placeholder/proof.hpp>
3535
#include <nil/crypto3/marshalling/zk/types/plonk/assignment_table.hpp>
3636
#include <nil/crypto3/marshalling/zk/types/plonk/constraint_system.hpp>
37-
3837
#include <nil/crypto3/math/algorithms/calculate_domain_set.hpp>
3938
#include <nil/crypto3/multiprecision/cpp_int.hpp>
4039
#include <nil/crypto3/zk/snark/arithmetization/plonk/constraint_system.hpp>
4140
#include <nil/crypto3/zk/snark/arithmetization/plonk/params.hpp>
4241
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/placeholder_policy.hpp>
42+
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/profiling.hpp>
4343
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/params.hpp>
4444
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp>
45-
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/profiling.hpp>
4645
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/proof.hpp>
4746
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp>
4847
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/verifier.hpp>
@@ -138,8 +137,8 @@ namespace nil {
138137
, json_file_(json_file)
139138
, lambda_(lambda)
140139
, expand_factor_(expand_factor)
141-
, grind_(grind){
142-
std::cout << "Global constructor" << std::endl;
140+
, grind_(grind) {
141+
std::cout << "Global constructor" << std::endl;
143142
}
144143

145144
bool generate_to_file(bool skip_verification) {
@@ -245,8 +244,7 @@ namespace nil {
245244

246245
private:
247246
using BlueprintField = typename CurveType::base_field_type;
248-
using LpcParams = nil::crypto3::zk::commitments::
249-
list_polynomial_commitment_params<HashType, HashType, 2>;
247+
using LpcParams = nil::crypto3::zk::commitments::list_polynomial_commitment_params<HashType, HashType, 2>;
250248
using Lpc = nil::crypto3::zk::commitments::list_polynomial_commitment<BlueprintField, LpcParams>;
251249
using LpcScheme = typename nil::crypto3::zk::commitments::lpc_commitment_scheme<Lpc>;
252250
using CircuitParams = nil::crypto3::zk::snark::placeholder_circuit_params<BlueprintField>;
@@ -317,9 +315,7 @@ namespace nil {
317315
// Lambdas and grinding bits should be passed threw preprocessor directives
318316
std::size_t table_rows_log = std::ceil(std::log2(table_description_->rows_amount));
319317

320-
fri_params_.emplace(
321-
FriParams(1, table_rows_log, lambda_, expand_factor_)
322-
);
318+
fri_params_.emplace(FriParams(1, table_rows_log, lambda_, expand_factor_));
323319

324320
lpc_scheme_.emplace(*fri_params_);
325321

bin/proof-generator/src/arg_parser.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//---------------------------------------------------------------------------//
1616

1717
#include "nil/proof-generator/arg_parser.hpp"
18+
1819
#include "nil/proof-generator/arithmetization_params.hpp"
1920

2021
#include <fstream>

0 commit comments

Comments
 (0)