Skip to content

Commit

Permalink
Clang format#83
Browse files Browse the repository at this point in the history
  • Loading branch information
ETatuzova committed Apr 27, 2024
1 parent 7a4c53c commit 8c7b618
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
working-directory: ${{ steps.strings.outputs.artifact-dir }}
run: |
extra_args=""
if [[ "true" == "false" ]]; then
if [[ "true" == "true" ]]; then
extra_args="--multithreaded "
fi
targets_str=$(echo "${{ needs.prepare-targets.outputs.prover-targets }}" | awk '{$1=$1};1' | sed '/^$/d' | tr '\n' ' ' | sed 's/ $//')
Expand Down
4 changes: 2 additions & 2 deletions bin/proof-generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ set(SINGLE_THREADED_TARGET "${CURRENT_PROJECT_NAME}-single-threaded")
setup_proof_generator_target(TARGET_NAME ${SINGLE_THREADED_TARGET} ADDITIONAL_DEPENDENCIES crypto3::zk)

# Declare multi-threaded target
# set(MUTLI_THREADED_TARGET "${CURRENT_PROJECT_NAME}-multi-threaded")
# setup_proof_generator_target(TARGET_NAME ${MUTLI_THREADED_TARGET} ADDITIONAL_DEPENDENCIES actor::zk)
set(MUTLI_THREADED_TARGET "${CURRENT_PROJECT_NAME}-multi-threaded")
setup_proof_generator_target(TARGET_NAME ${MUTLI_THREADED_TARGET} ADDITIONAL_DEPENDENCIES actor::zk)

install(TARGETS ${SINGLE_THREADED_TARGET} ${MUTLI_THREADED_TARGET} RUNTIME DESTINATION bin)
7 changes: 3 additions & 4 deletions bin/proof-generator/include/nil/proof-generator/prover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
#include <nil/crypto3/zk/snark/arithmetization/plonk/constraint_system.hpp>
#include <nil/crypto3/zk/snark/arithmetization/plonk/params.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/placeholder_policy.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/profiling.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/params.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/proof.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/verifier.hpp>
#include <nil/crypto3/zk/snark/systems/plonk/placeholder/detail/profiling.hpp>

#include <nil/blueprint/transpiler/recursive_verifier_generator.hpp>
#include <nil/marshalling/endianness.hpp>
Expand Down Expand Up @@ -140,7 +140,6 @@ namespace nil {
, expand_factor_(expand_factor)
, max_quotient_chunks_(max_quotient_chunks_)
, grind_(grind) {
std::cout << "Global constructor" << std::endl;
}

bool generate_to_file(bool skip_verification) {
Expand Down Expand Up @@ -318,7 +317,7 @@ namespace nil {
std::size_t table_rows_log = std::ceil(std::log2(table_description_->rows_amount));

fri_params_.emplace(FriParams(1, table_rows_log, lambda_, expand_factor_));

// fri_params_.emplace(FriParams(1, table_rows_log, lambda_, expand_factor_));
lpc_scheme_.emplace(*fri_params_);

BOOST_LOG_TRIVIAL(info) << "Preprocessing public data";
Expand All @@ -329,7 +328,7 @@ namespace nil {
assignment_table.move_public_table(),
*table_description_,
*lpc_scheme_,
max_quotient_chunks_
max_quotient_chunks
)
);

Expand Down
7 changes: 0 additions & 7 deletions bin/proof-generator/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ int hash_wrapper(const ProverOptions& prover_options) {
int ret;
auto run_prover_wrapper_void = [&prover_options, &ret]<typename HashTypeIdentity>() {
using HashType = typename HashTypeIdentity::type;
std::cout << "run prover" << std::endl;
ret = run_prover<CurveType, HashType>(prover_options);
};
pass_variant_type_to_template_func<HashesVariant>(prover_options.hash_type, run_prover_wrapper_void);
return ret;
}

int curve_wrapper(const ProverOptions& prover_options) {
std::cout << "Curve wrapper" << std::endl;
int ret;
auto curves_wrapper_void = [&prover_options, &ret]<typename CurveTypeIdentity>() {
using CurveType = typename CurveTypeIdentity::type;
Expand All @@ -84,19 +82,14 @@ int curve_wrapper(const ProverOptions& prover_options) {
}

int initial_wrapper(const ProverOptions& prover_options) {
std::cout << "Initial wrapper" << std::endl;
return curve_wrapper(prover_options);
}

int main(int argc, char* argv[]) {
std::cout << "Main" << std::endl;
std::optional<nil::proof_generator::ProverOptions> prover_options = nil::proof_generator::parse_args(argc, argv);
std::cout << "Parsed" << std::endl;
if (!prover_options) {
// Action has already taken a place (help, version, etc.)
return 0;
}
std::cout << "Prover done" << std::endl;

return initial_wrapper(*prover_options);
}

0 comments on commit 8c7b618

Please sign in to comment.