Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/about-below
Browse files Browse the repository at this point in the history
* master: (35 commits)
  [Wallet] Network fee in transaction feed (#1145)
  New About Page Cover (#905)
  Upgrade to Node 10 (#1148)
  [faucet] Add custom metrics (#1143)
  Add IdentityMetadata to Contractkit (#1126)
  [Wallet] Local currency v1.1 (#1137)
  Add attestation-service deploy (#1128)
  [Wallet] A few docs and build cleanup (#1138)
  [CircleCI]Add comment on how to fix lint checks (#1134)
  2019-09-30 integration deployment (#1149)
  Update web3 provider to new integration url (#1151)
  [celotool]Add fast mode to celotool invite (#1135)
  Revert "Feature/909 proxy delegatecall" (#1146)
  Use contractkit in notification service (#1118)
  Feature/909 proxy delegatecall (#1003)
  integration deployment for 2019-09-29 (#1139)
  Add instructions for npm publication to tag commit (#1117)
  Client Logs Data Flow script update (#1055)
  Deploying latest proxy code in genesis (#1122)
  Enable floating promises check everywhere (fix issues) (#1115)
  ...

# Conflicts:
#	packages/web/src/about/About.tsx
#	packages/web/src/about/images/index.ts
#	packages/web/static/locales/en/about.json
  • Loading branch information
aaronmgdr committed Oct 1, 2019
2 parents 3c38f44 + 4416f95 commit 02ec0c1
Show file tree
Hide file tree
Showing 343 changed files with 9,454 additions and 3,034 deletions.
25 changes: 12 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
defaults: &defaults
working_directory: ~/app
docker:
- image: celohq/node8:gcloud-deps
- image: celohq/node10-gcloud
environment:
# To avoid ENOMEM problem when running node
NODE_OPTIONS: "--max-old-space-size=4096"
Expand All @@ -16,19 +16,18 @@ android-defaults: &android-defaults
docker:
- image: circleci/android:api-28-node8-alpha
environment:
_JAVA_OPTIONS: '-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap'
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"'

general:
artifacts:
- 'mobile/coverage'
- 'protocol/coverage'
- "mobile/coverage"
- "protocol/coverage"

jobs:
install_dependencies:
<<: *defaults
steps:

- restore_cache:
keys:
- source-v1-{{ .Branch }}-{{ .Revision }}
Expand Down Expand Up @@ -89,28 +88,29 @@ jobs:
paths:
- node_modules
- packages/*/node_modules

- run:
name: Build packages
command: |
# separate build to avoid ENOMEN in CI :(
# separate build to avoid ENOMEM in CI :(
yarn build --scope @celo/utils
yarn build --scope @celo/protocol
yarn build --scope docs
yarn build --scope @celo/walletkit
yarn build --ignore @celo/protocol --ignore docs --ignore @celo/walletkit
- persist_to_workspace:
root: .
paths:
paths:
- .

lint-checks:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
# If this fails, fix it with
# `./node_modules/.bin/prettier --config .prettierrc.js --write '**/*.+(ts|tsx|js|jsx)'`
- run: yarn run prettify:diff
- run: yarn run lint

Expand Down Expand Up @@ -236,15 +236,14 @@ jobs:
steps:
- attach_workspace:
at: ~/app
- run:
- 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 @@ -494,7 +493,7 @@ jobs:
command: npm install @celo/celocli
- run:
name: Minor test of celocli
command: ./node_modules/.bin/celocli account:new # Small test
command: ./node_modules/.bin/celocli account:new # Small test

workflows:
version: 2
Expand All @@ -515,7 +514,7 @@ workflows:
- install_dependencies
- contractkit-test:
requires:
- install_dependencies
- install_dependencies
- mobile-test:
requires:
- lint-checks
Expand Down
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ 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"

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5035b241cbcfbd4f261e3d77e1fca8f6dc8edc32"

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

Expand All @@ -41,18 +44,20 @@ NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=1
EPOCH=1000
ISTANBUL_REQUEST_TIMEOUT_MS=3000

# "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
IN_MEMORY_DISCOVERY_TABLE=false

GETHTX1_NODE_ID="1182aa8c9dbb96cd1aa71b74e2b6b481085971e08b210bab3b64c39d54876d4b1370f3f2c3cc3c0f52806a0e5772aa3fe937b4ceda8b97c5bf647a34170555e4"
GETHTX2_NODE_ID="b1d8deee4e5f4faf9b7e8e7fbd5e19545632d9023ff10de55e2e7a37464c52d1d6fb3ac8cb011757558b37309b83d915de19ef86eb27fe13209cc02d0098ee1f"
GETHTX3_NODE_ID="7f8b950b57ef0189637375e1aab3c6cc089501063089242ccdfb3982045025feeb64fdf343b08f2534372f5d636fa6804150c14e40bc2d395057a834c6be3932"
GETHTX4_NODE_ID="bdfd59ddf34656cf8e0076367517281b68816b2a241f154f58c6178ce9d59e3031d294f406dd7799b9f3b5425e5ab592700a81f8a59918a5e209a8826204f40f"

ADMIN_RPC_ENABLED=false

# Testnet vars
# empty string is false for helm
Expand Down
4 changes: 4 additions & 0 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ CELOTOOL_DOCKER_IMAGE_TAG="celotool-552b1accf90404fdcd886670d150af0a5cae116f"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-552b1accf90404fdcd886670d150af0a5cae116f"

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5035b241cbcfbd4f261e3d77e1fca8f6dc8edc32"

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

Expand All @@ -41,6 +44,7 @@ NETWORK_ID=44782
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
EPOCH=720 // 1 hour
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
Expand Down
16 changes: 10 additions & 6 deletions .env.alfajoresstaging
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,28 @@ BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd
BLOCKSCOUT_WEB_REPLICAS=3
# Increment this value everytime you redeploy blockscout. Or else the deployment will fail due to the
# existing database.
BLOCKSCOUT_DB_SUFFIX="10"
BLOCKSCOUT_DB_SUFFIX="12"
BLOCKSCOUT_SUBNETWORK_NAME="Alfajores 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="f7095b78003062db9536e1d070772d20a3f81e93"
GETH_NODE_DOCKER_IMAGE_TAG="ae27fd3aa8b0de7bbf7926aecd34690feef7d069"

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="ae27fd3aa8b0de7bbf7926aecd34690feef7d069"

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

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

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5035b241cbcfbd4f261e3d77e1fca8f6dc8edc32"

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

Expand All @@ -46,16 +49,17 @@ CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
# Minimum epoch length is 1 day
EPOCH=17280
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
VALIDATORS=70
VALIDATORS=10
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
IN_MEMORY_DISCOVERY_TABLE=false
PING_IP_FROM_PACKET=true

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
Expand Down
13 changes: 8 additions & 5 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +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="19"
BLOCKSCOUT_DB_SUFFIX="24"
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="7fbd6f3574f1c1c1e657c152fc63fb771adab3af"
GETH_NODE_DOCKER_IMAGE_TAG="640a41fd970e0edbf5f30a90d53660165f5e98bd"

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="7fbd6f3574f1c1c1e657c152fc63fb771adab3af"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="640a41fd970e0edbf5f30a90d53660165f5e98bd"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
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"

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5035b241cbcfbd4f261e3d77e1fca8f6dc8edc32"

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

Expand All @@ -41,6 +44,7 @@ NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=3
EPOCH=1000
ISTANBUL_REQUEST_TIMEOUT_MS=3000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
Expand All @@ -49,8 +53,7 @@ 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
IN_MEMORY_DISCOVERY_TABLE=false

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
Expand Down
1 change: 1 addition & 0 deletions .env.pilot
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
EPOCH=17280 // Minimum epoch length is 1 day
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
Expand Down
1 change: 1 addition & 0 deletions .env.pilotstaging
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
EPOCH=17280 // Minimum epoch length is 1 day
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/packages/cli/ @mcortesi @asaj
/packages/helm-charts/ @nambrot @timmoreton
/packages/mobile/ @cmcewen @jmrossy
/packages/notification-service/ @jmrossy @cmcewen
/packages/notification-service/ @annakaz @cmcewen
/packages/protocol/ @asaj @m-chrzan
/packages/react-components/ @cmcewen @jmrossy
/packages/walletkit/ @ashishb @yerdua
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
10.16.3
6 changes: 6 additions & 0 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ Let's say the published package version number 0.0.15, verify that it is install
/tmp/tmp1 $ npm install @celo/cli@0.0.20
```

Add a tag with the most recent git commit of the published branch. Note that this commit comes before package.json is updated with the new package version.

```
$ npm dist-tag add <package-name>@<version> [<tag>]
```

Once you publish do some manual tests, for example, after publishing `celocli`

```
Expand Down
4 changes: 2 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Install `nvm` (allows you to manage multiple versions of Node), Node 8 and `yarn
brew install nvm
# follow the instructions from the command above to edit your .bash_profile
# then restart the terminal
nvm install 8
nvm alias default 8
nvm install 10
nvm alias default 10
brew install yarn
```

Expand Down
9 changes: 9 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ steps:
]
waitFor: ['-']

- id: "docker:attestation-service"
name: gcr.io/kaniko-project/executor:latest
args: [
"--dockerfile=dockerfiles/attestation-service/Dockerfile",
"--cache=true",
"--destination=gcr.io/$PROJECT_ID/celo-monorepo:attestation-service-$COMMIT_SHA"
]
waitFor: ['-']

timeout: 3000s
28 changes: 28 additions & 0 deletions dockerfiles/attestation-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:8
WORKDIR /celo-monorepo

# ensure yarn.lock is evaluated by kaniko cache diff
COPY lerna.json package.json yarn.lock ./
COPY scripts/ scripts/

# Copy only pkg.json
COPY packages/typescript/package.json packages/typescript/
COPY packages/utils/package.json packages/utils/
COPY packages/protocol/package.json packages/protocol/
COPY packages/contractkit/package.json packages/contractkit/
COPY packages/attestation-service/package.json packages/attestation-service/

RUN yarn install --frozen-lockfile --network-timeout 100000 && yarn cache clean

# Copy the rest
COPY packages/typescript packages/typescript/
COPY packages/utils packages/utils/
COPY packages/protocol packages/protocol/
COPY packages/contractkit packages/contractkit/
COPY packages/attestation-service packages/attestation-service/

# build all
RUN yarn build

WORKDIR /celo-monorepo/packages/attestation-service
CMD ["node lib/index.js"]
4 changes: 4 additions & 0 deletions dockerfiles/celotool/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ COPY scripts/ scripts/
COPY packages/utils/package.json packages/utils/
COPY packages/typescript/package.json packages/typescript/
COPY packages/walletkit/package.json packages/walletkit/
COPY packages/contractkit/package.json packages/contractkit/
COPY packages/protocol/package.json packages/protocol/
COPY packages/verification-pool-api/package.json packages/verification-pool-api/
COPY packages/celotool/package.json packages/celotool/

Expand All @@ -26,6 +28,8 @@ RUN yarn install --frozen-lockfile && yarn cache clean
COPY packages/utils packages/utils/
COPY packages/typescript packages/typescript/
COPY packages/walletkit packages/walletkit/
COPY packages/contractkit packages/contractkit/
COPY packages/protocol packages/protocol/
COPY packages/verification-pool-api packages/verification-pool-api/
COPY packages/celotool packages/celotool/

Expand Down
16 changes: 8 additions & 8 deletions dockerfiles/circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM circleci/node:8
FROM circleci/node:10
MAINTAINER Connor McEwen <c@celo.org>

RUN sudo apt-get update -y
RUN sudo apt-get install lsb-release libudev-dev libusb-dev -y

# Install Kubernetes, as per https://kubernetes.io/docs/tasks/tools/install-kubectl/
RUN sudo apt-get install -y apt-transport-https && \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list && \
sudo apt-get update && \
sudo apt-get install -y kubectl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list && \
sudo apt-get update && \
sudo apt-get install -y kubectl

RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
sudo apt-get update -y && sudo apt-get install google-cloud-sdk -y
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
sudo apt-get update -y && sudo apt-get install google-cloud-sdk -y

CMD ["/bin/sh"]
Loading

0 comments on commit 02ec0c1

Please sign in to comment.