Skip to content

Commit

Permalink
Synchronize changes from crypto3, fix broken tests
Browse files Browse the repository at this point in the history
Corrected file permissions #15

Removed missing target from flake.nix #15
  • Loading branch information
vo-nil committed Jul 17, 2024
1 parent 3cf935e commit 10420b6
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"actor_zk_systems_plonk_placeholder_placeholder_quotient_polynomial_chunks_test"
# "actor_zk_commitment_powers_of_tau_test"
"actor_zk_commitment_proof_of_knowledge_test"
"actor_zk_commitment_r1cs_gg_ppzksnark_mpc_test"
# "actor_zk_commitment_r1cs_gg_ppzksnark_mpc_test"
"actor_zk_math_expression_test"
"actor_zk_systems_plonk_plonk_constraint_test"
];
Expand Down
2 changes: 1 addition & 1 deletion libs/parallel-math/include/nil/crypto3/math/domains/arithmetic_sequence_domain.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace nil {

nil::crypto3::parallel_for(0, arithmetic_sequence.size(),
[this](std::size_t i) {
this->arithmetic_sequence[i] *= field_value_type(i);
this->arithmetic_sequence[i] = this->arithmetic_generator * field_value_type(i);
});

precomputation_sentinel = true;
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified libs/parallel-math/include/nil/crypto3/math/polynomial/xgcd.hpp
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ namespace nil {
using value_type = typename FieldType::value_type;
using integral_type = typename FieldType::integral_type;

static inline value_type generate(transcript_type &transcript,
nil::crypto3::random::algebraic_engine<FieldType> random_engine, std::size_t GrindingBits=16) {

static inline value_type generate(transcript_type &transcript, std::size_t GrindingBits=16) {
static boost::random::random_device dev;
static nil::crypto3::random::algebraic_engine<FieldType> random_engine(dev);
value_type pow_seed = random_engine();

integral_type mask =
Expand Down
4 changes: 2 additions & 2 deletions libs/parallel-zk/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ foreach(TEST_NAME ${TESTS_NAMES})
define_zk_test(${TEST_NAME})
endforeach()

string(CONCAT TEST_DATA ${CMAKE_CURRENT_SOURCE_DIR} "/systems/plonk/pickles/data/kimchi")
target_compile_definitions(actor_zk_systems_plonk_pickles_kimchi_test PRIVATE TEST_DATA="${TEST_DATA}")
#string(CONCAT TEST_DATA ${CMAKE_CURRENT_SOURCE_DIR} "/systems/plonk/pickles/data/kimchi")
#target_compile_definitions(actor_zk_systems_plonk_pickles_kimchi_test PRIVATE TEST_DATA="${TEST_DATA}")

if(BUILD_BENCH_TESTS)
cm_add_test_subdirectory(bench_test)
Expand Down
9 changes: 4 additions & 5 deletions libs/parallelization-utils/test/thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,23 @@
#include <boost/test/data/monomorphic.hpp>

#include <nil/actor/core/thread_pool.hpp>
#include <nil/actor/core/parallelization_utils.hpp>

using namespace nil::crypto3::algebra;
using namespace nil::crypto3::math;

BOOST_AUTO_TEST_SUITE(thread_pool_test_suite)

BOOST_AUTO_TEST_CASE(vector_multiplication_test) {
size_t size = 131072;

std::vector<int> v(size);
std::vector<size_t> v(size);

for (std::size_t i = 0; i < size; ++i)
v[i] = i;

nil::crypto3::wait_for_all(parallel_run_in_chunks<void>(
nil::crypto3::wait_for_all(nil::crypto3::parallel_run_in_chunks<void>(
size,
[&v](std::size_t begin, std::size_t end) {
for (std::size_t i = begin; i < end; i++) {
for (std::size_t i = begin; i < end; ++i) {
v[i] *= v[i];
}
}, nil::crypto3::ThreadPool::PoolLevel::HIGH));
Expand Down

0 comments on commit 10420b6

Please sign in to comment.