Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/about3
Browse files Browse the repository at this point in the history
* master: (72 commits)
  Remove unused Reserve.burnToken function (#984)
  Persistent disks for transaction nodes (#1016)
  [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)
  ...

# Conflicts:
#	packages/web/src/header/Header.3.tsx
  • Loading branch information
aaronmgdr committed Sep 18, 2019
2 parents 69aca8f + 0101b22 commit 18bbc13
Show file tree
Hide file tree
Showing 614 changed files with 13,408 additions and 9,264 deletions.
61 changes: 57 additions & 4 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 @@ -207,6 +208,29 @@ jobs:
name: test
# 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:
Expand Down Expand Up @@ -260,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 @@ -451,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 @@ -514,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 @@ -529,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/
5 changes: 4 additions & 1 deletion .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 Down Expand Up @@ -33,12 +35,13 @@ 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
VALIDATORS="3"
STATIC_IPS_FOR_GETH_NODES=false
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

GETHTX1_NODE_ID="1182aa8c9dbb96cd1aa71b74e2b6b481085971e08b210bab3b64c39d54876d4b1370f3f2c3cc3c0f52806a0e5772aa3fe937b4ceda8b97c5bf647a34170555e4"
GETHTX2_NODE_ID="b1d8deee4e5f4faf9b7e8e7fbd5e19545632d9023ff10de55e2e7a37464c52d1d6fb3ac8cb011757558b37309b83d915de19ef86eb27fe13209cc02d0098ee1f"
Expand Down
7 changes: 5 additions & 2 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 @@ -46,6 +47,8 @@ EPOCH=720 // 1 hour
VALIDATORS=70
TX_NODES=10
STATIC_IPS_FOR_GETH_NODES=true
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

ADMIN_RPC_ENABLED=false

Expand All @@ -56,7 +59,7 @@ 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/"
Expand Down
5 changes: 4 additions & 1 deletion .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 @@ -51,6 +52,8 @@ EPOCH=17280
VALIDATORS=70
TX_NODES=10
STATIC_IPS_FOR_GETH_NODES=true
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

ADMIN_RPC_ENABLED=false

Expand Down
9 changes: 5 additions & 4 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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="f68c6301cad91196867f06c701e6b4aa30838939"
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="f68c6301cad91196867f06c701e6b4aa30838939"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="7a12221e9c7ca5a9f6a7904b0325d4ee275041bc"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-0f47f85d07a177bd9b6e81987bc95e35d5056531"
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-d3d165a7db548d175cd703c86c20c1657c04368d"
Expand All @@ -39,7 +39,6 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=3
EPOCH=1000

Expand All @@ -48,6 +47,8 @@ EPOCH=1000
VALIDATORS=20
TX_NODES=2
STATIC_IPS_FOR_GETH_NODES=false
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

ADMIN_RPC_ENABLED=false

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
13 changes: 8 additions & 5 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 @@ -46,6 +47,8 @@ EPOCH=17280 // Minimum epoch length is 1 day
VALIDATORS=10
TX_NODES=2
STATIC_IPS_FOR_GETH_NODES=false
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

ADMIN_RPC_ENABLED=false

Expand Down Expand Up @@ -75,4 +78,4 @@ PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=l5k6LvdPDXS
SMS_RETRIEVER_HASH_CODE=1SlgTw9pFW5
15 changes: 9 additions & 6 deletions .env.pilotstaging
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ENV_TYPE="staging"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="pilotstaging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand All @@ -12,29 +14,28 @@ 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="3"
BLOCKSCOUT_DB_SUFFIX="5"
BLOCKSCOUT_SUBNETWORK_NAME="Pilot Staging"

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"

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=5
EPOCH=17280 // Minimum epoch length is 1 day

Expand All @@ -43,6 +44,8 @@ EPOCH=17280 // Minimum epoch length is 1 day
VALIDATORS=10
TX_NODES=2
STATIC_IPS_FOR_GETH_NODES=false
# Whether tx_nodes/validators stateful set should use ssd persistent disks
GETH_NODES_SSD_DISKS=true

ADMIN_RPC_ENABLED=false

Expand Down Expand Up @@ -72,4 +75,4 @@ PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=l5k6LvdPDXS
SMS_RETRIEVER_HASH_CODE=1SlgTw9pFW5
Loading

0 comments on commit 18bbc13

Please sign in to comment.