diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 627e94fed..9725af99a 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -37,19 +37,27 @@ jobs: cd circom cargo build --release cargo install --path circom - - name: Checkout rapidsnark + - name: Checkout rapidsnark source code uses: actions/checkout@v3 with: - repository: iden3/rapidsnark + repository: clrfund/rapidsnark path: rapidsnark - - name: Build rapidsnark + - name: Install rapidsnark run: | - cd rapidsnark + cd $GITHUB_WORKSPACE/rapidsnark npm install git submodule init git submodule update - npx task createFieldSources - npx task buildProver + ./build_gmp.sh host + mkdir build_prover && cd build_prover + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package + make -j4 && make install + - name: Find rapidsnark + run: | + cd rapidsnark + pwd + echo "$GITHUB_WORKSPACE" + find . -name "prover" - name: Checkout Clrfund uses: actions/checkout@v3 with: @@ -70,7 +78,7 @@ jobs: - name: Run tests run: | export CIRCUIT_DIRECTORY="$GITHUB_WORKSPACE/params" - export RAPIDSNARK_DIRECTORY="$GITHUB_WORKSPACE/rapidsnark/build" + export RAPID_SNARK="$GITHUB_WORKSPACE/rapidsnark/package/bin/prover" cd monorepo yarn test:e2e diff --git a/.github/workflows/test-scripts.yml b/.github/workflows/test-scripts.yml index c7fd09df7..c115edf7b 100644 --- a/.github/workflows/test-scripts.yml +++ b/.github/workflows/test-scripts.yml @@ -44,7 +44,11 @@ jobs: mkdir build_prover && cd build_prover cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package make -j4 && make install + - name: Find rapidsnark + run: | + cd rapidsnark pwd + echo "$GITHUB_WORKSPACE" find . -name "prover" - name: Checkout source code uses: actions/checkout@v3 @@ -65,7 +69,7 @@ jobs: yarn start:node & - name: Run script tests run: | - export RAPIDSNARK_DIRECTORY=$GITHUB_WORKSPACE/rapidsnark/package/bin + export RAPID_SNARK=$GITHUB_WORKSPACE/rapidsnark/package/bin/prover export CIRCUIT_DIRECTORY=$GITHUB_WORKSPACE/params cd monorepo/contracts ./sh/runScriptTests.sh diff --git a/contracts/.env.example b/contracts/.env.example index 5c61baf56..15ea56d1e 100644 --- a/contracts/.env.example +++ b/contracts/.env.example @@ -50,10 +50,10 @@ CIRCUIT_TYPE=prod # The IPFS gateway url used by the prepare-results.ts script IPFS_GATEWAY_URL= -# Parameters used in the tally script +# Parameters used in the e2e testing CIRCUIT_TYPE= CIRCUIT_DIRECTORY= -RAPIDSNARK_DIRECTORY= +RAPID_SNARK= # Used in MACI queue merging operation before genProofs, default is 4 NUM_QUEUE_OPS= # Used in e2e testing to store intermediate states diff --git a/contracts/cli/tally.ts b/contracts/cli/tally.ts index 4b6d3a04e..4032bef96 100644 --- a/contracts/cli/tally.ts +++ b/contracts/cli/tally.ts @@ -51,7 +51,7 @@ program ) .requiredOption('-o --output-dir