Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/web-phone
Browse files Browse the repository at this point in the history
* master: (132 commits)
  [Wallet] Differentiate dollars and gold transactions (#1021)
  [wip] LinkedList cycle fix (#941)
  Fix slither issues (#572)
  [Wallet] Disable import wallet button when the backup phrase is not valid (#1012)
  Fix fixed fraction division underflow (#952)
  [CircleCI]Run protocol coverage once a day (#1018)
  Expose and test validator set precompiles (#874)
  [celotool] Fund Faucet accounts on network init (#990)
  Add Nexmo as a text provider for MX and US numbers (#1002)
  [CircleCI]Run protocol test with and without coverage (#991)
  Increase memory requests for Alfajores nodes (#966)
  [wallet]Select blockchain url based on testnet (#936)
  Pilot app config and ability to not show testnet banner (#1009)
  Add Linux onboarding steps and a TOC to SETUP.md (#1004)
  Add README-dev.md (#989)
  [Wallet] Exchange flow formatting fixes (#961)
  [celotool] Cleanup genesis block generation (#988)
  [celotool] Some ❤️. Clean up (#948)
  CeloCLI sorted list of Validator Groups should not include groups with zero votes (#907)
  [contractkit] Fix tests (#963)
  ...
  • Loading branch information
aaronmgdr committed Sep 17, 2019
2 parents 75bb542 + e79c0e0 commit 5e0bfb2
Show file tree
Hide file tree
Showing 882 changed files with 64,256 additions and 18,287 deletions.
79 changes: 74 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
at: ~/app

- restore_cache:
keys:
keys:
- yarn-v2-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-v2-{{ arch }}-{{ .Branch }}-
- yarn-v2-{{ arch }}-
Expand Down Expand Up @@ -94,6 +94,7 @@ jobs:
name: Build packages
command: |
# separate build to avoid ENOMEN in CI :(
yarn build --scope @celo/utils
yarn build --scope @celo/protocol
yarn build --scope docs
yarn build --scope @celo/walletkit
Expand Down Expand Up @@ -123,7 +124,7 @@ jobs:
name: jest tests
command: |
mkdir -p test-results/jest
yarn run lerna --ignore @celo/mobile --ignore @celo/protocol --ignore @celo/celotool --ignore @celo/walletkit --ignore @celo/celocli run test
yarn run lerna --ignore @celo/contractkit --ignore @celo/mobile --ignore @celo/protocol --ignore @celo/celotool --ignore @celo/walletkit --ignore @celo/celocli run test
mobile-test-build-app:
working_directory: ~/app
Expand Down Expand Up @@ -208,6 +209,42 @@ jobs:
# Flaky tests - run them twice
command: yarn --cwd packages/protocol test || yarn --cwd packages/protocol test

# Slow and flaky compared to protocol-test which runs without coverage
protocol-test-with-code-coverage:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
FILES_TO_CHECK="${PWD}/packages/protocol,${PWD}/packages/utils,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: test
# Flaky tests - run them twice
command: yarn --cwd packages/protocol test:coverage || yarn --cwd packages/protocol test:coverage
- store_artifacts:
path: packages/protocol/coverage
destination: protocol/coverage
- run:
name: Upload to CodeCov
command: yarn codecov -F protocol

contractkit-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Generate DevChain
command: |
(cd packages/contractkit && yarn test:prepare)
- run:
name: Run Tests
command: yarn --cwd=packages/contractkit test


walletkit-test:
<<: *defaults
steps:
Expand Down Expand Up @@ -247,7 +284,11 @@ jobs:
git --no-pager diff packages/docs/command-line-interface
echo "There are git differences after generating CLI docs"
exit 1
fi
fi
- run:
name: Verify that a new account can be created
command: |
yarn --cwd=packages/cli run celocli account:new
end-to-end-geth-transfer-test:
<<: *defaults
Expand Down Expand Up @@ -438,7 +479,10 @@ jobs:
steps:
- run:
name: Installing npm package - @celo/walletkit
command: yarn add @celo/walletkit
command: |
# Try one more time in case the first attempt fails
# to deal with scenarios like https://circleci.com/gh/celo-org/celo-monorepo/23329
yarn add @celo/walletkit || yarn add @celo/walletkit
test-celocli-npm-package-install:
working_directory: ~/app
Expand Down Expand Up @@ -469,6 +513,9 @@ workflows:
- cli-test:
requires:
- install_dependencies
- contractkit-test:
requires:
- install_dependencies
- mobile-test:
requires:
- lint-checks
Expand Down Expand Up @@ -498,7 +545,7 @@ workflows:
requires:
- lint-checks
- walletkit-test
nightly:
npm-install-testing-cron-workflow:
triggers:
- schedule:
# 7 PM in UTC = noon in PDT.
Expand All @@ -513,3 +560,25 @@ workflows:
- test-utils-npm-package-install
- test-walletkit-npm-package-install
- test-celocli-npm-package-install
protocol-testing-with-code-coverage-cron-workflow:
triggers:
- schedule:
# 1 PM in UTC = 6 AM in PDT.
# Best for this slow test (~3 hours) to run during SF early morning.
cron: "0 13 * * *"
filters:
branches:
only:
- master
jobs:
- install_dependencies
- lint-checks:
requires:
- install_dependencies
- walletkit-test:
requires:
- install_dependencies
- protocol-test-with-code-coverage:
requires:
- lint-checks
- walletkit-test
16 changes: 8 additions & 8 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ coverage:
flags: mobile
threshold: 40%
target: 10%
# protocol:
# paths: "packages/protocol/"
# flags: protocol
# threshold: 5%
# target: 90%
protocol:
paths: "packages/protocol/"
flags: protocol
threshold: 5%
target: 90%
patch:
default: off

flags:
mobile:
paths:
- packages/mobile/
# protocol:
# paths:
# - packages/protocol/
protocol:
paths:
- packages/protocol/
8 changes: 6 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ENV_TYPE="development"

GETH_VERBOSITY=1

VM_BASED=false

KUBERNETES_CLUSTER_NAME="celo-networks-dev"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-networks-dev"
Expand All @@ -15,7 +17,7 @@ BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX=

GETH_NODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth"
GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
GETH_NODE_DOCKER_IMAGE_TAG="f7095b78003062db9536e1d070772d20a3f81e93"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
Expand All @@ -33,7 +35,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=1
EPOCH=30000
# "og" -> our original 4 validators, "${n}" -> for deriving n validators from the MNEMONIC
Expand Down Expand Up @@ -92,6 +93,9 @@ CHAOS_TEST_KILL_INTERVAL = 3m
# be customized in their respective .env.$CELO_ENV files
#
# STACKDRIVER_MONITORING_DASHBOARD=""
# STACKDRIVER_NOTIFICATION_CHANNEL_APPLICATIONS=""
# STACKDRIVER_NOTIFICATION_CHANNEL_PROTOCOL=""
# STACKDRIVER_NOTIFICATION_APPLICATIONS_PREFIX=""
# MOBILE_WALLET_PLAYSTORE_LINK=""

# This is the SMS retriever hash code as reported by the signature helper when running the
Expand Down
10 changes: 7 additions & 3 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ENV_TYPE="production"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="alfajores"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down Expand Up @@ -37,7 +39,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"
# Genesis Vars
NETWORK_ID=44782
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=5
EPOCH=720 // 1 hour

Expand All @@ -56,13 +57,16 @@ CLUSTER_CREATION_FLAGS="--enable-autoscaling --min-nodes 3 --max-nodes 8 --machi


GETH_NODE_CPU_REQUEST=400m
GETH_NODE_MEMORY_REQUEST=2.5G
GETH_NODE_MEMORY_REQUEST=4.5G

VERIFICATION_POOL_URL="https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestalfajores/v0.1/sms/"
VERIFICATION_REWARDS_URL="https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestalfajores/v0.1/rewards/"

STACKDRIVER_MONITORING_DASHBOARD="https://app.google.stackdriver.com/dashboards/16317981290437876460?project=celo-testnet-production"
STACKDRIVER_NOTIFICATION_CHANNEL="11334674278687022983"
STACKDRIVER_NOTIFICATION_CHANNEL_APPLICATIONS="1083771334675648656"
STACKDRIVER_NOTIFICATION_CHANNEL_PROTOCOL="2682373089687648093"
STACKDRIVER_NOTIFICATION_APPLICATIONS_PREFIX="notification-service-,blockchain-api-,faucet-"

MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/4700990475000634666"

NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/project/celo-org-mobile/database/celo-org-mobile-int/data"
Expand Down
8 changes: 6 additions & 2 deletions .env.alfajoresstaging
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ENV_TYPE="staging"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="alfajoresstaging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down Expand Up @@ -41,7 +43,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"
# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=5
# Minimum epoch length is 1 day
EPOCH=17280
Expand All @@ -67,7 +68,10 @@ VERIFICATION_POOL_URL="https://us-central1-celo-testnet.cloudfunctions.net/handl
VERIFICATION_REWARDS_URL="https://us-central1-celo-testnet.cloudfunctions.net/handleVerificationRequestalfajoresstaging/v0.1/rewards/"

STACKDRIVER_MONITORING_DASHBOARD="https://app.google.stackdriver.com/dashboards/17701013576385040071?project=celo-testnet"
STACKDRIVER_NOTIFICATION_CHANNEL="12047595356119796119"
STACKDRIVER_NOTIFICATION_CHANNEL_APPLICATIONS="12047595356119796119"
STACKDRIVER_NOTIFICATION_CHANNEL_PROTOCOL="12047595356119796119"
STACKDRIVER_NOTIFICATION_APPLICATIONS_PREFIX="notification-service-,blockchain-api-,faucet-"

MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/4700990475000634666"

NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/project/celo-org-mobile/database/celo-org-mobile-int/data"
Expand Down
18 changes: 11 additions & 7 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ENV_TYPE="integration"

GETH_VERBOSITY=3

VM_BASED=false

KUBERNETES_CLUSTER_NAME="integration"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand All @@ -12,32 +14,31 @@ BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="18"
BLOCKSCOUT_DB_SUFFIX="19"
BLOCKSCOUT_SUBNETWORK_NAME="Integration"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_NODE_DOCKER_IMAGE_TAG="f7095b78003062db9536e1d070772d20a3f81e93"
GETH_NODE_DOCKER_IMAGE_TAG="7a12221e9c7ca5a9f6a7904b0325d4ee275041bc"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_BOOTNODE_DOCKER_IMAGE_TAG="f7095b78003062db9536e1d070772d20a3f81e93"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="7a12221e9c7ca5a9f6a7904b0325d4ee275041bc"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-552b1accf90404fdcd886670d150af0a5cae116f"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-dfdc3e8b26e98aa294b27e2b5621c184488a10db"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-552b1accf90404fdcd886670d150af0a5cae116f"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-d3d165a7db548d175cd703c86c20c1657c04368d"

GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-exporter"
GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"

# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=3
EPOCH=1000

Expand All @@ -62,7 +63,10 @@ VERIFICATION_POOL_URL="https://us-central1-celo-testnet.cloudfunctions.net/handl
VERIFICATION_REWARDS_URL="https://us-central1-celo-testnet.cloudfunctions.net/handleVerificationRequestintegration/v0.1/rewards/"

STACKDRIVER_MONITORING_DASHBOARD="https://app.google.stackdriver.com/dashboards/17701013576385040071?project=celo-testnet"
STACKDRIVER_NOTIFICATION_CHANNEL="12047595356119796119"
STACKDRIVER_NOTIFICATION_CHANNEL_APPLICATIONS="12047595356119796119"
STACKDRIVER_NOTIFICATION_CHANNEL_PROTOCOL="12047595356119796119"
STACKDRIVER_NOTIFICATION_APPLICATIONS_PREFIX="notification-service-,blockchain-api-,faucet-"

MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/4700990475000634666"

NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/project/celo-org-mobile/database/celo-org-mobile-int/data"
Expand Down
3 changes: 2 additions & 1 deletion .env.integrationtesting
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ENV_TYPE="integrationtesting"

GETH_VERBOSITY=4

VM_BASED=false

KUBERNETES_CLUSTER_NAME="integration"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down Expand Up @@ -30,7 +32,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=5

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
Expand Down
16 changes: 10 additions & 6 deletions .env.pilot
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ENV_TYPE="production"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="pilot"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand All @@ -18,15 +20,15 @@ BLOCKSCOUT_SUBNETWORK_NAME="Pilot"
GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_NODE_DOCKER_IMAGE_TAG="58a4453c22504e3367a4d95177320acda4c5b061"
GETH_NODE_DOCKER_IMAGE_TAG="f68c6301cad91196867f06c701e6b4aa30838939"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_BOOTNODE_DOCKER_IMAGE_TAG="58a4453c22504e3367a4d95177320acda4c5b061"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="f68c6301cad91196867f06c701e6b4aa30838939"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-2616309a839a30e53faecfafb9b68ab51a5fcdcf"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-2a96d35273ba2f8db80ba529a05c614171c24491"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-2616309a839a30e53faecfafb9b68ab51a5fcdcf"
Expand All @@ -37,7 +39,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=5
EPOCH=17280 // Minimum epoch length is 1 day

Expand All @@ -62,7 +63,10 @@ VERIFICATION_POOL_URL="https://us-central1-celo-testnet-production.cloudfunction
VERIFICATION_REWARDS_URL="https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestpilot/v0.1/rewards/"

STACKDRIVER_MONITORING_DASHBOARD="https://app.google.stackdriver.com/dashboards/18188447122939770939?project=celo-testnet-production"
STACKDRIVER_NOTIFICATION_CHANNEL="11334674278687022983"
STACKDRIVER_NOTIFICATION_CHANNEL_APPLICATIONS="1083771334675648656"
STACKDRIVER_NOTIFICATION_CHANNEL_PROTOCOL="2682373089687648093"
STACKDRIVER_NOTIFICATION_APPLICATIONS_PREFIX="notification-service-,blockchain-api-,faucet-"

MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/4700990475000634666"

NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/project/celo-org-mobile/database/celo-org-mobile-int/data"
Expand All @@ -72,4 +76,4 @@ PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=l5k6LvdPDXS
SMS_RETRIEVER_HASH_CODE=1SlgTw9pFW5
Loading

0 comments on commit 5e0bfb2

Please sign in to comment.