Skip to content

Commit

Permalink
Merge branch 'master' into martinvol/CR10_master (but still some buil…
Browse files Browse the repository at this point in the history
…d errors)
  • Loading branch information
martinvol committed Oct 6, 2023
2 parents d49390c + e7ebc92 commit 7135401
Show file tree
Hide file tree
Showing 701 changed files with 8,667 additions and 67,510 deletions.
137 changes: 33 additions & 104 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
# and https://github.com/facebook/react-native/blob/master/.circleci/config.yml

version: 2.1
setup: true

orbs:
node: circleci/[email protected]

parameters:
run-workflow-general:
type: boolean
default: false
run-workflow-npm-install:
type: boolean
default: false
run-workflow-protocol-coverage:
type: boolean
default: false
# When you need to force a rebuild of the node modules cache then bump this version
node-modules-cache-version:
type: integer
Expand Down Expand Up @@ -38,8 +48,7 @@ defaults: &defaults
contract-defaults: &contract-defaults
<<: *defaults
environment:
# RELEASE_TAG: core-contracts.v9
RELEASE_TAG: ganache-v7-core-contracts.v9
RELEASE_TAG: core-contracts.v10

e2e-defaults: &e2e-defaults
<<: *defaults
Expand Down Expand Up @@ -201,8 +210,7 @@ jobs:

general-test:
<<: *defaults
# XXX (soloseng): Increased size because this test was hitting the ram limit and failing
resource_class: large
resource_class: xlarge
steps:
- attach_workspace:
at: ~/app
Expand All @@ -217,7 +225,6 @@ jobs:
--ignore @celo/celotool \
--ignore @celo/celocli \
--ignore @celo/env-tests \
--ignore @celo/identity \
--ignore @celo/transactions-uri \
--ignore '@celo/wallet-*' \
run test
Expand Down Expand Up @@ -254,6 +261,7 @@ jobs:
name: Opcode tests
command: yarn --cwd packages/protocol check-opcodes
- node/install:
# TODO(soloseng): remove this node 12 install once the latest contract release is done on node18.
install-yarn: true
node-version: '12.22.11'
- run:
Expand Down Expand Up @@ -452,28 +460,6 @@ jobs:
name: Run Tests
command: yarn --cwd=packages/sdk/contractkit test

# extrated to reuse the devchain generated by contractkit
identity-tests:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
./scripts/ci_check_if_test_should_run_v2.sh @celo/identity
# - run:
# name: Copy DevChain generated by Contractkit
# command: |
# (cp -r packages/sdk/contractkit/.tmp packages/sdk/identity/.tmp)
- run:
name: Generate DevChain
command: |
(cd packages/sdk/identity && yarn test:reset)
- run:
name: Run Tests
command: yarn --cwd=packages/sdk/identity test

# extrated to reuse the devchain generated by contractkit
transactions-uri-tests:
<<: *defaults
Expand Down Expand Up @@ -793,29 +779,6 @@ jobs:
name: Minor test of celocli
command: ./node_modules/.bin/celocli account:new # Small test

odis-test:
<<: *defaults
# Source: https://circleci.com/docs/2.0/configuration-reference/#resource_class
resource_class: large
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
./scripts/ci_check_if_test_should_run_v2.sh @celo/phone-number-privacy-signer,@celo/phone-number-privacy-combiner,@celo/phone-number-privacy-common
- run:
name: Run Tests for common package
command: yarn --cwd=packages/phone-number-privacy/common test:coverage
- run:
name: Run Tests for combiner
no_output_timeout: 30m
command: yarn --cwd=packages/phone-number-privacy/combiner test:coverage
- run:
name: Run Tests for signer
no_output_timeout: 30m
command: yarn --cwd=packages/phone-number-privacy/signer test:coverage

