Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/low-home
Browse files Browse the repository at this point in the history
* master: (56 commits)
  Adjust e2e transfer and governance tests to match new fee distribution and eliminate ProposerFraction (#1585)
  [Wallet] Add more local currencies (#1698)
  Switch to correct cluster when fauceting (#1687)
  [Wallet] Use the country of the phone number for determining the default local currency (#1684)
  [Wallet] Limit QR code scanner to 1 code per second (#1676)
  Update Dark backgrounds text color (#1677)
  Remove integration sync test
  Minor attestation service fixes (#1680)
  [wallet] Fixed Native phone picker Use native API instead (#1669)
  Fix token addresses for notification service (#1674)
  Add golang to setup docs
  [wallet] Hide invite education copy after invite was redeemed (#1670)
  [Wallet] Add spinner, timer, and tip text to Verification input screen (#1656)
  [Wallet] Fix app deprecation check mechanism (#1358)
  Point end-to-end governance test back to master (#1665)
  Add EpochRewards smart contract to calculate epoch rewards and payments (#1558)
  Optimized Attestation view calls and removal of the reveal TX (#1578)
  Support claim signatures and support Keybase claims (#1575)
  [Wallet] Add timestamp to top banner messages (#1657)
  Export geth metrics on VM testnet (#1351)
  ...

# Conflicts:
#	yarn.lock
  • Loading branch information
aaronmgdr committed Nov 14, 2019
2 parents e5596a7 + 413739b commit df40d60
Show file tree
Hide file tree
Showing 522 changed files with 16,035 additions and 10,180 deletions.
31 changes: 8 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,12 @@ jobs:
- attach_workspace:
at: ~/app
- run:
name: Test
name: Generate DevChain
command: |
set -euo pipefail
yarn --cwd=packages/cli test
(cd packages/cli && yarn test:reset)
- run:
name: Run Tests
command: yarn --cwd=packages/cli test
- run:
name: Fail if someone forgot to commit CLI docs
command: |
Expand Down Expand Up @@ -524,7 +526,7 @@ jobs:
cd packages/celotool
./ci_test_transfers.sh checkout master
end-to-end-geth-exit-test:
end-to-end-geth-blockchain-parameters-test:
<<: *e2e-defaults
steps:
- attach_workspace:
Expand All @@ -540,7 +542,7 @@ jobs:
command: |
set -e
cd packages/celotool
./ci_test_exit.sh checkout master
./ci_test_blockchain_parameters.sh checkout master
end-to-end-geth-governance-test:
<<: *e2e-defaults
Expand Down Expand Up @@ -581,23 +583,6 @@ jobs:
cd packages/celotool
./ci_test_sync.sh checkout master
end-to-end-geth-integration-sync-test:
<<: *e2e-defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
FILES_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol,${PWD}/.circleci/config.yml"
./scripts/ci_check_if_test_should_run_v2.sh ${FILES_TO_CHECK}
- run:
name: Run test
command: |
set -e
cd packages/celotool
./ci_test_sync_with_network.sh checkout master
end-to-end-geth-attestations-test:
<<: *e2e-defaults
resource_class: medium+
Expand Down Expand Up @@ -746,7 +731,7 @@ workflows:
requires:
- lint-checks
- contractkit-test
- end-to-end-geth-exit-test:
- end-to-end-geth-blockchain-parameters-test:
requires:
- lint-checks
- contractkit-test
Expand Down
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ ETHSTATS_DOCKER_IMAGE_TAG="0ffe524c625ea59e4492dc92c2e638689c36e4b0"
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="ba213df07070433970d9b2cf75bae1d146cbfeda"
GETH_NODE_DOCKER_IMAGE_TAG="7ccc0a81920e6e09663855fc0ed46a98d634e74a"

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="ba213df07070433970d9b2cf75bae1d146cbfeda"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="7ccc0a81920e6e09663855fc0ed46a98d634e74a"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-dfdc3e8b26e98aa294b27e2b5621c184488a10db"
Expand All @@ -36,7 +36,7 @@ TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-m
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"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-74f329b014c40c7af19cf89b4c0d080c344d4a1c"

GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-exporter"
GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
Expand Down
6 changes: 3 additions & 3 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ BLOCKSCOUT_SUBNETWORK_NAME="Alfajores"
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="027dba2e4584936cc5a8e8993e4e27d28d5247b8"
GETH_NODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

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="027dba2e4584936cc5a8e8993e4e27d28d5247b8"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-552b1accf90404fdcd886670d150af0a5cae116f"
Expand All @@ -40,7 +40,7 @@ GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-expor
GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"

# Genesis Vars
NETWORK_ID=44784
NETWORK_ID=44785
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
EPOCH=720 // 1 hour
Expand Down
8 changes: 4 additions & 4 deletions .env.alfajoresstaging
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,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="ae27fd3aa8b0de7bbf7926aecd34690feef7d069"
GETH_NODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

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="ae27fd3aa8b0de7bbf7926aecd34690feef7d069"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-552b1accf90404fdcd886670d150af0a5cae116f"
Expand All @@ -47,8 +47,8 @@ GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
# Minimum epoch length is 1 day
EPOCH=17280
# Minimum epoch length is 10 minutes
EPOCH=120
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
Expand Down
Binary file modified .env.mnemonic.enc
Binary file not shown.
21 changes: 11 additions & 10 deletions .env.pilot
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,30 @@ 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="2"
BLOCKSCOUT_DB_SUFFIX="4"
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="f68c6301cad91196867f06c701e6b4aa30838939"
GETH_NODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

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="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-2a96d35273ba2f8db80ba529a05c614171c24491"
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-2616309a839a30e53faecfafb9b68ab51a5fcdcf"
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="ed7d21bd50592709173368cd697ef73c1774a261"
GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"

# Genesis Vars
NETWORK_ID=1101
Expand All @@ -50,8 +53,8 @@ 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
PING_IP_FROM_PACKET=true

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
Expand All @@ -77,6 +80,4 @@ NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/projec
PROMTOSD_SCRAPE_INTERVAL="5m"
PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=1SlgTw9pFW5
24 changes: 14 additions & 10 deletions .env.pilotstaging
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,36 @@ 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="5"
BLOCKSCOUT_DB_SUFFIX="7"
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="f68c6301cad91196867f06c701e6b4aa30838939"
GETH_NODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

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="9575a01c12438e1adc6bb610c891cb5066aaa7aa"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-2a96d35273ba2f8db80ba529a05c614171c24491"
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="ed7d21bd50592709173368cd697ef73c1774a261"
GETH_EXPORTER_DOCKER_IMAGE_TAG="6df683de7ae30d3fbca384abb14599d0e8130d35"

# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=5
EPOCH=17280 // Minimum epoch length is 1 day
EPOCH=720 // 1 hour
ISTANBUL_REQUEST_TIMEOUT_MS=10000

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
Expand All @@ -47,8 +53,8 @@ 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
PING_IP_FROM_PACKET=true

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
Expand All @@ -74,6 +80,4 @@ NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/projec
PROMTOSD_SCRAPE_INTERVAL="5m"
PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=1SlgTw9pFW5
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ module.exports = {
printWidth: 100,
tabWidth: 2,
bracketSpacing: true,
overrides: [
{
files: '**/*.sol',
options: {
singleQuote: false,
},
},
],
}
33 changes: 30 additions & 3 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
- [Celo Engineering Setup](#celo-engineering-setup)
- [Getting Everything Installed](#getting-everything-installed)
- [MacOS](#macos)
- [XCode](#xcode)
- [Xcode](#xcode)
- [Homebrew](#homebrew)
- [Install Node, Yarn and friends](#install-node-yarn-and-friends)
- [Java](#java)
- [Install Android Dev Tools](#install-android-dev-tools)
- [Install iOS Dev Tools](#install-ios-dev-tools)
- [Linux](#linux)
- [Install Node, Yarn and friends](#install-node-yarn-and-friends-1)
- [Installing OpenJDK 8](#installing-openjdk-8)
- [Install Android Dev Tools](#install-android-dev-tools-1)
- [Some common stuff](#some-common-stuff)
- [Install Go](#install-go)
- [Optional: Install Rust](#optional-install-rust)
- [Optional: Install an Android Emulator](#optional-install-an-android-emulator)
- [Optional: Genymotion](#optional-genymotion)
Expand All @@ -31,9 +33,9 @@ build the celo-monorepo codebase.

### MacOS

#### XCode
#### Xcode

Install XCode and its command line tools:
Install Xcode and its command line tools:

```bash
xcode-select --install
Expand Down Expand Up @@ -110,6 +112,14 @@ Then install the Android 28 platform:
sdkmanager 'platforms;android-28'
```

#### Install iOS Dev Tools

Install [Xcode 10.3](https://download.developer.apple.com/Developer_Tools/Xcode_10.3/Xcode_10.3.xip) (an Apple Developer Account is needed to access this link).

We do not recommend installing Xcode through the App Store as it can auto update and become incompatible with our projects (until we decide to upgrade).

Note that using the method above, you can have multiple versions of Xcode installed in parallel by using different app names. For instance `Xcode10.3.app` and `Xcode11.app` inside the `/Applications` folder.

### Linux

#### Install Node, Yarn and friends
Expand Down Expand Up @@ -167,6 +177,23 @@ You can find the complete instructions about how to install the tools in Linux e

### Some common stuff

#### Install Go

We need Go for [celo-blockchain](https://github.com/celo-org/celo-blockchain), the Go Celo implementation, and `gobind` to build Java language bindings to Go code for the Android Geth client).

Note: We currently use Go 1.11. Brew installs Go 1.12 by default, which is not entirely compatible with our repositories. [Install Go 1.11 manually](https://golang.org/dl/), then run

```
go get golang.org/x/mobile/cmd/gobind
```

Execute the following (and make sure the lines are in your `~/.bash_profile`):

```
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
```

#### Optional: Install Rust

We use Rust to build the [bls-zexe](https://github.com/celo-org/bls-zexe) repo, which Geth depends on. If you only use the monorepo, you probably don't need this.
Expand Down
4 changes: 2 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# More details: https://github.com/GoogleContainerTools/kaniko

steps:

- id: "docker:celotool"
name: gcr.io/kaniko-project/executor:latest
args: [
Expand Down Expand Up @@ -37,7 +37,7 @@ steps:
args: [
"--dockerfile=dockerfiles/attestation-service/Dockerfile",
"--cache=true",
"--destination=gcr.io/$PROJECT_ID/celo-monorepo:attestation-service-$COMMIT_SHA"
"--destination=us.gcr.io/$PROJECT_ID/celo-monorepo:attestation-service-$COMMIT_SHA"
]
waitFor: ['-']

Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN npm install @celo/celocli
FROM node:10-alpine as final_image

ARG network_name="alfajores"
ARG network_id="44784"
ARG network_id="44785"

# Without musl-dev, geth will fail with a confusing "No such file or directory" error.
# bash is required for start_geth.sh
Expand All @@ -66,4 +66,4 @@ COPY --from=node /celo-monorepo/node_modules /celo-monorepo/node_modules
RUN chmod ugo+x /celo/start_geth.sh && ln -s /celo-monorepo/node_modules/.bin/celocli /usr/local/bin/celocli

EXPOSE 8545 8546 30303 30303/udp
ENTRYPOINT ["/celo/start_geth.sh", "/usr/local/bin/geth", "alfajores", "full", "44784", "/root/.celo", "/celo/genesis.json", "/celo/static-nodes.json"]
ENTRYPOINT ["/celo/start_geth.sh", "/usr/local/bin/geth", "alfajores", "full", "44785", "/root/.celo", "/celo/genesis.json", "/celo/static-nodes.json"]
Loading

0 comments on commit df40d60

Please sign in to comment.