Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/onpullrequest-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,18 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Cache grpc
uses: actions/cache@v2
with:
key: grpc-1.31.x-${{ runner.os }}
path: depends/grpc
# - name: Cache ccache
# uses: actions/cache@v2
# with:
# key: prover-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }}
# path: ~/.ccache
- name: Cache pip
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/Library/Caches/pip
key: prover-tests-pip-${{ hashFiles('**/setup.py') }}-${{ runner.os }}
- name: Cache npm
uses: actions/cache@v2
with:
path: |
~/.npm
depends/ganache-cli/node_modules
key: prover-tests-npm-${{ hashFiles('**/package-lock.json') }}-${{ runner.os }}
- name: Install dependencies
run: |
INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x
Expand All @@ -93,35 +78,18 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Cache grpc
uses: actions/cache@v2
with:
key: grpc-1.31.x-${{ runner.os }}
path: depends/grpc
# ccache in this job seems to make the tests crash occasionally. Disabling
# until the cause is understood.
# - name: Cache ccache
# uses: actions/cache@v2
# with:
# key: integration-tests-ccache-${{ needs.onpr-submodules.outputs.commits }}-${{ matrix.curve }}-${{ runner.os }}
# path: ~/.ccache
- name: Cache pip
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/Library/Caches/pip
key: integration-tests-pip-${{ hashFiles('**/setup.py') }}-${{ runner.os }}
- name: Cache npm
uses: actions/cache@v2
with:
path: |
~/.npm
depends/ganache-cli/node_modules
key: integration-tests-npm-${{ hashFiles('**/package-lock.json') }}-${{ runner.os }}
- name: Install dependencies
run: |
INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/onpush-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v2
with:
node-version: '10'
- name: Cache npm (incl ganache-cli/node_modules)
uses: actions/cache@v2
with:
path: |
~/.npm
depends/ganache-cli/node_modules
key: check-contracts-npm-${{ hashFiles('**/package-lock.json') }}-${{ runner.os }}
- name: Cache pip
uses: actions/cache@v2
with:
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,7 @@ https://eprint.iacr.org/2016/260).
#### Terminal 2: Ethereum testnet

```bash
# Start the Ethereum test net by running the following commands
cd zeth_contracts

# If the install below fails with python errors, try running:
npm config set python python2.7

# Install dependencies
npm install

# Start a local Ethereum testnet
npm run testrpc
scripts/ganache-start
```

#### Terminal 3: Python client
Expand Down
1 change: 1 addition & 0 deletions scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function check_contracts() {

# Run checks in zeth_contracts
pushd zeth_contracts
npm install
npm run check
popd # zeth_contracts

Expand Down
20 changes: 2 additions & 18 deletions scripts/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,8 @@ function server_stop() {
#

function ganache_setup() {
# Nothing to do. Just check that the platform vars have been initialized.
assert_init_platform

if [ "${platform}" == "Linux" ] ; then
if (which apk) ; then
apk add --update npm
fi
fi

pushd zeth_contracts
npm config set python python2.7
npm config set engine-strict true
npm config set unsafe-perm true
npm install --unsafe-perm
popd
}

function ganache_is_active() {
Expand All @@ -75,19 +63,15 @@ function ganache_is_active() {
}

function ganache_start() {
pushd zeth_contracts
server_start \
"npm run testrpc" \
scripts/ganache-start \
ganache_is_active \
ganache.pid \
ganache.stdout
popd
}

function ganache_stop() {
pushd zeth_contracts
server_stop ganache ganache.pid
popd
}

#
Expand Down
14 changes: 14 additions & 0 deletions scripts/ganache-start
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

echo Starting ganache docker container. Press CTRL-C to exit.

# Run ganache from the Docker container, passing in the flags required by the
# zeth tests.
docker run \
--rm \
-p 8545:8545 \
ghcr.io/clearmatics/ganache-cli:latest \
--hardfork istanbul \
--gasLimit 0x3FFFFFFFFFFFF \
--gasPrice 1 \
--defaultBalanceEther 9000000000
9 changes: 1 addition & 8 deletions zeth_contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"description": "zerocash on Ethereum",
"main": "truffle.js",
"scripts": {
"install": "ln -s ../../depends/ganache-cli node_modules/ganache-cli && cd node_modules/ganache-cli && npm install",
"testrpc": "node node_modules/ganache-cli/cli.js --hardfork istanbul --port 8545 --gasLimit 0x3FFFFFFFFFFFF --gasPrice 1 --defaultBalanceEther 90000000000 --networkId 1234",
Comment thread
AntoineRondelet marked this conversation as resolved.
"compile": "truffle compile",
"deploy": "truffle deploy",
"test": "truffle test",
Expand All @@ -15,11 +13,6 @@
"author": "Clearmatics Technologies LTD: Cryptography R&D Department",
"license": "LGPL-3.0+",
"dependencies": {
"add": "^2.0.6",
"ethereumjs-abi": "^0.6.8",
"shell-escape": "^0.2.0",
"solhint": "^3.3.2",
"strip-hex-prefix": "^1.0.0",
"web3": "^1.2.4"
"solhint": "^3.3.2"
}
}