From 40360b7aa83ef81ae7cc8b6c0a6f05667c201e51 Mon Sep 17 00:00:00 2001 From: Aleksandr Cherenkov Date: Thu, 28 Mar 2024 19:46:37 +0000 Subject: [PATCH] remove old assigner tests and balance example --- .github/workflows/build_linux.yml | 7 ------- .github/workflows/build_macos.yml | 7 ------- examples/cpp/CMakeLists.txt | 1 - examples/cpp/balance.cpp | 24 ------------------------ examples/inputs/balance.inp | 3 --- 5 files changed, 42 deletions(-) delete mode 100644 examples/cpp/balance.cpp delete mode 100644 examples/inputs/balance.inp diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 5e99931a..e0528b6a 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -247,13 +247,6 @@ jobs: run: | cmake --build build -t check-crypto3-assigner - - name: Run assigner tests - run: | - cd libs/assigner/test - chmod +x run_tests.py - python3 run_tests.py ../../../build/bin/assigner/assigner - cd ../../../ - - name: Build proof for the circuit of the C++ examples run: | cmake --build build -t prove_cpp_examples diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index 6af61919..84606f80 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -157,13 +157,6 @@ jobs: run: | cmake --build build -t check-crypto3-assigner - - name: Run assigner tests - run: | - cd libs/assigner/test - chmod +x run_tests.py - python3 run_tests.py ../../../build/bin/assigner/assigner - cd ../../../ - - name: Build proof for the circuit of the C++ examples run: | cmake --build build -t prove_cpp_examples diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 729954ee..29235f07 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -142,7 +142,6 @@ add_example_with_proving(merkle_poseidon_21prover_3layers_cpp_example SOURCES me add_example_without_proving(merkle_tree_sha2_256_cpp_example SOURCES merkle_tree_sha2_256.cpp INPUT merkle_tree_sha2_256.inp CURVE_TYPE pallas) add_example_without_proving(validate_merkle_path_sha2_256_cpp_example SOURCES validate_merkle_path_sha2_256.cpp INPUT validate_merkle_path_sha2_256.inp CURVE_TYPE pallas) add_example_without_proving(sha256_cpp_example SOURCES sha2_256.cpp INPUT sha2_256.inp CURVE_TYPE pallas) -add_example_with_proving(balance_cpp_example SOURCES balance.cpp INPUT balance.inp CURVE_TYPE pallas) add_example_with_proving(memory_cpp_example SOURCES memory.cpp INPUT memory.inp CURVE_TYPE pallas) add_example_with_proving(polynomial_cpp_example SOURCES polynomial.cpp INPUT polynomial.inp COMPILER_OPTIONS -std=c++20 CURVE_TYPE pallas) add_example_with_proving(pallas_curve_addition_cpp_example diff --git a/examples/cpp/balance.cpp b/examples/cpp/balance.cpp deleted file mode 100644 index 7918a8ee..00000000 --- a/examples/cpp/balance.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include - -using namespace nil::crypto3::algebra::curves; - -constexpr std::size_t VertexAmount = 5; -[[circuit]] std::array - balance(std::array vertexes, - std::array - weights) { - - std::array balance_point = {0,0}; - typename pallas::base_field_type::value_type balance_weight = 0; - - for (std::size_t VertexIndex = 0; VertexIndex < VertexAmount; VertexIndex++) { - balance_point[0] += vertexes[VertexIndex + VertexIndex] * weights[VertexIndex]; - balance_point[1] += vertexes[VertexIndex + VertexIndex + 1] * weights[VertexIndex]; - balance_weight += weights[VertexIndex]; - } - - balance_point[0] /= balance_weight; - balance_point[1] /= balance_weight; - - return balance_point; -} diff --git a/examples/inputs/balance.inp b/examples/inputs/balance.inp deleted file mode 100644 index cd4aac0b..00000000 --- a/examples/inputs/balance.inp +++ /dev/null @@ -1,3 +0,0 @@ -[ {"array": [1230,1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239 ]}, - {"array": [ 1240, 1241, 1242, 1243, 1244]} -]