certora-test:
working_directory: ~/app
docker:
Expand Down Expand Up @@ -885,20 +848,21 @@ jobs:
cd packages/protocol
./specs/scripts/reserve.sh
fi
flakey-test-summary:
<<: *defaults
# Dummy job for not showing CircleCI error: "Error: All Workflows have been filtered from this Pipeline"
# Check https://github.com/CircleCI-Public/circleci-cli/issues/577 for more context
noop:
docker:
- image: cimg/base:current
resource_class: small
steps:
- attach_workspace:
at: ~/app
- run:
name: Add summary of flakey tests to GitHub Checks
command: |
node ./packages/flake-tracker/scripts/summary.js
- run: echo "noop"

workflows:
version: 2
celo-monorepo-build:
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-general >>]
jobs:
- install_dependencies
- certora-test:
Expand All @@ -919,12 +883,6 @@ workflows:
- wallets-test:
requires:
- install_dependencies
- identity-tests:
requires:
- contractkit-test
- transactions-uri-tests:
requires:
- contractkit-test
- pre-protocol-test-release:
requires:
- lint-checks
Expand Down Expand Up @@ -997,52 +955,18 @@ workflows:
requires:
- lint-checks
- contractkit-test
- odis-test:
requires:
- lint-checks
# - flakey-test-summary:
# requires:
# - protocol-test-common
# - protocol-test-compatibility
# - protocol-test-governance-network
# - protocol-test-governance-validators
# - protocol-test-governance-voting
# - protocol-test-identity
# - protocol-test-stability
# - end-to-end-geth-transfer-test
# - end-to-end-geth-blockchain-parameters-test
# - end-to-end-geth-slashing-test
# - end-to-end-geth-governance-test
# - end-to-end-geth-replica-test
# - end-to-end-geth-sync-test
# - end-to-end-geth-validator-order-test
# - end-to-end-cip35-eth-compatibility-test
# - odis-test
npm-install-testing-cron-workflow:
triggers:
- schedule:
# 7 PM in UTC = noon in PDT.
# Best for test to fail during SF afternoon, so that, someone can fix it during the day time.
cron: '0 19 * * *'
filters:
branches:
only:
- master
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-npm-install >>]
jobs:
- test-typescript-npm-package-install
- test-utils-npm-package-install
- test-contractkit-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
when:
or: [<< pipeline.parameters.run-workflow-protocol-coverage >>]
jobs:
- install_dependencies
- lint-checks:
Expand All @@ -1051,3 +975,8 @@ workflows:
- protocol-test-with-code-coverage:
requires:
- lint-checks
# Dummy job for not showing CircleCI error: "Error: All Workflows have been filtered from this Pipeline"
# Check https://github.com/CircleCI-Public/circleci-cli/issues/577 for more context
no-changes:
jobs:
- noop
6 changes: 0 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ GETH_VMODULE="consensus/*=2"
GETH_ENABLE_METRICS=false
GETH_USE_MYCELO=false

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 @@ -60,10 +58,6 @@ TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-m
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-dc5e5dfa07231a4ff4664816a95eae606293eae9"
TRANSACTION_METRICS_EXPORTER_SUFFIX='1'

EKSPORTISTO_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/eksportisto"
EKSPORTISTO_DOCKER_IMAGE_TAG="12f9f9e822ea35db2f965be616abef126f1724fb"
EKSPORTISTO_SUFFIX='1'

# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
Expand Down
74 changes: 1 addition & 73 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@ ENV_TYPE="production"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="alfajores"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"

TESTNET_PROJECT_NAME="celo-testnet-production"

AZURE_KOMENCI_EASTUS_AZURE_SUBSCRIPTION_ID=97e2b592-255b-4f92-bce0-127257163c36
AZURE_KOMENCI_EASTUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e
AZURE_KOMENCI_EASTUS_AZURE_REGION_NAME=eus

AZURE_KOMENCI_WESTEU_AZURE_SUBSCRIPTION_ID=97e2b592-255b-4f92-bce0-127257163c36
AZURE_KOMENCI_WESTEU_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e
AZURE_KOMENCI_WESTEU_AZURE_REGION_NAME=weu

BLOCKSCOUT_DOCKER_IMAGE_TAG="0362f9f4d1d4842f27adb634d628f969f53c046d"
# Assign a new value everytime you redeploy blockscout. Or else the deployment will fail due to the
# existing database.
Expand Down Expand Up @@ -84,10 +74,6 @@ MOCK_ORACLE_DOCKER_IMAGE_TAG="default"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-f4a55e143932ea559cf4bcbd9bcccc14da43d6ed"

