From 037311676b31b320e4a1473eb57c71f2f5b3b1c2 Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Wed, 21 Jul 2021 12:16:11 +0300 Subject: [PATCH] add tools to nightly tests --- .github/workflows/nightly.yml | 6 +++--- scripts/run_tools_test.sh | 12 +++++++----- tools/bls_glue.cpp | 2 +- tools/dkg_glue.cpp | 3 +-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7fc88f5b..291339c4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -78,7 +78,7 @@ jobs: # ./test.sh # cd .. - # - name: Run tools tests - # run: | - # ./scripts/run_tools_test.sh + - name: Run tools tests + run: | + ./scripts/run_tools_test.sh \ No newline at end of file diff --git a/scripts/run_tools_test.sh b/scripts/run_tools_test.sh index 0905ab4e..71c1d4cb 100755 --- a/scripts/run_tools_test.sh +++ b/scripts/run_tools_test.sh @@ -23,14 +23,16 @@ calculate_hash() { } run_tools_test_with_individual_keys() { - individual_dkg_keys="" + individual_dkg_keys="./dkg_glue --t 11 --n 16" for i in {0..15} do - individual_dkg_keys="$individual_dkg_keys --input data_for_$i-th_participant.json" + individual_dkg_keys=""$individual_dkg_keys" --input data_for_"$i"-th_participant.json" ./dkg_keygen --t 11 --n 16 --j "$i" done echo "Generated individual dkg keys" - ./dkg_glue --t 11 --n 16 "$individual_dkg_keys" + echo "$individual_dkg_keys" + echo "./dkg_glue --t 11 --n 16 "$individual_dkg_keys"" + $individual_dkg_keys echo "Generated individual bls keys" calculate_hash @@ -47,13 +49,13 @@ run_tools_test_with_individual_keys() { done echo "Completed individual signatures and verified them" - individual_signatures="" + individual_signatures="./bls_glue --t 11 --n 16 " for i in {0..10} do SIGNATURE="signature"$i".json" individual_signatures="$individual_signatures --input $SIGNATURE" done - ./bls_glue --t 11 --n 16 "$individual_signatures" --output "$SIGNATURE_FILE" + $individual_signatures --output "$SIGNATURE_FILE" echo "Generated common bls signature" ./verify_bls --t 11 --n 16 --input "$SIGNATURE_FILE" diff --git a/tools/bls_glue.cpp b/tools/bls_glue.cpp index 66a11d05..132df512 100644 --- a/tools/bls_glue.cpp +++ b/tools/bls_glue.cpp @@ -14,7 +14,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License - along with libBLS. If not, see . + along with libBLS. If not, see . @file bls_glue.cpp @author Oleh Nikolaiev diff --git a/tools/dkg_glue.cpp b/tools/dkg_glue.cpp index 6089abb1..fe83fbaf 100644 --- a/tools/dkg_glue.cpp +++ b/tools/dkg_glue.cpp @@ -14,7 +14,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License - along with libBLS. If not, see . + along with libBLS. If not, see . @file dkg_glue.cpp @author Oleh Nikolaiev @@ -52,7 +52,6 @@ void GenerateSecretKeys( const size_t t, const size_t n, const std::vector< std: size_t idx = stoi( data["idx"].get< std::string >() ); - secret_key_contribution[idx].resize( n ); for ( size_t i = 0; i < n; ++i ) { secret_key_contribution[idx][i] = libff::alt_bn128_Fr(