From 8166f50f69ae3e0bd50b1f9a11e4153d375f6e00 Mon Sep 17 00:00:00 2001 From: Duncan Tebbs Date: Mon, 20 Sep 2021 18:06:53 +0100 Subject: [PATCH 1/2] submodule: update zeth [v0.8.0] --- .github/workflows/onpullrequest.yml | 19 +++++++++++++------ client/setup.py | 12 ++---------- depends/zeth | 2 +- libzecale/circuits/pairing/pairing_params.hpp | 6 ++---- scripts/ci | 4 +++- scripts/test_client | 4 ++-- scripts/test_zeth_zecale | 6 +++--- 7 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/onpullrequest.yml b/.github/workflows/onpullrequest.yml index 28cf1478..a4121c01 100644 --- a/.github/workflows/onpullrequest.yml +++ b/.github/workflows/onpullrequest.yml @@ -16,9 +16,12 @@ jobs: uses: actions/cache@v2 with: key: grpc-1.31.x-${{ runner.os }} - path: depends/grpc + path: depends/zeth/depends/grpc - name: Build grpc - run: if ! [ -d depends/grpc ] ; then depends/zeth/scripts/install_grpc /usr v1.31.x depends/grpc ; fi + run: | + pushd depends/zeth + if ! [ -d depends/grpc ] ; then scripts/install-grpc /usr v1.31.x ; fi + popd build-linux-full-tests: runs-on: ubuntu-20.04 @@ -34,7 +37,7 @@ jobs: uses: actions/cache@v2 with: key: grpc-1.31.x-${{ runner.os }} - path: depends/grpc + path: depends/zeth/depends/grpc - name: Cache pip uses: actions/cache@v2 with: @@ -51,7 +54,9 @@ jobs: key: build-linux-full-tests-npm-${{ hashFiles('**/package-lock.json') }}-${{ runner.os }} - name: Install dependencies run: | - depends/zeth/scripts/install_grpc /usr v1.31.x depends/grpc + pushd depends/zeth + INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x + popd - name: Execute run: CI_FULL_TESTS=1 CI_CONFIG=Release scripts/ci build @@ -69,7 +74,7 @@ jobs: uses: actions/cache@v2 with: key: grpc-1.31.x-${{ runner.os }} - path: depends/grpc + path: depends/zeth/depends/grpc - name: Cache pip uses: actions/cache@v2 with: @@ -86,6 +91,8 @@ jobs: key: build-linux-integration-tests-npm-${{ hashFiles('**/package-lock.json') }}-${{ runner.os }} - name: Install dependencies run: | - depends/zeth/scripts/install_grpc /usr v1.31.x depends/grpc + pushd depends/zeth + INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x + popd - name: Execute run: CI_INTEGRATION_TESTS=1 CI_CONFIG=Release scripts/ci build diff --git a/client/setup.py b/client/setup.py index bc81d53d..82b66611 100644 --- a/client/setup.py +++ b/client/setup.py @@ -19,17 +19,9 @@ version='0.4', description='Client to interact with Zecale server', packages=find_packages(), - # zip_safe=False, install_requires=[ - "mypy==0.790", - "mypy-protobuf==1.23", - "flake8==3.8.3", - "pylint==2.6", - "click==7.0", - "click-default-group==1.2", - "protobuf==3.13.0", - "grpcio==1.33.2", - "grpcio-tools==1.33.2", + # Dependencies installed as part of zeth client. Further dependencies + # are listed here: ], entry_points={ 'console_scripts': [ diff --git a/depends/zeth b/depends/zeth index 60ed99a4..1e9a3484 160000 --- a/depends/zeth +++ b/depends/zeth @@ -1 +1 @@ -Subproject commit 60ed99a4a7bff5b87abb4ac4ce55cddd693c7302 +Subproject commit 1e9a3484c15e05cb3c9f6c196c7453fab61e6ca2 diff --git a/libzecale/circuits/pairing/pairing_params.hpp b/libzecale/circuits/pairing/pairing_params.hpp index 39004d3f..eb5fbfb1 100644 --- a/libzecale/circuits/pairing/pairing_params.hpp +++ b/libzecale/circuits/pairing/pairing_params.hpp @@ -83,10 +83,8 @@ template class pairing_selector; * Below are various template aliases (used for convenience). */ -template -using FqkT = - typename pairing_selector::FqkT; // TODO: better name when stable - +// TODO: better name when stable +template using FqkT = typename pairing_selector::FqkT; template using Fqe_variable = typename pairing_selector::Fqe_variable_type; template diff --git a/scripts/ci b/scripts/ci index cc8f0a71..e0a913b3 100755 --- a/scripts/ci +++ b/scripts/ci @@ -4,7 +4,9 @@ platform=`uname` echo platform=${platform} echo "running against commit: "`git log --oneline --no-decorate -n 1` -. depends/zeth/scripts/ci_utils.sh +pushd depends/zeth +. scripts/ci_utils.sh +popd . scripts/ci_utils.sh set -x diff --git a/scripts/test_client b/scripts/test_client index 45ad31e7..6188712f 100755 --- a/scripts/test_client +++ b/scripts/test_client @@ -14,9 +14,9 @@ TEST_DATA_DIR=${ROOT_DIR}/testdata function setup_user() { mkdir -p $1 pushd $1 - [ -e eth-network ] || zeth_helper eth-gen-network-config + [ -e eth-network ] || zeth-helper eth-gen-network-config [ -e eth-address ] || \ - (zeth_helper eth-gen-address && zeth_helper eth-fund) + (zeth-helper eth-gen-address && zeth-helper eth-fund) popd } diff --git a/scripts/test_zeth_zecale b/scripts/test_zeth_zecale index 874fda8a..c542bff0 100755 --- a/scripts/test_zeth_zecale +++ b/scripts/test_zeth_zecale @@ -10,9 +10,9 @@ ROOT_DIR=`pwd` function setup_user() { mkdir -p $1 pushd $1 - [ -e eth-network ] || zeth_helper eth-gen-network-config $2 + [ -e eth-network ] || zeth-helper eth-gen-network-config $2 [ -e eth-address ] || \ - (zeth_helper eth-gen-address && zeth_helper eth-fund) + (zeth-helper eth-gen-address && zeth-helper eth-fund) [ -e zeth-address.priv ] || zeth gen-address popd } @@ -52,7 +52,7 @@ pushd zeth_deployer [ -e vk-hash ] || zecale nested-verification-key-hash zeth-vk.json > vk-hash # Deploy zeth using zecale_address and vk_hash. - dispatcher_address=`zeth_helper eth-get-contract-address zecale-instance` + dispatcher_address=`zeth-helper eth-get-contract-address zecale-instance` [ -e zeth-instance ] || zeth deploy \ --permitted-dispatcher ${dispatcher_address} \ --vk-hash `cat vk-hash` From 6ca1062d970825ee17ffd20a9511f45ccdb764ea Mon Sep 17 00:00:00 2001 From: Duncan Tebbs Date: Tue, 21 Sep 2021 16:23:21 +0100 Subject: [PATCH 2/2] scripts: renamed to be consistent with zeth scripts --- client/README.md | 6 +++--- scripts/ci | 2 +- scripts/{test_client => test-client} | 0 scripts/{test_zeth_zecale => test-zeth-zecale} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename scripts/{test_client => test-client} (100%) rename scripts/{test_zeth_zecale => test-zeth-zecale} (100%) diff --git a/client/README.md b/client/README.md index d318b490..2673e1d7 100644 --- a/client/README.md +++ b/client/README.md @@ -96,7 +96,7 @@ Moreover, the CLIs are tested using the following script: ```console (env)$ cd .. -(env)$ ./scripts/test_client +(env)$ ./scripts/test-client ``` # The `zecale` command line interface @@ -104,7 +104,7 @@ Moreover, the CLIs are tested using the following script: The `zecale` command exposes Zecale operations via a command line interface. A brief description is given in this section. More details are available via `zecale --help`, and example usage can be seen in the [client test -script](../scripts/test_client). +script](../scripts/test-client). ## Environment @@ -167,5 +167,5 @@ zecale_dummy_app deploy ``` For a more comprehensive overview on how to use Zecale with a base -application, please refer to the [zeth-zecale integration test script](../scripts/test_zeth_zecale). +application, please refer to the [zeth-zecale integration test script](../scripts/test-zeth-zecale). diff --git a/scripts/ci b/scripts/ci index e0a913b3..fcddbf16 100755 --- a/scripts/ci +++ b/scripts/ci @@ -84,7 +84,7 @@ function integration_tests() { # Run integration test . client/env/bin/activate - ./scripts/test_client + ./scripts/test-client deactivate aggregator_stop diff --git a/scripts/test_client b/scripts/test-client similarity index 100% rename from scripts/test_client rename to scripts/test-client diff --git a/scripts/test_zeth_zecale b/scripts/test-zeth-zecale similarity index 100% rename from scripts/test_zeth_zecale rename to scripts/test-zeth-zecale