EKSPORTISTO_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/eksportisto"
EKSPORTISTO_DOCKER_IMAGE_TAG="c88f7e8babcdb01062a6a12ae729705ba9769add"
EKSPORTISTO_SUFFIX='1'

# Genesis Vars
NETWORK_ID=44787
CONSENSUS_TYPE="istanbul"
Expand Down Expand Up @@ -135,7 +121,7 @@ MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/47009904

# each context should have its own environment variables, generally of the form
# <context in all caps and underscores>_*
CONTEXTS=azure-komenci-eastus,azure-komenci-westeu,azure-oracle-centralus,azure-odis-eastus-1,azure-odis-eastus-2,azure-odis-eastus-3
CONTEXTS=azure-oracle-centralus,azure-odis-eastus-1,azure-odis-eastus-2,azure-odis-eastus-3

# --- ODIS ---

Expand Down Expand Up @@ -246,64 +232,6 @@ AZURE_ODIS_EASTUS_3_PROM_SIDECAR_GCP_PROJECT=celo-phone-number-privacy
AZURE_ODIS_EASTUS_3_PROM_SIDECAR_GCP_REGION=us-east1
AZURE_ODIS_EASTUS_3_PROM_SIDECAR_DISABLED="true"

# --- Komenci ---

KOMENCI_DOCKER_IMAGE_REPOSITORY="celotestnet.azurecr.io/komenci/komenci"
KOMENCI_DOCKER_IMAGE_TAG="08081d2d276a6fd0d420805f3bbe3866e866a63a"

AZURE_KOMENCI_EASTUS_AZURE_KUBERNETES_RESOURCE_GROUP=staging-komenci-eastus
AZURE_KOMENCI_EASTUS_KUBERNETES_CLUSTER_NAME=staging-komenci-eastus
AZURE_KOMENCI_EASTUS_REGION_NAME=eus

AZURE_KOMENCI_EASTUS_KOMENCI_DB_HOST=staging-komenci-eastus.postgres.database.azure.com
AZURE_KOMENCI_EASTUS_KOMENCI_DB_PORT=5432
AZURE_KOMENCI_EASTUS_KOMENCI_DB_USERNAME=postgres@staging-komenci-eastus
AZURE_KOMENCI_EASTUS_KOMENCI_DB_PASSWORD_VAULT_NAME=staging-komenci-eus

AZURE_KOMENCI_WESTEU_AZURE_KUBERNETES_RESOURCE_GROUP=staging-komenci-weu
AZURE_KOMENCI_WESTEU_KUBERNETES_CLUSTER_NAME=staging-komenci-weu
AZURE_KOMENCI_WESTEU_REGION_NAME=weu

AZURE_KOMENCI_WESTEU_KOMENCI_DB_HOST=staging-komenci-weu.postgres.database.azure.com
AZURE_KOMENCI_WESTEU_KOMENCI_DB_PORT=5432
AZURE_KOMENCI_WESTEU_KOMENCI_DB_USERNAME=postgres@staging-komenci-weu
AZURE_KOMENCI_WESTEU_KOMENCI_DB_PASSWORD_VAULT_NAME=staging-komenci-weu

AZURE_KOMENCI_EASTUS_KOMENCI_REWARD_SERVICE_DB_HOST=staging-komenci-weu.postgres.database.azure.com
AZURE_KOMENCI_EASTUS_KOMENCI_REWARD_SERVICE_DB_PORT=5432
AZURE_KOMENCI_EASTUS_KOMENCI_REWARD_SERVICE_DB_USERNAME=postgres@staging-komenci-weu
AZURE_KOMENCI_EASTUS_KOMENCI_REWARD_SERVICE_DB_PASSWORD_VAULT_NAME=staging-komenci-weu

