Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eXOF helm charts, celotool changes and other adhoc fixes #10626

Merged
merged 29 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c5ff75c
chore: add usdcbrl and usdceur to rc1 config
ninabarbakadze Jul 11, 2023
e367cdc
Merge remote-tracking branch 'origin' into chore/configure-env-rc1
ninabarbakadze Jul 11, 2023
b790c5e
chore: upgrade all envs to 1.0.4
ninabarbakadze Aug 2, 2023
78e9858
chore: only leave related code
ninabarbakadze Aug 2, 2023
1c19ced
Merge branch 'master' into chore/upgrade-oracles-1.0.4
bowd Aug 10, 2023
cf018e8
fix: Fix api-keys secret k8s config
bowd Aug 10, 2023
9af6085
chore: remove env key from file
bowd Aug 10, 2023
dd0a1b9
fix: fix api-keys secret
bowd Aug 10, 2023
f612e7d
fix: move to manual service account secret creation for k8s 1.24+
bowd Aug 10, 2023
3a68b1a
Add EUROC/EUR config
Aug 3, 2023
818a562
Add XOF/EUR config
Aug 3, 2023
b5ccd8c
Add CELO/XOF config
Aug 3, 2023
7238aa6
fix: wrong XOF pair in celotool list
Aug 3, 2023
0168524
EUROC config for baklava
Aug 11, 2023
dc5a1e0
chore: configure env files
ninabarbakadze Aug 17, 2023
34267ae
chore: latest image
Aug 17, 2023
883c199
feat: add helm chart for EURXOF
ninabarbakadze Aug 18, 2023
50c4fe3
chore: deploy euroceur and xofeur
ninabarbakadze Aug 29, 2023
3da95f0
feat: add url for light nodes
bowd Sep 6, 2023
76af8a1
updated charts, EUROCXOF support and api keys fix
Sep 8, 2023
f5b9480
EUROCXOF on Baklava and Alfajores
Sep 8, 2023
b17a19c
chore: remove XOFEUR config
Sep 8, 2023
dc3158e
report exof once a min max
nvtaveras Sep 22, 2023
746af8c
add exof oracles mainnet hsm's
nvtaveras Sep 26, 2023
10540f6
Merge branch 'master' into feat/eXOFOracles
nvtaveras Sep 26, 2023
f773f4f
Merge branch 'master' into feat/eXOFOracles
nvtaveras Sep 29, 2023
1b5230e
improved USDCUSD config
Oct 5, 2023
e9e75de
capitalize CEX names
Oct 5, 2023
e00b78c
Merge branch 'master' into feat/eXOFOracles
nvtaveras Oct 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@ 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="latest"
nvtaveras marked this conversation as resolved.
Show resolved Hide resolved

AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c
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_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_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
Expand Down
10 changes: 9 additions & 1 deletion .env.baklava
Original file line number Diff line number Diff line change
Expand Up @@ -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="latest"
nvtaveras marked this conversation as resolved.
Show resolved Hide resolved

# ---- Full Node Chain Restore ----

Expand Down Expand Up @@ -64,6 +64,10 @@ 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_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
Expand All @@ -86,6 +90,10 @@ 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_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
Expand Down
10 changes: 9 additions & 1 deletion .env.rc1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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.6"

ORACLE_UNUSED_ORACLE_ADDRESSES=0xB93Fe7906ea4221b3fbe23412D18Ab1B07FE2F71,0x8d25D74E43789079Ef3C6B965c3D22b63A1233aC,0xCD88Cc79342a7cFE78E91FAa173eC87704bDcA9a,0x5091110175318A2A8aF88309D1648c1D84d31B29,0xBBd6e54Af7A5722f42461C6313F37Bd50729F195,0xE23a4c6615669526Ab58E9c37088bee4eD2b2dEE

Expand Down Expand Up @@ -76,6 +76,10 @@ 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_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
Expand All @@ -98,6 +102,10 @@ 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_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
Expand Down
8 changes: 8 additions & 0 deletions packages/celotool/src/lib/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
10 changes: 5 additions & 5 deletions packages/celotool/src/lib/k8s-oracle/base.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -68,12 +68,12 @@ 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-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)}`,
Expand Down
15 changes: 3 additions & 12 deletions packages/celotool/src/lib/k8s-oracle/rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
removeGenericHelmChart,
upgradeGenericHelmChart,
} from 'src/lib/helm_deploy'
import { execCmdWithExitOnFailure } from '../cmd-utils'
import { BaseOracleDeployer } from './base'

// Oracle RBAC------
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion packages/celotool/src/lib/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ export function addCurrencyPairMiddleware(argv: yargs.Argv) {
'USDCEUR',
'USDCBRL',
'CELOXOF',
'EUROCXOF',
'XOFEUR',
'EUROCEUR',
'EURXOF',
'EUROCXOF',
],
description: 'Oracle deployment to target based on currency pair',
demandOption: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/helm-charts/oracle-rbac/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/helm-charts/oracle-rbac/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
11 changes: 11 additions & 0 deletions packages/helm-charts/oracle-rbac/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
83 changes: 83 additions & 0 deletions packages/helm-charts/oracle/CELOXOF.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
oracle:
currencyPair: CELOXOF
overrideOracleCount: 12 # At 5s block time, every client reports once per minute
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: '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: '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: 'BITGET', symbol: 'CELOUSDT', toInvert: false},
{exchange: 'BITGET', symbol: 'USDTEUR', toInvert: false},
{exchange: 'ALPHAVANTAGE', symbol: 'EURXOF', toInvert: false, ignoreVolume: true}
],
[
{exchange: 'BITGET', symbol: 'CELOUSDT', toInvert: false},
{exchange: 'BITGET', symbol: 'USDTEUR', toInvert: false},
{exchange: 'CURRENCYAPI', symbol: 'EURXOF', toInvert: false, ignoreVolume: true}
]
]"
# 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:
minReportPriceChangeThreshold: 0.005
6 changes: 3 additions & 3 deletions packages/helm-charts/oracle/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
version: 0.2.0
3 changes: 1 addition & 2 deletions packages/helm-charts/oracle/EUROCEUR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ oracle:
[
{exchange: 'BITSTAMP', symbol: 'EUROCEUR', toInvert: false},
]

]"
minPriceSourceCount: 3
minPriceSourceCount: 2
reportStrategy: BLOCK_BASED
reporter:
blockBased:
Expand Down
Loading