diff --git a/.env b/.env index 7886ee5a725..d66e0ea0097 100644 --- a/.env +++ b/.env @@ -210,7 +210,7 @@ CONTEXTS=azure-odis0-centralus,azure-odis1-centralus,azure-odis2-centralus # ODIS azure k8s deployments ODIS_SIGNER_DOCKER_IMAGE_REPOSITORY=us.gcr.io/celo-testnet/celo-monorepo -ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.4 +ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.10 ODIS_SIGNER_BLOCKCHAIN_PROVIDER=https://alfajores-forno.celo-testnet.org # ODIS signer 0 Azure info diff --git a/.env.alfajores b/.env.alfajores index ef8e418b03e..d0c61418db4 100644 --- a/.env.alfajores +++ b/.env.alfajores @@ -160,7 +160,7 @@ CONTEXTS=azure-komenci-eastus,azure-komenci-westeu,azure-oracle-centralus,azure- # ODIS azure k8s deployments ODIS_SIGNER_DOCKER_IMAGE_REPOSITORY=us.gcr.io/celo-testnet/celo-monorepo -ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.8 +ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.10 ODIS_SIGNER_BLOCKCHAIN_PROVIDER=https://alfajores-forno.celo-testnet.org # Options: json, human (default), stackdriver LOG_FORMAT=stackdriver diff --git a/.env.mnemonic.alfajores.enc b/.env.mnemonic.alfajores.enc index a15aac6dc34..5d01c913b02 100644 Binary files a/.env.mnemonic.alfajores.enc and b/.env.mnemonic.alfajores.enc differ diff --git a/.env.mnemonic.baklava.enc b/.env.mnemonic.baklava.enc index 4fe9dda6a80..564d56214e4 100644 Binary files a/.env.mnemonic.baklava.enc and b/.env.mnemonic.baklava.enc differ diff --git a/.env.mnemonic.enc b/.env.mnemonic.enc index d63e2149c79..1c19b3a900a 100644 Binary files a/.env.mnemonic.enc and b/.env.mnemonic.enc differ diff --git a/.env.mnemonic.rc1.enc b/.env.mnemonic.rc1.enc index 954f87ff6f7..4f0f5b14dd9 100644 Binary files a/.env.mnemonic.rc1.enc and b/.env.mnemonic.rc1.enc differ diff --git a/.env.rc1 b/.env.rc1 index 46c16fa6505..c79c6f7acb3 100644 --- a/.env.rc1 +++ b/.env.rc1 @@ -345,7 +345,7 @@ VOTING_BOT_CRON_SCHEDULE="1 * * * *" # ODIS azure k8s deployments ODIS_SIGNER_DOCKER_IMAGE_REPOSITORY=us.gcr.io/celo-testnet/celo-monorepo -ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.8 +ODIS_SIGNER_DOCKER_IMAGE_TAG=oblivious-decentralized-identifier-service-1.1.10 ODIS_SIGNER_BLOCKCHAIN_PROVIDER="https://forno.celo.org" # Options: json, human (default), stackdriver LOG_FORMAT=stackdriver diff --git a/packages/celotool/src/lib/env-utils.ts b/packages/celotool/src/lib/env-utils.ts index 6e0d1d2ce29..c6ea77c1720 100644 --- a/packages/celotool/src/lib/env-utils.ts +++ b/packages/celotool/src/lib/env-utils.ts @@ -127,7 +127,6 @@ export enum envVar { ODIS_SIGNER_DOCKER_IMAGE_REPOSITORY = 'ODIS_SIGNER_DOCKER_IMAGE_REPOSITORY', ODIS_SIGNER_DOCKER_IMAGE_TAG = 'ODIS_SIGNER_DOCKER_IMAGE_TAG', ODIS_SIGNER_BLOCKCHAIN_PROVIDER = 'ODIS_SIGNER_BLOCKCHAIN_PROVIDER', - ODIS_SIGNER_BLOCKCHAIN_API_KEY = 'ODIS_SIGNER_BLOCKCHAIN_API_KEY', ORACLE_DOCKER_IMAGE_REPOSITORY = 'ORACLE_DOCKER_IMAGE_REPOSITORY', ORACLE_DOCKER_IMAGE_TAG = 'ORACLE_DOCKER_IMAGE_TAG', ORACLE_UNUSED_ORACLE_ADDRESSES = 'ORACLE_UNUSED_ORACLE_ADDRESSES', @@ -226,6 +225,7 @@ export enum DynamicEnvVar { ORACLE_ADDRESS_AWS_KEY_ALIASES = '{{ context }}_{{ currencyPair }}_ORACLE_ADDRESS_AWS_KEY_ALIASES', ORACLE_ADDRESS_AZURE_KEY_VAULTS = '{{ context }}_{{ currencyPair }}_ORACLE_ADDRESS_AZURE_KEY_VAULTS', ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT = '{{ context }}_{{ currencyPair}}_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT', + ODIS_SIGNER_BLOCKCHAIN_API_KEY = '{{ context }}_ODIS_SIGNER_BLOCKCHAIN_API_KEY', ODIS_SIGNER_AZURE_KEYVAULT_NAME = '{{ context }}_ODIS_SIGNER_AZURE_KEYVAULT_NAME', ODIS_SIGNER_AZURE_KEYVAULT_SECRET_NAME = '{{ context }}_ODIS_SIGNER_AZURE_KEYVAULT_SECRET_NAME', ODIS_SIGNER_DB_HOST = '{{ context }}_ODIS_SIGNER_DB_HOST', diff --git a/packages/celotool/src/lib/odis.ts b/packages/celotool/src/lib/odis.ts index d105410605c..b0b53552f50 100644 --- a/packages/celotool/src/lib/odis.ts +++ b/packages/celotool/src/lib/odis.ts @@ -31,6 +31,13 @@ interface ODISSignerDatabaseConfig { password: string } +/** + * Information for the Blockchain provider connection + */ +interface ODISSignerBlockchainConfig { + blockchainApiKey: string +} + /** * Information for the ODIS logging */ @@ -66,6 +73,15 @@ const contextDatabaseConfigDynamicEnvVars: { password: DynamicEnvVar.ODIS_SIGNER_DB_PASSWORD, } +/** + * Env vars corresponding to each value for the ODISSignerBlockchainConfig for a particular context + */ +const contextBlockchainConfigDynamicEnvVars: { + [k in keyof ODISSignerBlockchainConfig]: DynamicEnvVar +} = { + blockchainApiKey: DynamicEnvVar.ODIS_SIGNER_BLOCKCHAIN_API_KEY, +} + /** * Env vars corresponding to each value for the logging for a particular context */ @@ -114,6 +130,10 @@ export async function removeHelmRelease(celoEnv: string, context: string) { } async function helmParameters(celoEnv: string, context: string) { + const blockchainConfig = getContextDynamicEnvVarValues( + contextBlockchainConfigDynamicEnvVars, + context + ) const databaseConfig = getContextDynamicEnvVarValues(contextDatabaseConfigDynamicEnvVars, context) const keyVaultConfig = getContextDynamicEnvVarValues( contextODISSignerKeyVaultConfigDynamicEnvVars, @@ -140,7 +160,7 @@ async function helmParameters(celoEnv: string, context: string) { `--set keystore.vaultName=${keyVaultConfig.vaultName}`, `--set keystore.secretName=${keyVaultConfig.secretName}`, `--set blockchainProvider=${fetchEnv(envVar.ODIS_SIGNER_BLOCKCHAIN_PROVIDER)}`, - `--set blockchainApiKey=${fetchEnv(envVar.ODIS_SIGNER_BLOCKCHAIN_API_KEY)}`, + `--set blockchainApiKey=${blockchainConfig.blockchainApiKey}`, `--set log.level=${loggingConfig.level}`, `--set log.format=${loggingConfig.format}`, ].concat(await ODISSignerKeyVaultIdentityHelmParameters(context, keyVaultConfig))