AZURE_KOMENCI_WESTEU_KOMENCI_REWARD_SERVICE_DB_HOST=staging-komenci-weu.postgres.database.azure.com
AZURE_KOMENCI_WESTEU_KOMENCI_REWARD_SERVICE_DB_PORT=5432
AZURE_KOMENCI_WESTEU_KOMENCI_REWARD_SERVICE_DB_USERNAME=postgres@staging-komenci-weu
AZURE_KOMENCI_WESTEU_KOMENCI_REWARD_SERVICE_DB_PASSWORD_VAULT_NAME=staging-komenci-weu

# Secrets
AZURE_KOMENCI_EASTUS_KOMENCI_APP_SECRETS_VAULT_NAME=staging-komenci-eus
AZURE_KOMENCI_WESTEU_KOMENCI_APP_SECRETS_VAULT_NAME=staging-komenci-weu

# Rule config > Captcha
KOMENCI_RULE_CONFIG_CAPTCHA_BYPASS_TOKEN=special-captcha-bypass-token
AZURE_KOMENCI_EASTUS_KOMENCI_RULE_CONFIG_CAPTCHA_BYPASS_ENABLED=true
AZURE_KOMENCI_WESTEU_KOMENCI_RULE_CONFIG_CAPTCHA_BYPASS_ENABLED=true

# Format should be a comma-separated sequence of:
# <address>:<key vault name>:<resource group (optional)>
AZURE_KOMENCI_EASTUS_KOMENCI_ADDRESS_AZURE_KEY_VAULTS=0x00454cac6dae53f8800f71395b9a174f07a784b1:staging-komenci-eus,0xc6f0f9bfb1aed83620ece3eac0add98a65a8574e:staging-komenci-eus
AZURE_KOMENCI_WESTEU_KOMENCI_ADDRESS_AZURE_KEY_VAULTS=0x0f812be74511b90ea6b2f80e77bea047e69a0b2a:staging-komenci-weu,0xb354d3d2908ba6a2b791683b0f454a38f69cb282:staging-komenci-weu
AZURE_KOMENCI_EASTUS_KOMENCI_CELOLABS_REWARDS_ADDRESS_AZURE_KEY_VAULTS=0xb04390478a57e3c2147599d5380434f25fa5234d:staging-komenci-rewards
AZURE_KOMENCI_WESTEU_KOMENCI_CELOLABS_REWARDS_ADDRESS_AZURE_KEY_VAULTS=0xb04390478a57e3c2147599d5380434f25fa5234d:staging-komenci-rewards

# Celo Rewards
AZURE_KOMENCI_EASTUS_KOMENCI_REWARD_SERVICE_INSTANCE_COUNT = 1
AZURE_KOMENCI_WESTEU_KOMENCI_REWARD_SERVICE_INSTANCE_COUNT = 1
KOMENCI_SHOULD_SEND_REWARDS=true

# Network
AZURE_KOMENCI_EASTUS_KOMENCI_NETWORK=alfajores
AZURE_KOMENCI_WESTEU_KOMENCI_NETWORK=alfajores

# For WalletConnect relay
WALLET_CONNECT_IMAGE_REPOSITORY = 'us.gcr.io/celo-testnet/walletconnect'
WALLET_CONNECT_IMAGE_TAG = '1472bcaad57e3746498f7a661c42ff5cf9acaf5a'
Expand Down
5 changes: 0 additions & 5 deletions .env.baklava
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ENV_TYPE="production"
GETH_VERBOSITY=2
GETH_ENABLE_METRICS=true

VM_BASED=false

KUBERNETES_CLUSTER_NAME="baklavastaging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
Expand Down Expand Up @@ -130,10 +129,6 @@ GCP_FORNO_EUROPE_WEST1_PROM_SIDECAR_DISABLED="true"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-dc5e5dfa07231a4ff4664816a95eae606293eae9"

EKSPORTISTO_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/eksportisto"
EKSPORTISTO_DOCKER_IMAGE_TAG="b199a634866ef34c4fa1925381dff4de40eb0a3c"
EKSPORTISTO_SUFFIX='1'

# Genesis Vars
NETWORK_ID=62320
CONSENSUS_TYPE="istanbul"
Expand Down
Loading

0 comments on commit 7135401

Please sign in to comment.