From 8fde17b46d06ef0dd4485c5cab47dac71a6a080f Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Fri, 6 Sep 2019 13:33:08 -0700 Subject: [PATCH] Npm install client --- .buildkite/scripts/test_e2e.sh | 37 ++-- package-lock.json | 325 +++++++++++++++++++++++++++++++++ package.json | 3 +- 3 files changed, 343 insertions(+), 22 deletions(-) diff --git a/.buildkite/scripts/test_e2e.sh b/.buildkite/scripts/test_e2e.sh index c0c6fac..3a8cd50 100755 --- a/.buildkite/scripts/test_e2e.sh +++ b/.buildkite/scripts/test_e2e.sh @@ -1,19 +1,17 @@ #!/bin/bash -############################################################ +################################################################################ # This script tests the Ekiden project. # # Usage: # test_e2e.sh [-w ] [-t ] -############################################################ +################################################################################ # Defaults. WORKDIR=$(pwd) TEST_FILTER="" -######################### # Process test arguments. -######################### while getopts 'f:t:' arg do case ${arg} in @@ -25,15 +23,14 @@ do esac done -export E2E_TESTS_BRANCH=master +export E2E_TESTS_BRANCH=armani/ci export EKIDEN_REPO="https://github.com/oasislabs/ekiden.git" export EKIDEN_BRANCH=master export RUNTIME_BRANCH=master export DEVELOPER_GATEWAY_BRANCH=master export BUILDKITE_ACCESS_TOKEN="7a3c5347b067ba00750cc9a513e0d93c4fbfc293" +export RUNTIME_DIR=${WORKDIR}/runtime-ethereum -# Helpful tips on writing build scripts: -# https://buildkite.com/docs/pipelines/writing-build-scripts set -euxo pipefail # Setup tests. @@ -42,6 +39,8 @@ set -euxo pipefail .buildkite/scripts/download_ekiden_test_scripts.sh rm -rf tests/e2e-tests + + # Now begin. source .buildkite/scripts/common.sh source .e2e/ekiden_common_e2e.sh @@ -52,14 +51,14 @@ source .buildkite/rust/common.sh nvm_script="${NVM_DIR:-${HOME}/.nvm}/nvm.sh" [ -s "${nvm_script}" ] && source "${nvm_script}" -################### +# # Test definitions. -################### +# run_backend_tendermint_committee_custom() { run_backend_tendermint_committee \ epochtime_backend=tendermint_mock \ replica_group_size=3 \ - runtime_genesis=${WORKDIR}/resources/genesis/ekiden_genesis_testing.json + runtime_genesis=${RUNTIME_DIR}/resources/genesis/ekiden_genesis_testing.json } run_no_client() { @@ -90,23 +89,20 @@ scenario_basic() { sleep 3 } - -################################# +# # Tests from e2e-tests repository -################################# +# install_e2e_tests() { local e2e_tests_branch=${E2E_TESTS_BRANCH:-master} + mkdir -p ${WORKDIR}/tests + echo "Installing E2E tests from e2e-tests repository." pushd ${WORKDIR}/tests if [ ! -d e2e-tests ]; then git clone https://github.com/oasislabs/e2e-tests.git -b ${e2e_tests_branch} --depth 1 pushd e2e-tests npm install > /dev/null - # Needed to install and build oasis-client within e2e-tests. - npm install -g lerna - npm install -g yarn - ./scripts/oasis-client.sh # If the Buildkite access token is available, download pre-compiled contracts # from the e2e-tests pipeline. if [ "${BUILDKITE:-}" == "true" ]; then @@ -165,13 +161,13 @@ scenario_e2e_tests() { popd } -############# +# # Test suite. # # Arguments: # backend_name - name of the backend to use in test name # backend_runner - function that will prepare and run the backend services -############# +# test_suite() { local backend_name=$1 local backend_runner=$2 @@ -195,7 +191,6 @@ test_suite() { client_runner=run_no_client } -########################################## + # Multiple validators tendermint backends. -########################################## test_suite tm-committee run_backend_tendermint_committee_custom diff --git a/package-lock.json b/package-lock.json index 8ee402a..d8dfc27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,207 @@ "regenerator-runtime": "^0.13.2" } }, + "@oasislabs/client": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@oasislabs/client/-/client-1.0.0-rc.17.tgz", + "integrity": "sha512-bT8SEr5oHIf/Xwj3s8c6CgH0INZwHpCRr5zI0BYsQ7Fb0bEyhXOdF+iTTWSnh5WL5FUaLhs6k9hiivBDD47RkQ==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/ethereum": "^1.0.0-rc.13", + "@oasislabs/gateway": "^1.0.0-rc.14", + "@oasislabs/service": "^1.0.0-rc.11", + "find": "^0.3.0", + "js-sha3": "^0.8.0", + "toml": "^3.0.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "bundled": true, + "dev": true + }, + "toml": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "@oasislabs/common": { + "version": "1.0.0-rc.7", + "resolved": "https://registry.npmjs.org/@oasislabs/common/-/common-1.0.0-rc.7.tgz", + "integrity": "sha512-eK343ibeDr2h/UhOoFgVbUK4hys//+jbB6nGyKpomQ6SPYcEQLBSkNPztAlXblAMPFdjTsJlZnh2oc/70IBLZw==", + "dev": true, + "requires": { + "@oasislabs/types": "^1.0.0-rc.2", + "cbor-js": "^0.1.0" + } + }, + "@oasislabs/confidential": { + "version": "1.0.0-rc.7", + "resolved": "https://registry.npmjs.org/@oasislabs/confidential/-/confidential-1.0.0-rc.7.tgz", + "integrity": "sha512-m3UURqkchsFqFxCUAj/UdzPWA7XD2dAPupQpyZbV4FvuPBUJZDKNEE3eGlqxBmWT2yKJguYO70SmufphrYvcMw==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/types": "^1.0.0-rc.2", + "deoxysii": "^0.0.2", + "node-localstorage": "^1.3.1", + "tweetnacl": "^1.0.1" + } + }, + "@oasislabs/ethereum": { + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@oasislabs/ethereum/-/ethereum-1.0.0-rc.13.tgz", + "integrity": "sha512-IKcmLmJ8kWUyEC/1XKTJpQjFXPgysTvYhlf0ojerXqXe5lzoVezM+VW8hDW7Yts/JB7OC4xPSsDHcuN+chqeDg==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/service": "^1.0.0-rc.11", + "@oasislabs/test": "^1.0.0-rc.11", + "axios": "^0.18.0", + "ethers": "^4.0.27", + "eventemitter3": "^3.1.2", + "js-sha3": "^0.8.0", + "node-localstorage": "^1.3.1", + "ws": "^7.1.0" + }, + "dependencies": { + "aes-js": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "elliptic": { + "version": "6.3.3", + "bundled": true, + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.36", + "bundled": true, + "dev": true, + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "bundled": true, + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.8.0", + "bundled": true, + "dev": true + }, + "scrypt-js": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "ws": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "async-limiter": "^1.0.0" + } + } + } + }, + "@oasislabs/gateway": { + "version": "1.0.0-rc.14", + "resolved": "https://registry.npmjs.org/@oasislabs/gateway/-/gateway-1.0.0-rc.14.tgz", + "integrity": "sha512-QBYEnZXmHcqwPn7+5nQULisylLNahIl221GgPEOHjX873GMCnOE9O0ad0INKqzJwNh/Exm5rSuOQv1wqsNXhQg==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/service": "^1.0.0-rc.11", + "@oasislabs/types": "^1.0.0-rc.2", + "axios": "^0.18.0" + } + }, + "@oasislabs/service": { + "version": "1.0.0-rc.11", + "resolved": "https://registry.npmjs.org/@oasislabs/service/-/service-1.0.0-rc.11.tgz", + "integrity": "sha512-0oQ912XgPBlqkF7zI6fGyQ07VAp1htDtH9EF6n9WI6A/rz6YkhAskqLv87wTnNXuwRH5YrvjsPXC09tQEmLyJQ==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/confidential": "^1.0.0-rc.7", + "@oasislabs/types": "^1.0.0-rc.2", + "camelcase": "^5.3.1", + "eventemitter3": "^3.1.2", + "js-sha3": "^0.8.0", + "pako": "^1.0.10" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "bundled": true, + "dev": true + }, + "js-sha3": { + "version": "0.8.0", + "bundled": true, + "dev": true + } + } + }, + "@oasislabs/test": { + "version": "1.0.0-rc.11", + "resolved": "https://registry.npmjs.org/@oasislabs/test/-/test-1.0.0-rc.11.tgz", + "integrity": "sha512-XThA/aQT6x5NMchERm0JMrGNuDCHbNAQCK5QHmv+qmqb+IOR3cpW3G4/y9GSzOl0595UI8XHYlqCLN2WXqKAoA==", + "dev": true, + "requires": { + "@oasislabs/common": "^1.0.0-rc.7", + "@oasislabs/service": "^1.0.0-rc.11" + } + }, + "@oasislabs/types": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@oasislabs/types/-/types-1.0.0-rc.2.tgz", + "integrity": "sha512-q/xxPyMcDCXxu8QFkja7g++IkzE5B/Yin6R5qumA5yJbuGz9amjm7Hcwd3nwU51fI8h4vH6zaNWcTUsXt1ak7A==", + "dev": true + }, "@types/node": { "version": "10.14.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.8.tgz", @@ -398,6 +599,24 @@ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, + "axios": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "dev": true + } + } + }, "bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", @@ -762,6 +981,15 @@ "create-hash": "^1.1.0" } }, + "bsaes": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/bsaes/-/bsaes-0.0.2.tgz", + "integrity": "sha512-iVxJFMOvCUG85sX2UVpZ9IgvH6Jjc5xpd/W8pALvFE7zfCqHkV7hW3M2XZtpg9biPS0K4Eka96bbNNgLohcpgQ==", + "dev": true, + "requires": { + "uint32": "^0.2.1" + } + }, "buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", @@ -865,6 +1093,12 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "cbor-js": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cbor-js/-/cbor-js-0.1.0.tgz", + "integrity": "sha1-yAzmEg84fo+qdDcN/aIdlluPx/k=", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -1550,6 +1784,16 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "deoxysii": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/deoxysii/-/deoxysii-0.0.2.tgz", + "integrity": "sha512-mMob/2wDZBatPC48g188hFt5xxrbfYMl9L+XQGOZuHPU4ScCHpAKkbZiAU1yg/kROj6nPKZp5eItuNI3LdU7vA==", + "dev": true, + "requires": { + "bsaes": "0.0.2", + "uint32": "^0.2.1" + } + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -2282,6 +2526,12 @@ "strip-hex-prefix": "1.0.0" } }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -2645,6 +2895,15 @@ } } }, + "find": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", + "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", + "dev": true, + "requires": { + "traverse-chain": "~0.1.0" + } + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -2712,6 +2971,32 @@ "readable-stream": "^2.3.6" } }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -4879,6 +5164,28 @@ "minimatch": "^3.0.2" } }, + "node-localstorage": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-1.3.1.tgz", + "integrity": "sha512-NMWCSWWc6JbHT5PyWlNT2i8r7PgGYXVntmKawY83k/M0UJScZ5jirb61TLnqKwd815DfBQu+lR3sRw08SPzIaQ==", + "dev": true, + "requires": { + "write-file-atomic": "^1.1.4" + }, + "dependencies": { + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5285,6 +5592,12 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7169,6 +7482,12 @@ } } }, + "traverse-chain": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", + "integrity": "sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE=", + "dev": true + }, "truffle": { "version": "5.0.28", "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.0.28.tgz", @@ -7574,6 +7893,12 @@ "is-typedarray": "^1.0.0" } }, + "uint32": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/uint32/-/uint32-0.2.1.tgz", + "integrity": "sha1-5hjYAtf//Si3CPzOzHMVYIusR/I=", + "dev": true + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", diff --git a/package.json b/package.json index 30b2025..8d3defe 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "truffle": "^5.0.28", "truffle-hdwallet-provider": "^1.0.14", "tweetnacl": "^1.0.1", - "web3": "1.0.0-beta.36" + "web3": "1.0.0-beta.36", + "@oasislabs/client": "^1.0.0-rc.17" } }