Skip to content

Latest commit

 

History

History
56 lines (53 loc) · 21.7 KB

Environment.md

File metadata and controls

56 lines (53 loc) · 21.7 KB

Environment variables

These are the environment variables required by the liquidity provider server (LPS). The following table lists the environment variables and their descriptions and whether it's mandatory or not.

Name Description Example Mandatory
LPS_STAGE The network where LPS will be running on. One of the following: regtest testnet mainnet Yes
PORT The port number to run the http server of the LPS. 8080 Yes
LOG_LEVEL Level for the application logs. One of the following: panic fatal error warn info debug trace Yes
LOG_FILE File to send the logs to. If not provided logs will be sent to standard output. /home/lps.log No
ENABLE_MANAGEMENT_API Whether to enable the management API endpoints or not. To know more read the LP Management Documentation file. If not provided default value will be false. true or false No
AWS_LOCAL_ENDPOINT Endpoint for the AWS local instance (localstack). Only required if LPS is running in regtest mode. http://localhost:4444 No
WALLET Type of the wallet management implementation. To know more read the wallet management section of the LP Management file. One of the following: native Yes
SECRET_SRC Source of the secrets required for the wallet management. To know more read the secrets management section of the LP Management file. One of the following: aws env Yes
MONGODB_USER User to connect to MongoDB. root Yes
MONGODB_PASSWORD Password to connect to MongoDB. <any password> Yes
MONGODB_HOST Host to connect to MongoDB. localhost Yes
MONGODB_PORT Port to connect to MongoDB. 27017 Yes
RSK_ENDPOINT URL to connect to the Rootstock node. Must be an http endpoint. http://rskj:4444 Yes
CHAIN_ID RSK chain id. 33 Yes
LBC_ADDR Address of the Liquidity Bridge Contract (LBC). 0x8901a2Bbf639bFD21A97004BA4D7aE2BD00B8DA8 Yes
RSK_BRIDGE_ADDR Address of the Rootstock bridge. 0x0000000000000000000000000000000001000006 Yes
RSK_REQUIRED_BRIDGE_CONFIRMATIONS The number of confirmations that need to pass before being able to register a pegin, it changes depending on the network. 100 Yes
IRIS_ACTIVATION_HEIGHT Block number where the iris updated is activated, depends on the network. 1500000 Yes
ERP_KEYS Keys that are used as a secondary multisig that would be allowed to spend UTXOs after a year they were created. 0216c23b2ea8e4f11c3f9e22711addb1d16a93964796913830856b568cc3ea21d3,
0275562901dd8faae20de0a4166362a4f82188db77dbed4ca887422ea1ec185f14,
034db69f2112f4fb1bb6141bf6e2bd6631f0484d0bd95b16767902c9fe219d4a6f
Yes
ACCOUNT_NUM The keystore account number to use. If not provided default value will be 0. 0 No
DAO_FEE_COLLECTOR_ADDRESS Address of the DAO fee collector. 0x86B6534687A176A476C16083a373fB9Fe4FAb449 Yes
KEY_SECRET Name of the secret of AWS secrets manager that contains the encrypted json of the liquidity provider RSK account. Only required if SECRET_SRC is aws. FlyoverTestEnv/LPS-KEY No
PASSWORD_SECRET Name of the secret of AWS secrets manager that contains the password of the encrypted json of the liquidity provider RSK account. Only required if SECRET_SRC is aws. FlyoverTestEnv/LPS-PASSWORD No
KEYSTORE_FILE Name of the file that contains the encrypted json of the liquidity provider RSK account. Only required if SECRET_SRC is env. geth_keystore/UTC--2024-01-29T16-36-09.688642000Z--9d93929a9099be4355fc2389fbf253982f9df47c No
KEYSTORE_PWD The password of the encrypted json of the liquidity provider RSK account. Only required if SECRET_SRC is env. <any password> No
BTC_NETWORK Network to use when connecting to the Bitcoin node. One of the following: regtest testnet mainnet Yes
BTC_USERNAME Username for the bitcoind rpc server. user Yes
BTC_PASSWORD Password for the bitcoind rpc server. password Yes
BTC_ENDPOINT Endpoint of the bitcoind rpc server. localhost:5555 Yes
ALERT_SENDER_EMAIL The email that will be used to send alerts. [email protected] Yes
ALERT_RECIPIENT_EMAIL The email that will receive the alerts. [email protected] Yes
PROVIDER_NAME The liquidity provider name to be registered in the liquidity bridge contract. Default provider Yes
BASE_URL URL of the LPS to register in the liquidity bridge contract. http://localhost:8080 Yes
PROVIDER_TYPE Whether the liquidity provider will provide for pegin, pegout or both operations. One of the following: pegin pegout both Yes
PEGOUT_DEPOSIT_CACHE_START_BLOCK If provided, the LPS will upsert into the database all the pegout deposits that were done from this block to the current one. 500 No
CAPTCHA_SECRET_KEY Captcha key used in the server to validate client requests. <a captcha secret> No
CAPTCHA_SITE_KEY Captcha key used by the client to perform the challenge. <a captcha site key> No
CAPTCHA_THRESHOLD Threshold from zero to one to consider request as valid when using recaptcha v3 (right now we're using v2). 0.8 No
DISABLE_CAPTCHA Whether to disable captcha validation or not. Its a boolean value. true No
CAPTCHA_URL Url to make the captcha verification. https://www.google.com/recaptcha/api/siteverify No
MANAGEMENT_AUTH_KEY Authentication key for the Management API session. Is mandatory if the Management API is enabled. Must be a 32 bytes hex string. a2fbac02d66202e8468d2a4f1deba4fa5c2491f592e0e22e32fe1e6acac25923 No
MANAGEMENT_ENCRYPTION_KEY Encryption key for the Management API session. Is mandatory if the Management API is enabled. Must be a 32 bytes hex string. 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 No
MANAGEMENT_TOKEN_AUTH_KEY Authentication key for the CSRF cookies. Is mandatory if the Management API is enabled. Must be a 32 bytes hex string. c5ff177a86e82441f93e3772da700d5f6838157fa1bfdc0bb689d7f7e55e7aba No
MANAGEMENT_USE_HTTPS Whether the session cookies generated by the Management API should use HTTPS or not false No
ENABLE_SECURITY_HEADERS Whether to enable the security headers of the Management UI or not true Yes

AWS variables

You may notice that in sample-config.env there are some environment variables that are related to AWS. These variables are required to use AWS services, however, they are not listed in the table as the AWS SDK has the functionality to load them from multiple sources. For that reason, they are not accessed directly from the code and are not listed in the table above.

Other variables

You may notice that in sample-config.env there are variables that aren't in the table and don't belong to AWS. Those variables are used to run scripts or to setup the local environment, they should not be present in a productive environment for this application.