From df356b855eccf8490f9e4ca7c79376ebec16192b Mon Sep 17 00:00:00 2001 From: ccgarant Date: Fri, 23 Feb 2024 14:32:32 -0500 Subject: [PATCH 1/4] clarifications on env variable setup updates --- docs/guard/env-references.md | 8 ++++++-- docs/guard/setup.md | 4 ++-- docs/watcher/deploy-docker.md | 8 ++++++-- docs/watcher/env-references.md | 9 ++++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/docs/guard/env-references.md b/docs/guard/env-references.md index 87bb3c4..13fd658 100644 --- a/docs/guard/env-references.md +++ b/docs/guard/env-references.md @@ -1,4 +1,8 @@ ## Environment Variable References +Note: +- For the environmental variable file, no quotes are needed around the the strings. +- Delete all comments after copying and pasting in. +- Delete all whitespaces after the last word of the line item entry. # Required Environments ``` @@ -14,9 +18,9 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it. # Optional Environments ``` -API_KEY_HASH= # blake2b hash of api_key +API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere -MNEMONIC= # ergo mnemonic phrases +MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn TSS_SECRET= # the secret used to encrypt messages to start the signing process diff --git a/docs/guard/setup.md b/docs/guard/setup.md index b2040d6..811695d 100644 --- a/docs/guard/setup.md +++ b/docs/guard/setup.md @@ -44,7 +44,7 @@ Use [rosen command line](https://github.com/rosen-bridge/utils/tree/dev/packages #### Update Configuration File After obtaining the hash, input it into your config file. For example, the Blake2b hash of `hello` is `324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf`. -> **NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. +> **⚠️ NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. See your `.env` file. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your api key while troubleshooting etc. After updating, you can delete `apiKeyHash` from /config/local.yaml. ## DATABASE Specify your database connection and credentials. @@ -245,7 +245,7 @@ guard: mnemonic: 'YOUR_MNEMONIC' ``` -> **NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings. +> **⚠️ NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your seed phrase while troubleshooting etc. See your `.env` file. Once updated, in /config/local.yaml delete your mnemonic phrase and put in a comment like so "mnemonic: #see local config env file" ## Logs diff --git a/docs/watcher/deploy-docker.md b/docs/watcher/deploy-docker.md index 8c86f48..8e80aaf 100644 --- a/docs/watcher/deploy-docker.md +++ b/docs/watcher/deploy-docker.md @@ -17,6 +17,8 @@ Create your environment file `.env` based on `env.template` file in the `watcher cp env.template .env ``` +To view hidden .env later, use `ls -a`. + ## Environment Variable Configs You can configure some Environment Variables when deploying with docker, you can find all of them [here](./env-references.md). @@ -94,7 +96,9 @@ Use [rosen command line](https://github.com/rosen-bridge/utils/tree/dev/packages #### Update Configuration File After obtaining the hash, input it into your config file. For example, the Blake2b hash of `hello` is `324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf`. -> **NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. +> **⚠️ NOTE**: When using docker there is an `API_KEY_HASH` environment variable available for `apiKeyHash` that you can set instead of in the local configuration. See your `.env` file. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your api key while troubleshooting etc. After updating, you can delete `apiKeyHash` from /config/local.yaml. + + ### Ergo Config (Essential for all watchers) @@ -108,7 +112,7 @@ mnemonic: > Note: Utilizing this mnemonic in a standard multi-address wallet will lead to watcher misbehavior. -> **NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings. +> **⚠️ NOTE**: Instead of setting `mnemonic` in the local configuration file, consider using the `MNEMONIC` environment variable for ease of management. We recommend utilizing environment variables over direct configuration file settings for **security** purpose to not accidently share your seed phrase while troubleshooting etc. See your `.env` file. Once updated, in /config/local.yaml delete your mnemonic phrase and put in a comment like so "mnemonic: #see local config env file" 1. Select your primary data source for the Ergo network; block and box information are retrieved from this source. You can use either `explorer` or `node` as the primary source: diff --git a/docs/watcher/env-references.md b/docs/watcher/env-references.md index 72d32b9..2e91093 100644 --- a/docs/watcher/env-references.md +++ b/docs/watcher/env-references.md @@ -1,5 +1,8 @@ ## Environment Variable References - +Note: +- For the environmental variable file, no quotes are needed around the the strings. +- Delete all comments after copying and pasting in. +- Delete all whitespaces after the last word of the line item entry. # Required Environments ``` @@ -15,9 +18,9 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it. # Optional Environments ``` -API_KEY_HASH= # blake2b hash of api_key +API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere -MNEMONIC= # watcher mnemonic phrases +MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn KOIOS_AUTH_TOKEN= From 8ff093cfd5ad5a43c7bd7b07737bd421776124cb Mon Sep 17 00:00:00 2001 From: ccgarant Date: Fri, 23 Feb 2024 14:43:34 -0500 Subject: [PATCH 2/4] updated watcher to guard copy paste error --- docs/guard/env-references.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guard/env-references.md b/docs/guard/env-references.md index 13fd658..2c8d8aa 100644 --- a/docs/guard/env-references.md +++ b/docs/guard/env-references.md @@ -20,7 +20,7 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it. ``` API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere -MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn +MNEMONIC= # ergo mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn TSS_SECRET= # the secret used to encrypt messages to start the signing process From e615de4eff8c57ee5ceedbbd90cefdcf8391262e Mon Sep 17 00:00:00 2001 From: ccgarant Date: Fri, 23 Feb 2024 14:59:00 -0500 Subject: [PATCH 3/4] fixed mnemonic comment typo space after =, thanks CW! --- docs/guard/env-references.md | 2 +- docs/watcher/env-references.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guard/env-references.md b/docs/guard/env-references.md index 2c8d8aa..5363c2e 100644 --- a/docs/guard/env-references.md +++ b/docs/guard/env-references.md @@ -20,7 +20,7 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it. ``` API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere -MNEMONIC= # ergo mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn +MNEMONIC= # ergo mnemonic phrases, e.g. MNEMONIC=word1 word2 word3 ... wordn TSS_SECRET= # the secret used to encrypt messages to start the signing process diff --git a/docs/watcher/env-references.md b/docs/watcher/env-references.md index 2e91093..be22f7b 100644 --- a/docs/watcher/env-references.md +++ b/docs/watcher/env-references.md @@ -20,7 +20,7 @@ POSTGRES_PORT=5432 # 5432 is set as default, you can change it. ``` API_KEY_HASH= # blake2b hash of api_key, e.g. API_KEY_HASH=myHashHere -MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC= word1 word2 word3 ... wordn +MNEMONIC= # watcher mnemonic phrases, e.g. MNEMONIC=word1 word2 word3 ... wordn KOIOS_AUTH_TOKEN= From e0105b04144985c3205718823002163f385bc8dc Mon Sep 17 00:00:00 2001 From: mhs_sam Date: Sun, 25 Feb 2024 13:42:44 +0330 Subject: [PATCH 4/4] Update env-references.md --- docs/guard/env-references.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guard/env-references.md b/docs/guard/env-references.md index 5363c2e..0c9b82b 100644 --- a/docs/guard/env-references.md +++ b/docs/guard/env-references.md @@ -1,6 +1,6 @@ ## Environment Variable References Note: -- For the environmental variable file, no quotes are needed around the the strings. +- For the environmental variable file, no quotes are needed around the strings. - Delete all comments after copying and pasting in. - Delete all whitespaces after the last word of the line item entry.