From c5ff75c9f0888c7ae8e4a1b628399a99520aa873 Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Tue, 11 Jul 2023 12:01:21 +0200 Subject: [PATCH 01/24] chore: add usdcbrl and usdceur to rc1 config --- .env.rc1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.env.rc1 b/.env.rc1 index a618d05bb1b..a393d6377f3 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -81,6 +81,8 @@ AZURE_ORACLE_WESTUS_CELOUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0aee051be85ba9c7c1 AZURE_ORACLE_WESTUS_CELOEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xb8bDBfdd591a5be5980983A7ba1710a5F46f42B5:mainnet-eur-oracle-wus2:mainnet-oracles-westus2,0x929Ad7f2b781CE830014E824CA2eF0b7b8de87C2:mainnet-eur-oracle-wus3:mainnet-oracles-westus2,0xCCC0B54edD8dAe3c15b5C002dd5d348495d4f7fe:mainnet-eur-oracle-wus4:mainnet-oracles-westus2 AZURE_ORACLE_WESTUS_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x57d8a7bf9e7f4113c49e077b140fd8e1d7f78a76:mainnet-brl-oracle-wus0:mainnet-oracles-westus2,0x1299dd007cd5120262e546dca893e30d1cff8a10:mainnet-brl-oracle-wus1:mainnet-oracles-westus2,0x116951e440aee97a328614f9937710c9bb2f0839:mainnet-brl-oracle-wus4:mainnet-oracles-westus2 AZURE_ORACLE_WESTUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x2986c21824c9b804d170270a316ceb07149f79c5:mainnet-usdcusd-wus0,0x09e2e47bb5df7b3464407746970a65c7b02883b3:mainnet-usdcusd-wus1,0xd5e7454932f6e853af849f70044570b62ca2596e:mainnet-usdcusd-wus2,0xfe3276b7142dee2cda34b1d14852eb32f436483d:mainnet-usdcusd-wus3 +AZURE_ORACLE_WESTUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xeccd1e9439094d025ac7d08d16b0bfe0da3bea53:mainnet-usdceur-wus0,0x9b242d2bd848fc92060ca7546033c3af352583d2:mainnet-usdceur-wus1,0x905ab001a9199d45c3f5c7b055b65ace5fc7d70a:mainnet-usdceur-wus2,0xdf5dd31d8f78520185d6a9fb0498c4bbddfe0708:mainnet-usdceur-wus3 +AZURE_ORACLE_WESTUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8dba01f832c7b0bb5f0bad4efe181cc07f8b322e:mainnet-usdcbrl-wus0,0xffb417d009d09bd1140244e70babbaa52d69ec84:mainnet-usdcbrl-wus1,0x5f755b8350a2e6b8b042cb3e052580e4c5b0ac35:mainnet-usdcbrl-wus2,0x8e1349b48ee82ef5437c912662e6640f3590c6f9:mainnet-usdcbrl-wus3 AZURE_ORACLE_WESTUS_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS_FULL_NODES_DISK_SIZE=100 @@ -101,6 +103,8 @@ AZURE_ORACLE_WESTEUROPE_CELOUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xfe9925e6ae9c4c AZURE_ORACLE_WESTEUROPE_CELOEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x87C45738DAd8Dc3D2b1cCe779E0766329cc408C6:mainnet-eur-oracle-weu0:mainnet-oracles-westeurope,0xeF1E143C554EFC43B0537Af00Ac27C828dE6cF8D:mainnet-eur-oracle-weu1:mainnet-oracles-westeurope,0xF4B4AA107F30206EA019DE145A9b778a220f9fc0:mainnet-eur-oracle-weu2:mainnet-oracles-westeurope,0x24c303e6395DD19806F739619960A311764e3F40:mainnet-eur-oracle-weu3:mainnet-oracles-westeurope,0xDA413875FB45E5905950Bc08a908ebD246Ee6581:mainnet-eur-oracle-weu5:mainnet-oracles-westeurope AZURE_ORACLE_WESTEUROPE_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x3b91bbb873f3b979bd6671dc018d5fc1848882dd:mainnet-brl-oracle-weu0:mainnet-oracles-westeurope,0xc3994b2af0e82490e432d49e9f2246cdfd84da8f:mainnet-brl-oracle-weu1:mainnet-oracles-westeurope,0x9b376b33c33325332df8c6ca951a9896889a6d1e:mainnet-brl-oracle-weu2:mainnet-oracles-westeurope,0x554ba7f4d200c7b233b93b7f2223bc1ea7c467fd:mainnet-brl-oracle-weu3:mainnet-oracles-westeurope,0x535cea1834d6b52e4e9724642fdd7008f569ba5c:mainnet-brl-oracle-weu4:mainnet-oracles-westeurope AZURE_ORACLE_WESTEUROPE_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x477185291403ca2ed5f56d59ed0d568a16222013:mainnet-usdcusd-weu0,0x9a0a52d483c62df76d54f41ab3283cc7cb41ba91:mainnet-usdcusd-weu1,0x2ddb86898a2c2c884fc5cc3ca344898b0170a00d:mainnet-usdcusd-weu2,0x79be0a692e3a4bcd22b96c3e93a108b485becbb2:mainnet-usdcusd-weu3 +AZURE_ORACLE_WESTEUROPE_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0781f530100e619936f5b427263441cb0414f885:mainnet-usdceur-weu0,0x55de75fd0c2b37987757172fef7ba2ea935d284d:mainnet-usdceur-weu1,0xdc0c15fa73b13b2e74cd3eced23d8826569904c5:mainnet-usdceur-weu2,0x9048872f739cebbe72825763a1b72064c4df8f1f:mainnet-usdceur-weu3 +AZURE_ORACLE_WESTEUROPE_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x42b813b9ff8ce8f4837accea26bedda20d7c4982:mainnet-usdcbrl-weu0,0x09208127500963ee1c3af88bfbb3ef0cd34d6eb0:mainnet-usdcbrl-weu1,0xa8f5be092a8452eab98ed1c220d642114bb2731e:mainnet-usdcbrl-weu2,0xfd265c994a5a9c2847fe03a5e878648963f53a37:mainnet-usdcbrl-weu3 AZURE_ORACLE_WESTEUROPE_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTEUROPE_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTEUROPE_FULL_NODES_DISK_SIZE=100 @@ -534,4 +538,4 @@ AZURE_KOMENCI_SEA_KOMENCI_NETWORK=rc1 WALLET_CONNECT_IMAGE_REPOSITORY='us.gcr.io/celo-testnet/walletconnect' WALLET_CONNECT_IMAGE_TAG='1472bcaad57e3746498f7a661c42ff5cf9acaf5a' WALLET_CONNECT_REDIS_CLUSTER_ENABLED=false -WALLET_CONNECT_REDIS_CLUSTER_USEPASSWORD=false +WALLET_CONNECT_REDIS_CLUSTER_USEPASSWORD=false \ No newline at end of file From b790c5e5baecdc20ba2f5b5337abc3b14f6cfe79 Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Wed, 2 Aug 2023 16:06:05 +0200 Subject: [PATCH 02/24] chore: upgrade all envs to 1.0.4 --- .env.alfajores | 2 +- .env.baklava | 2 +- .env.rc1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index f6762b6487e..1b56e3d359e 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -31,7 +31,7 @@ CELOSTATS_BANNED_ADDRESSES="" CELOSTATS_RESERVED_ADDRESSES="" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.3" +ORACLE_DOCKER_IMAGE_TAG="1.0.4" AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e diff --git a/.env.baklava b/.env.baklava index 4262cee6c2f..5e75701ce7d 100644 --- a/.env.baklava +++ b/.env.baklava @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone" CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.3" +ORACLE_DOCKER_IMAGE_TAG="1.0.4" # ---- Full Node Chain Restore ---- diff --git a/.env.rc1 b/.env.rc1 index a393d6377f3..a05b1496280 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -52,7 +52,7 @@ CELOCLI_STANDALONE_IMAGE_TAG="0.0.42" MOCK_ORACLE_CRON_SCHEDULE="*/5 * * * *" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.3" +ORACLE_DOCKER_IMAGE_TAG="1.0.4" ORACLE_UNUSED_ORACLE_ADDRESSES=0xB93Fe7906ea4221b3fbe23412D18Ab1B07FE2F71,0x8d25D74E43789079Ef3C6B965c3D22b63A1233aC,0xCD88Cc79342a7cFE78E91FAa173eC87704bDcA9a,0x5091110175318A2A8aF88309D1648c1D84d31B29,0xBBd6e54Af7A5722f42461C6313F37Bd50729F195,0xE23a4c6615669526Ab58E9c37088bee4eD2b2dEE From 78e9858dad1ab7253cca0432a45f837085811ed3 Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Wed, 2 Aug 2023 16:11:17 +0200 Subject: [PATCH 03/24] chore: only leave related code --- .env.rc1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.env.rc1 b/.env.rc1 index a05b1496280..880cf4253e2 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -81,8 +81,6 @@ AZURE_ORACLE_WESTUS_CELOUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0aee051be85ba9c7c1 AZURE_ORACLE_WESTUS_CELOEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xb8bDBfdd591a5be5980983A7ba1710a5F46f42B5:mainnet-eur-oracle-wus2:mainnet-oracles-westus2,0x929Ad7f2b781CE830014E824CA2eF0b7b8de87C2:mainnet-eur-oracle-wus3:mainnet-oracles-westus2,0xCCC0B54edD8dAe3c15b5C002dd5d348495d4f7fe:mainnet-eur-oracle-wus4:mainnet-oracles-westus2 AZURE_ORACLE_WESTUS_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x57d8a7bf9e7f4113c49e077b140fd8e1d7f78a76:mainnet-brl-oracle-wus0:mainnet-oracles-westus2,0x1299dd007cd5120262e546dca893e30d1cff8a10:mainnet-brl-oracle-wus1:mainnet-oracles-westus2,0x116951e440aee97a328614f9937710c9bb2f0839:mainnet-brl-oracle-wus4:mainnet-oracles-westus2 AZURE_ORACLE_WESTUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x2986c21824c9b804d170270a316ceb07149f79c5:mainnet-usdcusd-wus0,0x09e2e47bb5df7b3464407746970a65c7b02883b3:mainnet-usdcusd-wus1,0xd5e7454932f6e853af849f70044570b62ca2596e:mainnet-usdcusd-wus2,0xfe3276b7142dee2cda34b1d14852eb32f436483d:mainnet-usdcusd-wus3 -AZURE_ORACLE_WESTUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xeccd1e9439094d025ac7d08d16b0bfe0da3bea53:mainnet-usdceur-wus0,0x9b242d2bd848fc92060ca7546033c3af352583d2:mainnet-usdceur-wus1,0x905ab001a9199d45c3f5c7b055b65ace5fc7d70a:mainnet-usdceur-wus2,0xdf5dd31d8f78520185d6a9fb0498c4bbddfe0708:mainnet-usdceur-wus3 -AZURE_ORACLE_WESTUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8dba01f832c7b0bb5f0bad4efe181cc07f8b322e:mainnet-usdcbrl-wus0,0xffb417d009d09bd1140244e70babbaa52d69ec84:mainnet-usdcbrl-wus1,0x5f755b8350a2e6b8b042cb3e052580e4c5b0ac35:mainnet-usdcbrl-wus2,0x8e1349b48ee82ef5437c912662e6640f3590c6f9:mainnet-usdcbrl-wus3 AZURE_ORACLE_WESTUS_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS_FULL_NODES_DISK_SIZE=100 @@ -103,8 +101,6 @@ AZURE_ORACLE_WESTEUROPE_CELOUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xfe9925e6ae9c4c AZURE_ORACLE_WESTEUROPE_CELOEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x87C45738DAd8Dc3D2b1cCe779E0766329cc408C6:mainnet-eur-oracle-weu0:mainnet-oracles-westeurope,0xeF1E143C554EFC43B0537Af00Ac27C828dE6cF8D:mainnet-eur-oracle-weu1:mainnet-oracles-westeurope,0xF4B4AA107F30206EA019DE145A9b778a220f9fc0:mainnet-eur-oracle-weu2:mainnet-oracles-westeurope,0x24c303e6395DD19806F739619960A311764e3F40:mainnet-eur-oracle-weu3:mainnet-oracles-westeurope,0xDA413875FB45E5905950Bc08a908ebD246Ee6581:mainnet-eur-oracle-weu5:mainnet-oracles-westeurope AZURE_ORACLE_WESTEUROPE_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x3b91bbb873f3b979bd6671dc018d5fc1848882dd:mainnet-brl-oracle-weu0:mainnet-oracles-westeurope,0xc3994b2af0e82490e432d49e9f2246cdfd84da8f:mainnet-brl-oracle-weu1:mainnet-oracles-westeurope,0x9b376b33c33325332df8c6ca951a9896889a6d1e:mainnet-brl-oracle-weu2:mainnet-oracles-westeurope,0x554ba7f4d200c7b233b93b7f2223bc1ea7c467fd:mainnet-brl-oracle-weu3:mainnet-oracles-westeurope,0x535cea1834d6b52e4e9724642fdd7008f569ba5c:mainnet-brl-oracle-weu4:mainnet-oracles-westeurope AZURE_ORACLE_WESTEUROPE_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x477185291403ca2ed5f56d59ed0d568a16222013:mainnet-usdcusd-weu0,0x9a0a52d483c62df76d54f41ab3283cc7cb41ba91:mainnet-usdcusd-weu1,0x2ddb86898a2c2c884fc5cc3ca344898b0170a00d:mainnet-usdcusd-weu2,0x79be0a692e3a4bcd22b96c3e93a108b485becbb2:mainnet-usdcusd-weu3 -AZURE_ORACLE_WESTEUROPE_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0781f530100e619936f5b427263441cb0414f885:mainnet-usdceur-weu0,0x55de75fd0c2b37987757172fef7ba2ea935d284d:mainnet-usdceur-weu1,0xdc0c15fa73b13b2e74cd3eced23d8826569904c5:mainnet-usdceur-weu2,0x9048872f739cebbe72825763a1b72064c4df8f1f:mainnet-usdceur-weu3 -AZURE_ORACLE_WESTEUROPE_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x42b813b9ff8ce8f4837accea26bedda20d7c4982:mainnet-usdcbrl-weu0,0x09208127500963ee1c3af88bfbb3ef0cd34d6eb0:mainnet-usdcbrl-weu1,0xa8f5be092a8452eab98ed1c220d642114bb2731e:mainnet-usdcbrl-weu2,0xfd265c994a5a9c2847fe03a5e878648963f53a37:mainnet-usdcbrl-weu3 AZURE_ORACLE_WESTEUROPE_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTEUROPE_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTEUROPE_FULL_NODES_DISK_SIZE=100 From cf018e87210f5a93d2f9ff38ddcac184eb3fface Mon Sep 17 00:00:00 2001 From: boqdan Date: Thu, 10 Aug 2023 10:37:52 +0200 Subject: [PATCH 04/24] fix: Fix api-keys secret k8s config --- .env.alfajores | 15 ++++++++------- packages/helm-charts/oracle/templates/_helper.tpl | 5 ++++- .../oracle/templates/api_keys-secret.yaml | 8 +++++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index 1b56e3d359e..dce320a02b6 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -38,13 +38,13 @@ AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e AZURE_ORACLE_CENTRALUS_AZURE_KUBERNETES_RESOURCE_GROUP=baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_KUBERNETES_CLUSTER_NAME=baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_AZURE_REGION_NAME=centralus -AZURE_ORACLE_CENTRALUS_CELOUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=6 -AZURE_ORACLE_CENTRALUS_CELOEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=6 -AZURE_ORACLE_CENTRALUS_CELOBTC_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=10 -AZURE_ORACLE_CENTRALUS_CELOBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=6 -AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=5 -AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=5 -AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=5 +AZURE_ORACLE_CENTRALUS_CELOUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_CELOEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_CELOBTC_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_CELOBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 @@ -134,6 +134,7 @@ MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/47009904 # each context should have its own environment variables, generally of the form # _* CONTEXTS=azure-komenci-eastus,azure-komenci-westeu,azure-oracle-centralus,azure-odis-eastus-1,azure-odis-eastus-2,azure-odis-eastus-3 +ORACLE_FX_ADAPTERS_API_KEYS="" # --- ODIS --- diff --git a/packages/helm-charts/oracle/templates/_helper.tpl b/packages/helm-charts/oracle/templates/_helper.tpl index d2ef8a2b9be..ece6db7dbb1 100644 --- a/packages/helm-charts/oracle/templates/_helper.tpl +++ b/packages/helm-charts/oracle/templates/_helper.tpl @@ -49,4 +49,7 @@ The name of the pkey secret */}} {{- define "pkey-secret-name" -}} pkey-secret-{{- .Values.oracle.currencyPair | lower -}} -{{- end -}} \ No newline at end of file +{{- end -}} +{{- define "api-keys-secret-name" -}} +api-keys-{{- .Values.oracle.currencyPair | lower -}} +{{- end -}} diff --git a/packages/helm-charts/oracle/templates/api_keys-secret.yaml b/packages/helm-charts/oracle/templates/api_keys-secret.yaml index ad3071bb020..29dc8fd8264 100644 --- a/packages/helm-charts/oracle/templates/api_keys-secret.yaml +++ b/packages/helm-charts/oracle/templates/api_keys-secret.yaml @@ -1,7 +1,9 @@ apiVersion: v1 kind: Secret metadata: - name: api-keys + name: {{ template "api-keys-secret-name" . }} + labels: +{{ include "labels" . | indent 4 }} type: Opaque -data: - api_keys: {{ .Values.oracle.api_keys | b64enc }} \ No newline at end of file +data: + api_keys: { { .Values.oracle.api_keys | b64enc } } From 9af60855e2ced9e07ed64287e529bd2a2c2a5b61 Mon Sep 17 00:00:00 2001 From: boqdan Date: Thu, 10 Aug 2023 10:40:34 +0200 Subject: [PATCH 05/24] chore: remove env key from file --- .env.alfajores | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.alfajores b/.env.alfajores index dce320a02b6..6e20958a934 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -134,7 +134,6 @@ MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/47009904 # each context should have its own environment variables, generally of the form # _* CONTEXTS=azure-komenci-eastus,azure-komenci-westeu,azure-oracle-centralus,azure-odis-eastus-1,azure-odis-eastus-2,azure-odis-eastus-3 -ORACLE_FX_ADAPTERS_API_KEYS="" # --- ODIS --- From dd0a1b9df03f772113846269969655b6c1d7500e Mon Sep 17 00:00:00 2001 From: boqdan Date: Thu, 10 Aug 2023 10:47:39 +0200 Subject: [PATCH 06/24] fix: fix api-keys secret --- .../templates/{api_keys-secret.yaml => api-keys-secret.yaml} | 2 +- packages/helm-charts/oracle/templates/statefulset.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/helm-charts/oracle/templates/{api_keys-secret.yaml => api-keys-secret.yaml} (74%) diff --git a/packages/helm-charts/oracle/templates/api_keys-secret.yaml b/packages/helm-charts/oracle/templates/api-keys-secret.yaml similarity index 74% rename from packages/helm-charts/oracle/templates/api_keys-secret.yaml rename to packages/helm-charts/oracle/templates/api-keys-secret.yaml index 29dc8fd8264..db2d40d782a 100644 --- a/packages/helm-charts/oracle/templates/api_keys-secret.yaml +++ b/packages/helm-charts/oracle/templates/api-keys-secret.yaml @@ -6,4 +6,4 @@ metadata: {{ include "labels" . | indent 4 }} type: Opaque data: - api_keys: { { .Values.oracle.api_keys | b64enc } } + api_keys: {{ .Values.oracle.api_keys | b64enc }} diff --git a/packages/helm-charts/oracle/templates/statefulset.yaml b/packages/helm-charts/oracle/templates/statefulset.yaml index 1d5a604e879..423881c0e0b 100644 --- a/packages/helm-charts/oracle/templates/statefulset.yaml +++ b/packages/helm-charts/oracle/templates/statefulset.yaml @@ -119,7 +119,7 @@ spec: valueFrom: secretKeyRef: key: api_keys - name: api-keys + name: {{ template "api-keys-secret-name" . }} {{ include "common.env-var" (dict "name" "API_REQUEST_TIMEOUT" "dict" .Values.oracle "value_name" "apiRequestTimeoutMs" "optional" true) | indent 8 }} {{ include "common.env-var" (dict "name" "AZURE_HSM_INIT_TRY_COUNT" "dict" .Values.oracle.azureHsm "value_name" "initTryCount") | indent 8 }} {{ include "common.env-var" (dict "name" "AZURE_HSM_INIT_MAX_RETRY_BACKOFF_MS" "dict" .Values.oracle.azureHsm "value_name" "initMaxRetryBackoffMs") | indent 8 }} From f612e7d2dda6d6b67043252ddfbb592846a790a7 Mon Sep 17 00:00:00 2001 From: boqdan Date: Thu, 10 Aug 2023 15:16:44 +0200 Subject: [PATCH 07/24] fix: move to manual service account secret creation for k8s 1.24+ --- packages/celotool/src/lib/k8s-oracle/rbac.ts | 15 +++------------ packages/helm-charts/oracle-rbac/Chart.yaml | 4 ++-- .../helm-charts/oracle-rbac/templates/_helper.tpl | 4 ++++ .../helm-charts/oracle-rbac/templates/secret.yaml | 11 +++++++++++ packages/helm-charts/oracle/Chart.yaml | 6 +++--- 5 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 packages/helm-charts/oracle-rbac/templates/secret.yaml diff --git a/packages/celotool/src/lib/k8s-oracle/rbac.ts b/packages/celotool/src/lib/k8s-oracle/rbac.ts index 4ad47cd5cf1..2ed976e1b9b 100644 --- a/packages/celotool/src/lib/k8s-oracle/rbac.ts +++ b/packages/celotool/src/lib/k8s-oracle/rbac.ts @@ -3,7 +3,6 @@ import { removeGenericHelmChart, upgradeGenericHelmChart, } from 'src/lib/helm_deploy' -import { execCmdWithExitOnFailure } from '../cmd-utils' import { BaseOracleDeployer } from './base' // Oracle RBAC------ @@ -63,17 +62,9 @@ export abstract class RbacOracleDeployer extends BaseOracleDeployer { } async rbacServiceAccountSecretNames() { - const names = [...Array(this.replicas).keys()].map((i) => `${this.rbacReleaseName()}-${i}`) - let jsonSecretPath = '"{.items[*].secrets[0][\'name\']}"' - if (names.length === 1) { - jsonSecretPath = '"{.secrets[0][\'name\']}"' - } - const [tokenName] = await execCmdWithExitOnFailure( - `kubectl get serviceaccount --namespace=${this.celoEnv} ${names.join( - ' ' - )} -o=jsonpath=${jsonSecretPath}` - ) - return tokenName.trim().split(' ') + return [...Array(this.replicas).keys()].map((i) => { + return `${this.rbacReleaseName()}-secret-${i}` + }) } rbacReleaseName() { diff --git a/packages/helm-charts/oracle-rbac/Chart.yaml b/packages/helm-charts/oracle-rbac/Chart.yaml index 9e47eb76691..4f10fc0d1a3 100644 --- a/packages/helm-charts/oracle-rbac/Chart.yaml +++ b/packages/helm-charts/oracle-rbac/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "1.0" +appVersion: '1.0' description: A Helm chart to get the RBAC token needed by the oracle to reach the K8s API server name: oracle-rbac -version: 0.2.0 +version: 0.3.0 diff --git a/packages/helm-charts/oracle-rbac/templates/_helper.tpl b/packages/helm-charts/oracle-rbac/templates/_helper.tpl index d8c548e1fc4..75e25d060b7 100644 --- a/packages/helm-charts/oracle-rbac/templates/_helper.tpl +++ b/packages/helm-charts/oracle-rbac/templates/_helper.tpl @@ -2,6 +2,10 @@ {{- .Values.environment.name -}}-{{- .Values.environment.currencyPair | lower -}}-oracle-rbac-{{- .index -}} {{- end -}} +{{- define "secret-name" -}} +{{- .Values.environment.name -}}-{{- .Values.environment.currencyPair | lower -}}-oracle-rbac-secret-{{- .index -}} +{{- end -}} + {{- define "oracle-pod-name" -}} {{- .Values.environment.name -}}-{{- .Values.environment.currencyPair | lower -}}-oracle-{{- .index -}} {{- end -}} diff --git a/packages/helm-charts/oracle-rbac/templates/secret.yaml b/packages/helm-charts/oracle-rbac/templates/secret.yaml new file mode 100644 index 00000000000..b2bbda2cbad --- /dev/null +++ b/packages/helm-charts/oracle-rbac/templates/secret.yaml @@ -0,0 +1,11 @@ +{{ range $index, $e := until (.Values.oracle.replicas | int) }} +{{- $index_counter := (dict "Values" $.Values "index" $index) -}} +apiVersion: v1 +kind: Secret +type: kubernetes.io/service-account-token +metadata: + name: {{ template "secret-name" $index_counter }} + annotations: + kubernetes.io/service-account.name: {{ template "name" $index_counter }} +--- +{{ end }} diff --git a/packages/helm-charts/oracle/Chart.yaml b/packages/helm-charts/oracle/Chart.yaml index f8011e8d942..01ca063f2e0 100644 --- a/packages/helm-charts/oracle/Chart.yaml +++ b/packages/helm-charts/oracle/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 -appVersion: "1.0" +appVersion: '1.0' description: A Helm chart for the oracle client name: oracle -version: 0.2.0 +version: 0.2.1 dependencies: - name: common repository: oci://us-west1-docker.pkg.dev/devopsre/clabs-public-oci - version: 0.2.0 \ No newline at end of file + version: 0.2.0 From 3a68b1aa19c18d1c004035e9fd9c5083e43b1d2d Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Thu, 3 Aug 2023 14:41:28 +0200 Subject: [PATCH 08/24] Add EUROC/EUR config --- packages/helm-charts/oracle/EUROCEUR.yaml | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/helm-charts/oracle/EUROCEUR.yaml diff --git a/packages/helm-charts/oracle/EUROCEUR.yaml b/packages/helm-charts/oracle/EUROCEUR.yaml new file mode 100644 index 00000000000..26c980159a7 --- /dev/null +++ b/packages/helm-charts/oracle/EUROCEUR.yaml @@ -0,0 +1,35 @@ +####################################################### +# Note: this configuration is for testnet usage only! # +####################################################### +oracle: + currencyPair: EUROCEUR + aggregation: + mid: + maxExchangeVolumeShare: 1 + maxPercentageDeviation: 0.01 + maxPercentageBidAskSpread: 0.005 + metrics: + enabled: true + prometheusPort: 9090 + apiRequestTimeoutMs: 5000 + circuitBreakerPriceChangeThreshold: 0.25 + gasPriceMultiplier: 1.5 + priceSources: " + [ + [ + {exchange: 'COINBASE', symbol: 'EUROCEUR', toInvert: false} + ], + [ + {exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false} + ], + [ + {exchange: 'BITMART', symbol: 'EUROCUSDC', toInvert: false}, + {exchange: 'COINBASE', symbol: 'USDCEUR', toInvert: false} + ] + ] + " + minPriceSourceCount: 1 + reportStrategy: BLOCK_BASED + reporter: + blockBased: + minReportPriceChangeThreshold: 0.0005 # 0.05% From 818a562c310abe307aceb35c95f6ba40a9a3881c Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Thu, 3 Aug 2023 14:44:52 +0200 Subject: [PATCH 09/24] Add XOF/EUR config --- packages/helm-charts/oracle/XOFEUR.yaml | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/helm-charts/oracle/XOFEUR.yaml diff --git a/packages/helm-charts/oracle/XOFEUR.yaml b/packages/helm-charts/oracle/XOFEUR.yaml new file mode 100644 index 00000000000..eac2936ef89 --- /dev/null +++ b/packages/helm-charts/oracle/XOFEUR.yaml @@ -0,0 +1,28 @@ +####################################################### +# Note: this configuration is for testnet usage only! # +####################################################### +oracle: + currencyPair: XOFEUR + aggregation: + mid: + maxExchangeVolumeShare: 1 + maxPercentageDeviation: 0.05 + maxPercentageBidAskSpread: 0.025 + metrics: + enabled: true + prometheusPort: 9090 + apiRequestTimeoutMs: 5000 + circuitBreakerPriceChangeThreshold: 0.25 + gasPriceMultiplier: 1.5 + priceSources: " + [ + [ + {exchange: 'ALPHAVANTAGE', symbol: 'XOFEUR', toInvert: false} + ] + ] + " + minPriceSourceCount: 1 + reportStrategy: BLOCK_BASED + reporter: + blockBased: + minReportPriceChangeThreshold: 0.0005 # 0.05% From b5ccd8c50307e33e30f7be27b9d2b01b3ebdd045 Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Thu, 3 Aug 2023 15:44:11 +0200 Subject: [PATCH 10/24] Add CELO/XOF config --- packages/helm-charts/oracle/CELOXOF.yaml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/helm-charts/oracle/CELOXOF.yaml diff --git a/packages/helm-charts/oracle/CELOXOF.yaml b/packages/helm-charts/oracle/CELOXOF.yaml new file mode 100644 index 00000000000..66a30531cc9 --- /dev/null +++ b/packages/helm-charts/oracle/CELOXOF.yaml @@ -0,0 +1,35 @@ +oracle: + currencyPair: CELOXOF + aggregation: + mid: + maxExchangeVolumeShare: 1 + maxPercentageDeviation: 0.025 + maxPercentageBidAskSpread: 0.015 + metrics: + enabled: true + prometheusPort: 9090 + apiRequestTimeoutMs: 5000 + circuitBreakerPriceChangeThreshold: 0.25 + gasPriceMultiplier: 1.5 + priceSources: " + [ + [ + {exchange: 'COINBASE', symbol: 'CELOUSD', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'USDXOF', toInvert: false} + ], + [ + {exchange: 'COINBASE', symbol: 'CELOEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'XOFEUR', toInvert: true} + ], + [ + {exchange: 'COINBASE', symbol: 'CELOBTC', toInvert: false}, + {exchange: 'COINBASE', symbol: 'BTCUSD', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'USDXOF', toInvert: false} + ] + ] + " + minPriceSourceCount: 1 + reportStrategy: BLOCK_BASED + reporter: + blockBased: + minReportPriceChangeThreshold: 0.005 From 7238aa61cbc35bde90af2bd759578679383174b7 Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Thu, 3 Aug 2023 15:46:01 +0200 Subject: [PATCH 11/24] fix: wrong XOF pair in celotool list --- packages/celotool/src/lib/oracle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/celotool/src/lib/oracle.ts b/packages/celotool/src/lib/oracle.ts index 8a42599eb16..b375c493f5d 100644 --- a/packages/celotool/src/lib/oracle.ts +++ b/packages/celotool/src/lib/oracle.ts @@ -311,7 +311,7 @@ export function addCurrencyPairMiddleware(argv: yargs.Argv) { 'USDCEUR', 'USDCBRL', 'CELOXOF', - 'EUROCXOF', + 'XOFEUR', 'EUROCEUR', ], description: 'Oracle deployment to target based on currency pair', From 0168524b3bb07f4d3e7c8cdab99fe4f97f504c8b Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Fri, 11 Aug 2023 18:39:39 +0200 Subject: [PATCH 12/24] EUROC config for baklava --- .env.baklava | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.env.baklava b/.env.baklava index 5e75701ce7d..e5cd98e8116 100644 --- a/.env.baklava +++ b/.env.baklava @@ -64,6 +64,7 @@ AZURE_ORACLE_WESTUS2_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x86f9c87d13347e604 AZURE_ORACLE_WESTUS2_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x97ef27cf3ce65b2558161aeb1e3cff8b5f71fd04:baklava-usdcusd-oracle1:baklava-oracles-westus2,0x559702d23983eb29bcf30f2487d477945c0dbc6a:baklava-usdcusd-oracle3:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8a2d375ae246e305c14c88e6687ff06acd66c9ba:baklava-brlusdc-oracle2:baklava-oracles-westus2,0x72434eca70d5544f8178c1a769762c8c1f0fd940:baklava-brlusdc-oracle5:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x99ce1e35574802e29644ee7a8284f9987fceee3d:baklava-eurusdc-oracle6:baklava-oracles-westus2,0x4c37e2cc2e9105984fef866a3f06aa953cc660d1:baklava-eurusdc-oracle7:baklava-oracles-westus2 +AZURE_ORACLE_WESTUS2_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6866e306b32acae7310d3b87dd53fc948f0e0629:baklava-euroceur-oracle2:baklava-oracles-westus2,0xe33502b13be6e0444a08de933faa24a59ae9b585:baklava-euroceur-oracle3:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_FULL_NODES_COUNT=2 AZURE_ORACLE_WESTUS2_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS2_FULL_NODES_DISK_SIZE=30 @@ -86,6 +87,7 @@ AZURE_ORACLE_CENTRALUS_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xe467003845bdcbe AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6a0e5d8a496feb59464028250c88a08341ea0831:baklava-usdcusd-oracle0:baklava-oracles-centralus,0xb15833400aecc72cb759d4e57a3a5a9c2963a5c5:baklava-usdcusd-oracle2:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa326d557b79422952d708d4eea8523d29b7174ec:baklava-brlusdc-oracle0:baklava-oracles-centralus,0xe73b1f39d1289e608df9a055c459b909f4bc1592:baklava-brlusdc-oracle1:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa6a5ae0c1c6b0ed52f2c6bb5666b61cfa86ac3ae:baklava-eurusdc-oracle4:baklava-oracles-centralus,0x2679be4034f47219bf9dfcbfb55bad60fe741315:baklava-eurusdc-oracle5:baklava-oracles-centralus +AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9a0613e8a1ff6cfd72ab692e6b450fbf02deba81:baklava-euroceur-oracle0:baklava-oracles-centralus,0xbe4bbd15177e2857c7c3297da12331033eeacd93:baklava-euroceur-oracle1:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 From dc5a1e0ce4f4649975c1817e3fb780a0df3581fd Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Thu, 17 Aug 2023 14:44:16 +0200 Subject: [PATCH 13/24] chore: configure env files --- .env.alfajores | 5 ++++- .env.baklava | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index 6e20958a934..fc2df8fbe33 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -31,7 +31,7 @@ CELOSTATS_BANNED_ADDRESSES="" CELOSTATS_RESERVED_ADDRESSES="" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.4" +ORACLE_DOCKER_IMAGE_TAG="72dac75" AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e @@ -45,6 +45,9 @@ AZURE_ORACLE_CENTRALUS_CELOBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 diff --git a/.env.baklava b/.env.baklava index e5cd98e8116..07a95ca1fe1 100644 --- a/.env.baklava +++ b/.env.baklava @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone" CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.4" +ORACLE_DOCKER_IMAGE_TAG="72dac75" # ---- Full Node Chain Restore ---- @@ -65,6 +65,8 @@ AZURE_ORACLE_WESTUS2_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x97ef27cf3ce65b255 AZURE_ORACLE_WESTUS2_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8a2d375ae246e305c14c88e6687ff06acd66c9ba:baklava-brlusdc-oracle2:baklava-oracles-westus2,0x72434eca70d5544f8178c1a769762c8c1f0fd940:baklava-brlusdc-oracle5:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x99ce1e35574802e29644ee7a8284f9987fceee3d:baklava-eurusdc-oracle6:baklava-oracles-westus2,0x4c37e2cc2e9105984fef866a3f06aa953cc660d1:baklava-eurusdc-oracle7:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6866e306b32acae7310d3b87dd53fc948f0e0629:baklava-euroceur-oracle2:baklava-oracles-westus2,0xe33502b13be6e0444a08de933faa24a59ae9b585:baklava-euroceur-oracle3:baklava-oracles-westus2 +AZURE_ORACLE_WESTUS2_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x19e287aeb860696f31b63bdcf40d9dd0221203dc:baklava-xofeur-oracle2,0x78de3af00f94a12f4afb41f88e738b2a36cc0940:baklava-xofeur-oracle3 +AZURE_ORACLE_WESTUS2_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x96eda2cad69c8cd1daeb80da86d24825f45f46b7:baklava-celoxof-oracle2,0x4e9d441fd1c77222395a1853d851fea8a0e3aed8:baklava-celoxof-oracle3 AZURE_ORACLE_WESTUS2_FULL_NODES_COUNT=2 AZURE_ORACLE_WESTUS2_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS2_FULL_NODES_DISK_SIZE=30 @@ -88,6 +90,8 @@ AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6a0e5d8a496feb5 AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa326d557b79422952d708d4eea8523d29b7174ec:baklava-brlusdc-oracle0:baklava-oracles-centralus,0xe73b1f39d1289e608df9a055c459b909f4bc1592:baklava-brlusdc-oracle1:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa6a5ae0c1c6b0ed52f2c6bb5666b61cfa86ac3ae:baklava-eurusdc-oracle4:baklava-oracles-centralus,0x2679be4034f47219bf9dfcbfb55bad60fe741315:baklava-eurusdc-oracle5:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9a0613e8a1ff6cfd72ab692e6b450fbf02deba81:baklava-euroceur-oracle0:baklava-oracles-centralus,0xbe4bbd15177e2857c7c3297da12331033eeacd93:baklava-euroceur-oracle1:baklava-oracles-centralus +AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x546f928a61b9e56139bf279a5a5fa526ccdb243e:baklava-xofeur-oracle0,0x38727d83423a22324d32249f1f4728a27686dd0a:baklava-xofeur-oracle1 +AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd056a29e86161a34692c34f4c95933b59de077dc:baklava-celoxof-oracle0,0x5ad07f89176298ae3a0f3d20d0b4a756307d46e7:baklava-celoxof-oracle1 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 From 34267ae32627fe34ba6582c2354a319efaf7b76a Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Thu, 17 Aug 2023 15:58:27 +0200 Subject: [PATCH 14/24] chore: latest image --- .env.alfajores | 2 +- .env.baklava | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index fc2df8fbe33..96707c88067 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -31,7 +31,7 @@ CELOSTATS_BANNED_ADDRESSES="" CELOSTATS_RESERVED_ADDRESSES="" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="72dac75" +ORACLE_DOCKER_IMAGE_TAG="66563c9" AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e diff --git a/.env.baklava b/.env.baklava index 07a95ca1fe1..3474d07ee3d 100644 --- a/.env.baklava +++ b/.env.baklava @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone" CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="72dac75" +ORACLE_DOCKER_IMAGE_TAG="66563c9" # ---- Full Node Chain Restore ---- From 883c1996377552e28ce83f316f9694e792be775a Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Fri, 18 Aug 2023 14:58:18 +0200 Subject: [PATCH 15/24] feat: add helm chart for EURXOF --- packages/helm-charts/oracle/EURXOF.yaml | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/helm-charts/oracle/EURXOF.yaml diff --git a/packages/helm-charts/oracle/EURXOF.yaml b/packages/helm-charts/oracle/EURXOF.yaml new file mode 100644 index 00000000000..872febfceba --- /dev/null +++ b/packages/helm-charts/oracle/EURXOF.yaml @@ -0,0 +1,28 @@ +####################################################### +# Note: this configuration is for testnet usage only! # +####################################################### +oracle: + currencyPair: EURXOF + aggregation: + mid: + maxExchangeVolumeShare: 1 + maxPercentageDeviation: 0.05 + maxPercentageBidAskSpread: 0.025 + metrics: + enabled: true + prometheusPort: 9090 + apiRequestTimeoutMs: 5000 + circuitBreakerPriceChangeThreshold: 0.25 + gasPriceMultiplier: 1.5 + priceSources: " + [ + [ + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false} + ] + ] + " + minPriceSourceCount: 1 + reportStrategy: BLOCK_BASED + reporter: + blockBased: + minReportPriceChangeThreshold: 0.0005 # 0.05% From 50c4fe31472e507be7f657823d6ba0b138c4bce6 Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Tue, 29 Aug 2023 15:14:28 +0200 Subject: [PATCH 16/24] chore: deploy euroceur and xofeur --- .env.alfajores | 3 ++- .env.baklava | 4 +++- .env.rc1 | 4 +++- packages/celotool/src/lib/oracle.ts | 1 + packages/helm-charts/oracle/EUROCEUR.yaml | 24 ++++++++++------------- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index 96707c88067..348003aaa86 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -31,7 +31,7 @@ CELOSTATS_BANNED_ADDRESSES="" CELOSTATS_RESERVED_ADDRESSES="" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="66563c9" +ORACLE_DOCKER_IMAGE_TAG="1.0.6" AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e @@ -48,6 +48,7 @@ AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 diff --git a/.env.baklava b/.env.baklava index 3474d07ee3d..1e8de5c04fc 100644 --- a/.env.baklava +++ b/.env.baklava @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone" CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="66563c9" +ORACLE_DOCKER_IMAGE_TAG="1.0.6" # ---- Full Node Chain Restore ---- @@ -67,6 +67,7 @@ AZURE_ORACLE_WESTUS2_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x99ce1e35574802e29 AZURE_ORACLE_WESTUS2_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6866e306b32acae7310d3b87dd53fc948f0e0629:baklava-euroceur-oracle2:baklava-oracles-westus2,0xe33502b13be6e0444a08de933faa24a59ae9b585:baklava-euroceur-oracle3:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x19e287aeb860696f31b63bdcf40d9dd0221203dc:baklava-xofeur-oracle2,0x78de3af00f94a12f4afb41f88e738b2a36cc0940:baklava-xofeur-oracle3 AZURE_ORACLE_WESTUS2_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x96eda2cad69c8cd1daeb80da86d24825f45f46b7:baklava-celoxof-oracle2,0x4e9d441fd1c77222395a1853d851fea8a0e3aed8:baklava-celoxof-oracle3 +AZURE_ORACLE_WESTUS2_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x7fe5f297dd812ca21e7bf1cbf145a0b59227b35f:baklava-eurxof-oracle2,0x2addc69c2ce3a9d93a8291419319bf7f0a2c6c82:baklava-eurxof-oracle3 AZURE_ORACLE_WESTUS2_FULL_NODES_COUNT=2 AZURE_ORACLE_WESTUS2_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS2_FULL_NODES_DISK_SIZE=30 @@ -92,6 +93,7 @@ AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa6a5ae0c1c6b0ed AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9a0613e8a1ff6cfd72ab692e6b450fbf02deba81:baklava-euroceur-oracle0:baklava-oracles-centralus,0xbe4bbd15177e2857c7c3297da12331033eeacd93:baklava-euroceur-oracle1:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x546f928a61b9e56139bf279a5a5fa526ccdb243e:baklava-xofeur-oracle0,0x38727d83423a22324d32249f1f4728a27686dd0a:baklava-xofeur-oracle1 AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd056a29e86161a34692c34f4c95933b59de077dc:baklava-celoxof-oracle0,0x5ad07f89176298ae3a0f3d20d0b4a756307d46e7:baklava-celoxof-oracle1 +AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa4a46db00840e6525ffe79aee5990abaebb7479d:baklava-eurxof-oracle0,0x6e537c9462ed968ff08eab430c5f8c11eab7df1a:baklava-eurxof-oracle1 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 diff --git a/.env.rc1 b/.env.rc1 index a05b1496280..c474428f125 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -52,7 +52,7 @@ CELOCLI_STANDALONE_IMAGE_TAG="0.0.42" MOCK_ORACLE_CRON_SCHEDULE="*/5 * * * *" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.4" +ORACLE_DOCKER_IMAGE_TAG="1.0.6" ORACLE_UNUSED_ORACLE_ADDRESSES=0xB93Fe7906ea4221b3fbe23412D18Ab1B07FE2F71,0x8d25D74E43789079Ef3C6B965c3D22b63A1233aC,0xCD88Cc79342a7cFE78E91FAa173eC87704bDcA9a,0x5091110175318A2A8aF88309D1648c1D84d31B29,0xBBd6e54Af7A5722f42461C6313F37Bd50729F195,0xE23a4c6615669526Ab58E9c37088bee4eD2b2dEE @@ -83,6 +83,7 @@ AZURE_ORACLE_WESTUS_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x57d8a7bf9e7f4113c4 AZURE_ORACLE_WESTUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x2986c21824c9b804d170270a316ceb07149f79c5:mainnet-usdcusd-wus0,0x09e2e47bb5df7b3464407746970a65c7b02883b3:mainnet-usdcusd-wus1,0xd5e7454932f6e853af849f70044570b62ca2596e:mainnet-usdcusd-wus2,0xfe3276b7142dee2cda34b1d14852eb32f436483d:mainnet-usdcusd-wus3 AZURE_ORACLE_WESTUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xeccd1e9439094d025ac7d08d16b0bfe0da3bea53:mainnet-usdceur-wus0,0x9b242d2bd848fc92060ca7546033c3af352583d2:mainnet-usdceur-wus1,0x905ab001a9199d45c3f5c7b055b65ace5fc7d70a:mainnet-usdceur-wus2,0xdf5dd31d8f78520185d6a9fb0498c4bbddfe0708:mainnet-usdceur-wus3 AZURE_ORACLE_WESTUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8dba01f832c7b0bb5f0bad4efe181cc07f8b322e:mainnet-usdcbrl-wus0,0xffb417d009d09bd1140244e70babbaa52d69ec84:mainnet-usdcbrl-wus1,0x5f755b8350a2e6b8b042cb3e052580e4c5b0ac35:mainnet-usdcbrl-wus2,0x8e1349b48ee82ef5437c912662e6640f3590c6f9:mainnet-usdcbrl-wus3 +AZURE_ORACLE_WESTUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6e7c84f83778569016ea0a7f6f119d6b779eed17:mainnet-euroceur-wus0,0xf96bf6c3b9ea73150f0d7f452fba685ff456c322:mainnet-euroceur-wus1,0xc5bf0748538f8673691bc9c8e4eae386d5987559:mainnet-euroceur-wus2,0xe868cd23a3941dfbab10597b103313706a027191:mainnet-euroceur-wus3 AZURE_ORACLE_WESTUS_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS_FULL_NODES_DISK_SIZE=100 @@ -105,6 +106,7 @@ AZURE_ORACLE_WESTEUROPE_CELOBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x3b91bbb873f3b9 AZURE_ORACLE_WESTEUROPE_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x477185291403ca2ed5f56d59ed0d568a16222013:mainnet-usdcusd-weu0,0x9a0a52d483c62df76d54f41ab3283cc7cb41ba91:mainnet-usdcusd-weu1,0x2ddb86898a2c2c884fc5cc3ca344898b0170a00d:mainnet-usdcusd-weu2,0x79be0a692e3a4bcd22b96c3e93a108b485becbb2:mainnet-usdcusd-weu3 AZURE_ORACLE_WESTEUROPE_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0781f530100e619936f5b427263441cb0414f885:mainnet-usdceur-weu0,0x55de75fd0c2b37987757172fef7ba2ea935d284d:mainnet-usdceur-weu1,0xdc0c15fa73b13b2e74cd3eced23d8826569904c5:mainnet-usdceur-weu2,0x9048872f739cebbe72825763a1b72064c4df8f1f:mainnet-usdceur-weu3 AZURE_ORACLE_WESTEUROPE_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x42b813b9ff8ce8f4837accea26bedda20d7c4982:mainnet-usdcbrl-weu0,0x09208127500963ee1c3af88bfbb3ef0cd34d6eb0:mainnet-usdcbrl-weu1,0xa8f5be092a8452eab98ed1c220d642114bb2731e:mainnet-usdcbrl-weu2,0xfd265c994a5a9c2847fe03a5e878648963f53a37:mainnet-usdcbrl-weu3 +AZURE_ORACLE_WESTEUROPE_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa633c79ac2c6881c0898b2b417a3aecda6f9eb10:mainnet-euroceur-weu0,0xbc32b5e6682bd7b64e52bdceead83f597ed0fd77:mainnet-euroceur-weu1,0x110d08157ed0c525f7fd983a857180583767cbcf:mainnet-euroceur-weu2,0xa8c15faf676df18566c4b8c4c653e5f992e687bb:mainnet-euroceur-weu3 AZURE_ORACLE_WESTEUROPE_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTEUROPE_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTEUROPE_FULL_NODES_DISK_SIZE=100 diff --git a/packages/celotool/src/lib/oracle.ts b/packages/celotool/src/lib/oracle.ts index b375c493f5d..96fdc7002ef 100644 --- a/packages/celotool/src/lib/oracle.ts +++ b/packages/celotool/src/lib/oracle.ts @@ -313,6 +313,7 @@ export function addCurrencyPairMiddleware(argv: yargs.Argv) { 'CELOXOF', 'XOFEUR', 'EUROCEUR', + 'EURXOF', ], description: 'Oracle deployment to target based on currency pair', demandOption: true, diff --git a/packages/helm-charts/oracle/EUROCEUR.yaml b/packages/helm-charts/oracle/EUROCEUR.yaml index 26c980159a7..436723b8238 100644 --- a/packages/helm-charts/oracle/EUROCEUR.yaml +++ b/packages/helm-charts/oracle/EUROCEUR.yaml @@ -1,6 +1,3 @@ -####################################################### -# Note: this configuration is for testnet usage only! # -####################################################### oracle: currencyPair: EUROCEUR aggregation: @@ -14,22 +11,21 @@ oracle: apiRequestTimeoutMs: 5000 circuitBreakerPriceChangeThreshold: 0.25 gasPriceMultiplier: 1.5 - priceSources: " - [ + priceSources: "[ [ {exchange: 'COINBASE', symbol: 'EUROCEUR', toInvert: false} ], [ - {exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false} - ], + {exchange: 'COINBASE', symbol: 'EUROCUSD', toInvert: false}, + {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: true}, + {exchange: 'COINBASE', symbol: 'USDTEUR', toInvert: false} + ], [ - {exchange: 'BITMART', symbol: 'EUROCUSDC', toInvert: false}, - {exchange: 'COINBASE', symbol: 'USDCEUR', toInvert: false} - ] - ] - " - minPriceSourceCount: 1 + {exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false}, + ] + ]" + minPriceSourceCount: 3 reportStrategy: BLOCK_BASED reporter: blockBased: - minReportPriceChangeThreshold: 0.0005 # 0.05% + minReportPriceChangeThreshold: 0.0005 # 0.05% \ No newline at end of file From 3da95f050339aaca8abe5818b60218250550098b Mon Sep 17 00:00:00 2001 From: boqdan Date: Wed, 6 Sep 2023 17:43:37 +0200 Subject: [PATCH 17/24] feat: add url for light nodes --- packages/celotool/src/lib/endpoints.ts | 8 ++++++++ packages/celotool/src/lib/k8s-oracle/base.ts | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/celotool/src/lib/endpoints.ts b/packages/celotool/src/lib/endpoints.ts index a0d899c3685..6cf910396aa 100644 --- a/packages/celotool/src/lib/endpoints.ts +++ b/packages/celotool/src/lib/endpoints.ts @@ -39,3 +39,11 @@ export function getFullNodeHttpRpcInternalUrl(celoEnv: string) { export function getFullNodeWebSocketRpcInternalUrl(celoEnv: string) { return `ws://${celoEnv}-fullnodes-rpc.${celoEnv}.svc.cluster.local:8546` } + +export function getLightNodeHttpRpcInternalUrl(celoEnv: string) { + return `http://${celoEnv}-lightnodes-rpc.${celoEnv}.svc.cluster.local:8545` +} + +export function getLightNodeWebSocketRpcInternalUrl(celoEnv: string) { + return `ws://${celoEnv}-lightnodes-rpc.${celoEnv}.svc.cluster.local:8546` +} diff --git a/packages/celotool/src/lib/k8s-oracle/base.ts b/packages/celotool/src/lib/k8s-oracle/base.ts index a900f287305..0ee15ba31ac 100644 --- a/packages/celotool/src/lib/k8s-oracle/base.ts +++ b/packages/celotool/src/lib/k8s-oracle/base.ts @@ -1,8 +1,8 @@ import { getFornoUrl, getFornoWebSocketUrl, - getFullNodeHttpRpcInternalUrl, - getFullNodeWebSocketRpcInternalUrl, + getLightNodeHttpRpcInternalUrl, + getLightNodeWebSocketRpcInternalUrl, } from 'src/lib/endpoints' import { envVar, fetchEnv, fetchEnvOrFallback } from 'src/lib/env-utils' import { @@ -68,10 +68,10 @@ export abstract class BaseOracleDeployer { async helmParameters() { const httpRpcProviderUrl = this.deploymentConfig.useForno ? getFornoUrl(this.celoEnv) - : getFullNodeHttpRpcInternalUrl(this.celoEnv) + : getLightNodeHttpRpcInternalUrl(this.celoEnv) const wsRpcProviderUrl = this.deploymentConfig.useForno ? getFornoWebSocketUrl(this.celoEnv) - : getFullNodeWebSocketRpcInternalUrl(this.celoEnv) + : getLightNodeWebSocketRpcInternalUrl(this.celoEnv) return [ `--set oracle.api_keys=${fetchEnv(envVar.ORACLE_FX_ADAPTERS_API_KEYS)}`, `--set environment.name=${this.celoEnv}`, From 76af8a1c0c72256d542d184669b4ed1216f86365 Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Fri, 8 Sep 2023 18:03:14 +0200 Subject: [PATCH 18/24] updated charts, EUROCXOF support and api keys fix --- packages/celotool/src/lib/k8s-oracle/base.ts | 2 +- packages/celotool/src/lib/oracle.ts | 1 + packages/helm-charts/oracle/CELOXOF.yaml | 69 ++++++++++++++++---- packages/helm-charts/oracle/EUROCXOF.yaml | 50 ++++++++++++++ packages/helm-charts/oracle/EURXOF.yaml | 18 +++-- 5 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 packages/helm-charts/oracle/EUROCXOF.yaml diff --git a/packages/celotool/src/lib/k8s-oracle/base.ts b/packages/celotool/src/lib/k8s-oracle/base.ts index 0ee15ba31ac..e6ef12c8a0d 100644 --- a/packages/celotool/src/lib/k8s-oracle/base.ts +++ b/packages/celotool/src/lib/k8s-oracle/base.ts @@ -73,7 +73,7 @@ export abstract class BaseOracleDeployer { ? getFornoWebSocketUrl(this.celoEnv) : getLightNodeWebSocketRpcInternalUrl(this.celoEnv) return [ - `--set oracle.api_keys=${fetchEnv(envVar.ORACLE_FX_ADAPTERS_API_KEYS)}`, + `--set-literal oracle.api_keys=${fetchEnv(envVar.ORACLE_FX_ADAPTERS_API_KEYS)}`, `--set environment.name=${this.celoEnv}`, `--set image.repository=${fetchEnv(envVar.ORACLE_DOCKER_IMAGE_REPOSITORY)}`, `--set image.tag=${fetchEnv(envVar.ORACLE_DOCKER_IMAGE_TAG)}`, diff --git a/packages/celotool/src/lib/oracle.ts b/packages/celotool/src/lib/oracle.ts index 96fdc7002ef..55544927c6f 100644 --- a/packages/celotool/src/lib/oracle.ts +++ b/packages/celotool/src/lib/oracle.ts @@ -314,6 +314,7 @@ export function addCurrencyPairMiddleware(argv: yargs.Argv) { 'XOFEUR', 'EUROCEUR', 'EURXOF', + 'EUROCXOF', ], description: 'Oracle deployment to target based on currency pair', demandOption: true, diff --git a/packages/helm-charts/oracle/CELOXOF.yaml b/packages/helm-charts/oracle/CELOXOF.yaml index 66a30531cc9..5d77c32bfc9 100644 --- a/packages/helm-charts/oracle/CELOXOF.yaml +++ b/packages/helm-charts/oracle/CELOXOF.yaml @@ -11,24 +11,71 @@ oracle: apiRequestTimeoutMs: 5000 circuitBreakerPriceChangeThreshold: 0.25 gasPriceMultiplier: 1.5 - priceSources: " - [ + priceSources: "[ + [ + {exchange: 'BINANCE', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BINANCE', symbol: 'EURUSDT', toInvert: true}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'BINANCE', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BINANCE', symbol: 'EURUSDT', toInvert: true}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ {exchange: 'COINBASE', symbol: 'CELOUSD', toInvert: false}, - {exchange: 'ALPHAVANTAGE', symbol: 'USDXOF', toInvert: false} + {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: true}, + {exchange: 'COINBASE', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'COINBASE', symbol: 'CELOUSD', toInvert: false}, + {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: true}, + {exchange: 'COINBASE', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + + [ + {exchange: 'OKX', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BITSTAMP', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'OKX', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BITSTAMP', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + + [ + {exchange: 'KUCOIN', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'KRAKEN', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'KUCOIN', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'KRAKEN', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} ], + [ - {exchange: 'COINBASE', symbol: 'CELOEUR', toInvert: false}, - {exchange: 'ALPHAVANTAGE', symbol: 'XOFEUR', toInvert: true} + {exchange: 'BITGET', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BITGET', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} ], [ - {exchange: 'COINBASE', symbol: 'CELOBTC', toInvert: false}, - {exchange: 'COINBASE', symbol: 'BTCUSD', toInvert: false}, - {exchange: 'ALPHAVANTAGE', symbol: 'USDXOF', toInvert: false} + {exchange: 'BITGET', symbol: 'CELOUSDT', toInvert: false}, + {exchange: 'BITGET', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} ] - ] - " - minPriceSourceCount: 1 + ]" + # Additional sources missing adapters [ + # {exchange: 'UPBIT', symbol: 'CELOKRW', toInvert: false}, + # {exchange: 'UPBIT', symbol: 'BTCKRW', toInvert: true}, + # {exchange: 'KRAKEN', symbol: 'BTCEUR', toInvert: false}, + # {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + # ] + minPriceSourceCount: 6 reportStrategy: BLOCK_BASED reporter: blockBased: diff --git a/packages/helm-charts/oracle/EUROCXOF.yaml b/packages/helm-charts/oracle/EUROCXOF.yaml new file mode 100644 index 00000000000..fdaf47aed19 --- /dev/null +++ b/packages/helm-charts/oracle/EUROCXOF.yaml @@ -0,0 +1,50 @@ +oracle: + currencyPair: EUROCXOF + aggregation: + mid: + maxExchangeVolumeShare: 1 + maxPercentageDeviation: 0.01 + maxPercentageBidAskSpread: 0.005 + metrics: + enabled: true + prometheusPort: 9090 + apiRequestTimeoutMs: 5000 + circuitBreakerPriceChangeThreshold: 0.25 + gasPriceMultiplier: 1.5 + priceSources: "[ + [ + {exchange: 'COINBASE', symbol: 'EUROCEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'COINBASE', symbol: 'EUROCEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + + [ + {exchange: 'COINBASE', symbol: 'EUROCUSD', toInvert: false}, + {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: true}, + {exchange: 'COINBASE', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'COINBASE', symbol: 'EUROCUSD', toInvert: false}, + {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: true}, + {exchange: 'COINBASE', symbol: 'USDTEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + + [ + {exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false}, + {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ], + [ + {exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false}, + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true} + ] + ]" + minPriceSourceCount: 4 + reportStrategy: BLOCK_BASED + reporter: + blockBased: + minReportPriceChangeThreshold: 0.0005 # 0.05% diff --git a/packages/helm-charts/oracle/EURXOF.yaml b/packages/helm-charts/oracle/EURXOF.yaml index 872febfceba..53965c89910 100644 --- a/packages/helm-charts/oracle/EURXOF.yaml +++ b/packages/helm-charts/oracle/EURXOF.yaml @@ -1,27 +1,25 @@ -####################################################### -# Note: this configuration is for testnet usage only! # -####################################################### oracle: currencyPair: EURXOF aggregation: mid: maxExchangeVolumeShare: 1 - maxPercentageDeviation: 0.05 - maxPercentageBidAskSpread: 0.025 + maxPercentageDeviation: 0.01 + maxPercentageBidAskSpread: 0.005 metrics: enabled: true prometheusPort: 9090 apiRequestTimeoutMs: 5000 circuitBreakerPriceChangeThreshold: 0.25 gasPriceMultiplier: 1.5 - priceSources: " - [ + priceSources: "[ [ {exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false} + ], + [ + {exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false} ] - ] - " - minPriceSourceCount: 1 + ]" + minPriceSourceCount: 2 reportStrategy: BLOCK_BASED reporter: blockBased: From f5b9480d42bd4571f60f9cd2012736dcfbd4eaae Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Fri, 8 Sep 2023 18:03:53 +0200 Subject: [PATCH 19/24] EUROCXOF on Baklava and Alfajores --- .env.alfajores | 5 ++--- .env.baklava | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.env.alfajores b/.env.alfajores index 348003aaa86..287e05e0e5d 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -31,7 +31,7 @@ CELOSTATS_BANNED_ADDRESSES="" CELOSTATS_RESERVED_ADDRESSES="" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.6" +ORACLE_DOCKER_IMAGE_TAG="latest" AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e @@ -40,15 +40,14 @@ AZURE_ORACLE_CENTRALUS_KUBERNETES_CLUSTER_NAME=baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_AZURE_REGION_NAME=centralus AZURE_ORACLE_CENTRALUS_CELOUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_CELOEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 -AZURE_ORACLE_CENTRALUS_CELOBTC_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_CELOBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 -AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 +AZURE_ORACLE_CENTRALUS_EUROCXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 diff --git a/.env.baklava b/.env.baklava index 1e8de5c04fc..7be517d2d90 100644 --- a/.env.baklava +++ b/.env.baklava @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone" CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2" ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle" -ORACLE_DOCKER_IMAGE_TAG="1.0.6" +ORACLE_DOCKER_IMAGE_TAG="latest" # ---- Full Node Chain Restore ---- @@ -65,9 +65,9 @@ AZURE_ORACLE_WESTUS2_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x97ef27cf3ce65b255 AZURE_ORACLE_WESTUS2_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8a2d375ae246e305c14c88e6687ff06acd66c9ba:baklava-brlusdc-oracle2:baklava-oracles-westus2,0x72434eca70d5544f8178c1a769762c8c1f0fd940:baklava-brlusdc-oracle5:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x99ce1e35574802e29644ee7a8284f9987fceee3d:baklava-eurusdc-oracle6:baklava-oracles-westus2,0x4c37e2cc2e9105984fef866a3f06aa953cc660d1:baklava-eurusdc-oracle7:baklava-oracles-westus2 AZURE_ORACLE_WESTUS2_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6866e306b32acae7310d3b87dd53fc948f0e0629:baklava-euroceur-oracle2:baklava-oracles-westus2,0xe33502b13be6e0444a08de933faa24a59ae9b585:baklava-euroceur-oracle3:baklava-oracles-westus2 -AZURE_ORACLE_WESTUS2_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x19e287aeb860696f31b63bdcf40d9dd0221203dc:baklava-xofeur-oracle2,0x78de3af00f94a12f4afb41f88e738b2a36cc0940:baklava-xofeur-oracle3 AZURE_ORACLE_WESTUS2_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x96eda2cad69c8cd1daeb80da86d24825f45f46b7:baklava-celoxof-oracle2,0x4e9d441fd1c77222395a1853d851fea8a0e3aed8:baklava-celoxof-oracle3 AZURE_ORACLE_WESTUS2_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x7fe5f297dd812ca21e7bf1cbf145a0b59227b35f:baklava-eurxof-oracle2,0x2addc69c2ce3a9d93a8291419319bf7f0a2c6c82:baklava-eurxof-oracle3 +AZURE_ORACLE_WESTUS2_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x729e058e97c099c79af674bbe2f687171432dd17:baklava-eurocxof-oracle2,0xd226aa9ee80ee282339c1ae69f3f811dbe5d895a:baklava-eurocxof-oracle4 AZURE_ORACLE_WESTUS2_FULL_NODES_COUNT=2 AZURE_ORACLE_WESTUS2_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS2_FULL_NODES_DISK_SIZE=30 @@ -91,9 +91,9 @@ AZURE_ORACLE_CENTRALUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6a0e5d8a496feb5 AZURE_ORACLE_CENTRALUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa326d557b79422952d708d4eea8523d29b7174ec:baklava-brlusdc-oracle0:baklava-oracles-centralus,0xe73b1f39d1289e608df9a055c459b909f4bc1592:baklava-brlusdc-oracle1:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa6a5ae0c1c6b0ed52f2c6bb5666b61cfa86ac3ae:baklava-eurusdc-oracle4:baklava-oracles-centralus,0x2679be4034f47219bf9dfcbfb55bad60fe741315:baklava-eurusdc-oracle5:baklava-oracles-centralus AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9a0613e8a1ff6cfd72ab692e6b450fbf02deba81:baklava-euroceur-oracle0:baklava-oracles-centralus,0xbe4bbd15177e2857c7c3297da12331033eeacd93:baklava-euroceur-oracle1:baklava-oracles-centralus -AZURE_ORACLE_CENTRALUS_XOFEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x546f928a61b9e56139bf279a5a5fa526ccdb243e:baklava-xofeur-oracle0,0x38727d83423a22324d32249f1f4728a27686dd0a:baklava-xofeur-oracle1 AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd056a29e86161a34692c34f4c95933b59de077dc:baklava-celoxof-oracle0,0x5ad07f89176298ae3a0f3d20d0b4a756307d46e7:baklava-celoxof-oracle1 AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa4a46db00840e6525ffe79aee5990abaebb7479d:baklava-eurxof-oracle0,0x6e537c9462ed968ff08eab430c5f8c11eab7df1a:baklava-eurxof-oracle1 +AZURE_ORACLE_CENTRALUS_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x1a637c38671512866317475d19df5f55b0802276:baklava-eurocxof-oracle0,0x8589f0bb307581b96877f9e1a5ce3fcb05127fd0:baklava-eurocxof-oracle1 AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2 AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30 From b17a19c8518c7116f17b450f74aae400779e9102 Mon Sep 17 00:00:00 2001 From: Nelson Taveras Date: Fri, 8 Sep 2023 18:05:14 +0200 Subject: [PATCH 20/24] chore: remove XOFEUR config --- packages/helm-charts/oracle/XOFEUR.yaml | 28 ------------------------- 1 file changed, 28 deletions(-) delete mode 100644 packages/helm-charts/oracle/XOFEUR.yaml diff --git a/packages/helm-charts/oracle/XOFEUR.yaml b/packages/helm-charts/oracle/XOFEUR.yaml deleted file mode 100644 index eac2936ef89..00000000000 --- a/packages/helm-charts/oracle/XOFEUR.yaml +++ /dev/null @@ -1,28 +0,0 @@ -####################################################### -# Note: this configuration is for testnet usage only! # -####################################################### -oracle: - currencyPair: XOFEUR - aggregation: - mid: - maxExchangeVolumeShare: 1 - maxPercentageDeviation: 0.05 - maxPercentageBidAskSpread: 0.025 - metrics: - enabled: true - prometheusPort: 9090 - apiRequestTimeoutMs: 5000 - circuitBreakerPriceChangeThreshold: 0.25 - gasPriceMultiplier: 1.5 - priceSources: " - [ - [ - {exchange: 'ALPHAVANTAGE', symbol: 'XOFEUR', toInvert: false} - ] - ] - " - minPriceSourceCount: 1 - reportStrategy: BLOCK_BASED - reporter: - blockBased: - minReportPriceChangeThreshold: 0.0005 # 0.05% From dc3158ed56bfac80041feba145b86488bdd1f740 Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Fri, 22 Sep 2023 11:06:38 -0400 Subject: [PATCH 21/24] report exof once a min max --- packages/helm-charts/oracle/CELOXOF.yaml | 1 + packages/helm-charts/oracle/EUROCXOF.yaml | 1 + packages/helm-charts/oracle/EURXOF.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/helm-charts/oracle/CELOXOF.yaml b/packages/helm-charts/oracle/CELOXOF.yaml index 5d77c32bfc9..122fb468961 100644 --- a/packages/helm-charts/oracle/CELOXOF.yaml +++ b/packages/helm-charts/oracle/CELOXOF.yaml @@ -1,5 +1,6 @@ oracle: currencyPair: CELOXOF + overrideOracleCount: 12 # At 5s block time, every client reports once per minute aggregation: mid: maxExchangeVolumeShare: 1 diff --git a/packages/helm-charts/oracle/EUROCXOF.yaml b/packages/helm-charts/oracle/EUROCXOF.yaml index fdaf47aed19..b09447b9a5d 100644 --- a/packages/helm-charts/oracle/EUROCXOF.yaml +++ b/packages/helm-charts/oracle/EUROCXOF.yaml @@ -1,5 +1,6 @@ oracle: currencyPair: EUROCXOF + overrideOracleCount: 12 # At 5s block time, every client reports once per minute aggregation: mid: maxExchangeVolumeShare: 1 diff --git a/packages/helm-charts/oracle/EURXOF.yaml b/packages/helm-charts/oracle/EURXOF.yaml index 53965c89910..68cc0ab170b 100644 --- a/packages/helm-charts/oracle/EURXOF.yaml +++ b/packages/helm-charts/oracle/EURXOF.yaml @@ -1,5 +1,6 @@ oracle: currencyPair: EURXOF + overrideOracleCount: 12 # At 5s block time, every client reports once per minute aggregation: mid: maxExchangeVolumeShare: 1 From 746af8c5e750e08467a0dfb78daaea514760defa Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:34:11 -0400 Subject: [PATCH 22/24] add exof oracles mainnet hsm's --- .env.rc1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.env.rc1 b/.env.rc1 index c474428f125..dc77d8fb434 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -84,6 +84,9 @@ AZURE_ORACLE_WESTUS_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x2986c21824c9b804d1 AZURE_ORACLE_WESTUS_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xeccd1e9439094d025ac7d08d16b0bfe0da3bea53:mainnet-usdceur-wus0,0x9b242d2bd848fc92060ca7546033c3af352583d2:mainnet-usdceur-wus1,0x905ab001a9199d45c3f5c7b055b65ace5fc7d70a:mainnet-usdceur-wus2,0xdf5dd31d8f78520185d6a9fb0498c4bbddfe0708:mainnet-usdceur-wus3 AZURE_ORACLE_WESTUS_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x8dba01f832c7b0bb5f0bad4efe181cc07f8b322e:mainnet-usdcbrl-wus0,0xffb417d009d09bd1140244e70babbaa52d69ec84:mainnet-usdcbrl-wus1,0x5f755b8350a2e6b8b042cb3e052580e4c5b0ac35:mainnet-usdcbrl-wus2,0x8e1349b48ee82ef5437c912662e6640f3590c6f9:mainnet-usdcbrl-wus3 AZURE_ORACLE_WESTUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6e7c84f83778569016ea0a7f6f119d6b779eed17:mainnet-euroceur-wus0,0xf96bf6c3b9ea73150f0d7f452fba685ff456c322:mainnet-euroceur-wus1,0xc5bf0748538f8673691bc9c8e4eae386d5987559:mainnet-euroceur-wus2,0xe868cd23a3941dfbab10597b103313706a027191:mainnet-euroceur-wus3 +AZURE_ORACLE_WESTUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xce696d465dde582095fce8b67e1a31ceb45ad922:mainnet-celoxof-wus0,0xbc211b8dfecdd5784f9c419ce64f7de1377bae88:mainnet-celoxof-wus1,0xc659ab5c049b726c2945a8a44b783ce6afbd2ceb:mainnet-celoxof-wus2,0x9094bf2b2eb028c6fcc56e7d46ea28bb6e03c9a5:mainnet-celoxof-wus3,0xb947c54be882314623ee3d74684d0d785dd50335:mainnet-celoxof-wus4 +AZURE_ORACLE_WESTUS_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6a033b7217fbae843a3ffc9783ef9f87dd3a1c04:mainnet-eurxof-wus0,0x8a164c0523bbd7ec70172807723cca9a948858bb:mainnet-eurxof-wus1,0xd0066f198ed7f8dc3684ff3ac77511ef58a9aed3:mainnet-eurxof-wus2,0x441061f8b1f8ee2722d3608bfa0b5c4c14dee813:mainnet-eurxof-wus3,0x87089ec6adbf3c994ae7c47d3aa7d4fc104d0422:mainnet-eurxof-wus4 +AZURE_ORACLE_WESTUS_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xc5a86597d514b423579684cdf9f49b6df37e3689:mainnet-eurocxof-wus0,0x8e1423ca0bcb15093f52d1d07675e0aa04e3da75:mainnet-eurocxof-wus1,0xa47e6a8a7db5ee22b5293704a4f0f5f8fdaab06f:mainnet-eurocxof-wus2,0x77d148efdd40202d0eec787073a70c7f6bc9c485:mainnet-eurocxof-wus3,0xfef8748fd3f039fb8cfa77c7744b171f4396659c:mainnet-eurocxof-wus4 AZURE_ORACLE_WESTUS_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTUS_FULL_NODES_DISK_SIZE=100 @@ -107,6 +110,9 @@ AZURE_ORACLE_WESTEUROPE_USDCUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x477185291403ca AZURE_ORACLE_WESTEUROPE_USDCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0781f530100e619936f5b427263441cb0414f885:mainnet-usdceur-weu0,0x55de75fd0c2b37987757172fef7ba2ea935d284d:mainnet-usdceur-weu1,0xdc0c15fa73b13b2e74cd3eced23d8826569904c5:mainnet-usdceur-weu2,0x9048872f739cebbe72825763a1b72064c4df8f1f:mainnet-usdceur-weu3 AZURE_ORACLE_WESTEUROPE_USDCBRL_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x42b813b9ff8ce8f4837accea26bedda20d7c4982:mainnet-usdcbrl-weu0,0x09208127500963ee1c3af88bfbb3ef0cd34d6eb0:mainnet-usdcbrl-weu1,0xa8f5be092a8452eab98ed1c220d642114bb2731e:mainnet-usdcbrl-weu2,0xfd265c994a5a9c2847fe03a5e878648963f53a37:mainnet-usdcbrl-weu3 AZURE_ORACLE_WESTEUROPE_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa633c79ac2c6881c0898b2b417a3aecda6f9eb10:mainnet-euroceur-weu0,0xbc32b5e6682bd7b64e52bdceead83f597ed0fd77:mainnet-euroceur-weu1,0x110d08157ed0c525f7fd983a857180583767cbcf:mainnet-euroceur-weu2,0xa8c15faf676df18566c4b8c4c653e5f992e687bb:mainnet-euroceur-weu3 +AZURE_ORACLE_WESTEUROPE_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x4d89a0c95de82ae78c42fad4f8d3f87c4495fd37:mainnet-celoxof-weu0,0xa97dbefac6026f93cc5714c4c150b7466e9502ef:mainnet-celoxof-weu1,0x676931c73c8d6b09b0c192baf821e3fd2d693750:mainnet-celoxof-weu2,0xfb8f294c8cd98cf059672c1a6153f85555f10a90:mainnet-celoxof-weu3,0xb7614f7174a07028a5ff5e1adc68a031b646857f:mainnet-celoxof-weu4 +AZURE_ORACLE_WESTEUROPE_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd2c4f59724df51026f857a7e188b322e35256e24:mainnet-eurxof-weu0,0xe47c9867dbb37110834aaaf65b8d760c49c22081:mainnet-eurxof-weu1,0x9cb4896447a8f2611f5fb6f5fc853ffa16a1d864:mainnet-eurxof-weu2,0x0f9786b083c8c22e2e839286230098048a20a0ec:mainnet-eurxof-weu3,0xe01890c7760445908128f0e64e1170866566e1f6:mainnet-eurxof-weu4 +AZURE_ORACLE_WESTEUROPE_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xdda1d71f3d5a6090bc04b77a18925fab7054d9c3:mainnet-eurocxof-weu0,0xee1d05f81e90b8ece440de6141282404e83830ce:mainnet-eurocxof-weu1,0xff6e35c6119742fd1eb3db780d976c4e55585108:mainnet-eurocxof-weu2,0x59eac333453279e71a3a98b4b72bdfa99ca51ad3:mainnet-eurocxof-weu3,0x378b95092bed2acb0d3ae6ab9c045eef1c250872:mainnet-eurocxof-weu4 AZURE_ORACLE_WESTEUROPE_FULL_NODES_COUNT=5 AZURE_ORACLE_WESTEUROPE_FULL_NODES_ROLLING_UPDATE_PARTITION=0 AZURE_ORACLE_WESTEUROPE_FULL_NODES_DISK_SIZE=100 From 1b5230edf06025fb68994017de0f158fa5f1a587 Mon Sep 17 00:00:00 2001 From: Nadiem Sissouno Date: Thu, 5 Oct 2023 10:51:49 +0200 Subject: [PATCH 23/24] improved USDCUSD config --- packages/helm-charts/oracle/USDCUSD.yaml | 27 +++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/packages/helm-charts/oracle/USDCUSD.yaml b/packages/helm-charts/oracle/USDCUSD.yaml index 5a747b4b684..93c7daeee6a 100644 --- a/packages/helm-charts/oracle/USDCUSD.yaml +++ b/packages/helm-charts/oracle/USDCUSD.yaml @@ -3,7 +3,7 @@ oracle: aggregation: mid: maxExchangeVolumeShare: 1 - maxPercentageDeviation: 0.01 + maxPercentageDeviation: 0.005 maxPercentageBidAskSpread: 0.005 metrics: enabled: true @@ -11,23 +11,40 @@ oracle: apiRequestTimeoutMs: 5000 circuitBreakerPriceChangeThreshold: 0.25 gasPriceMultiplier: 1.5 - priceSources: "[ + priceSources: "[ + [ + {exchange: 'BINANCE', symbol: 'USDCUSDT', toInvert: false}, + {exchange: 'KRAKEN', symbol: 'USDTUSD', toInvert: false } + ], [ {exchange: 'KRAKEN', symbol: 'USDCUSD', toInvert: false} ], [ - {exchange: 'BINANCEUS', symbol: 'USDCUSD', toInvert: false} + {exchange: 'BITSTAMP', symbol: 'USDCUSD', toInvert: false} ], [ {exchange: 'COINBASE', symbol: 'USDTUSDC', toInvert: true}, {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: false} ], [ - {exchange: 'WHITEBIT', symbol: 'USDCUSDT', toInvert: false}, + {exchange: 'OKX', symbol: 'USDCUSDT', toInvert: false}, + {exchange: 'BITSTAMP', symbol: 'USDTUSD', toInvert: false} + ], + [ + {exchange: 'Bitget', symbol: 'USDTUSDC', toInvert: true}, + {exchange: 'Kraken', symbol: 'USDTUSD', toInvert: false} + ], + [ + {exchange: 'KUCOIN', symbol: 'USDCUSDT', toInvert: false}, {exchange: 'COINBASE', symbol: 'USDTUSD', toInvert: false} ] ]" - minPriceSourceCount: 2 + # Additional sources missing adapters + # [ + # {exchange: 'Bybit', symbol: 'USDTUSDC', toInvert: true}, + # {exchange: 'Kraken', symbol: 'USDTUSD', toInvert: false} + # ], + minPriceSourceCount: 5 reportStrategy: BLOCK_BASED reporter: blockBased: From e9e75ded31758493cc1649f2013247c1946e8971 Mon Sep 17 00:00:00 2001 From: Nadiem Sissouno Date: Thu, 5 Oct 2023 13:11:26 +0200 Subject: [PATCH 24/24] capitalize CEX names --- packages/helm-charts/oracle/USDCUSD.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/helm-charts/oracle/USDCUSD.yaml b/packages/helm-charts/oracle/USDCUSD.yaml index 93c7daeee6a..bdf4cdfa3ba 100644 --- a/packages/helm-charts/oracle/USDCUSD.yaml +++ b/packages/helm-charts/oracle/USDCUSD.yaml @@ -31,8 +31,8 @@ oracle: {exchange: 'BITSTAMP', symbol: 'USDTUSD', toInvert: false} ], [ - {exchange: 'Bitget', symbol: 'USDTUSDC', toInvert: true}, - {exchange: 'Kraken', symbol: 'USDTUSD', toInvert: false} + {exchange: 'BITGET', symbol: 'USDTUSDC', toInvert: true}, + {exchange: 'KRAKEN', symbol: 'USDTUSD', toInvert: false} ], [ {exchange: 'KUCOIN', symbol: 'USDCUSDT', toInvert: false},