Skip to content

Latest commit

 

History

History
44 lines (42 loc) · 21.1 KB

README-config.md

File metadata and controls

44 lines (42 loc) · 21.1 KB

Configuration

Values that can be configured using environment variables:

Env Variable Required? Meaning Notes Default Value Valid Options
ADDRESS Only if WALLET_TYPE=AZURE_HSM, AWS_HSM or NODE_ACCOUNT The account address that transactions will be sent from. Ignored if using WALLET_TYPE=PRIVATE_KEY First address of the set '' a hex address
AGGREGATION_PERIOD No The maximum age, in milliseconds, of data to use in calculating the current price. 300000 positive integers
API_REQUEST_TIMEOUT No Maximum time allowed for each external API request. 5000 positive integers, or 0 to disable
AWS_KEY_REGION No The AWS region code where the AWS HSM is located. Only used if WALLET_TYPE=AWS_HSM eu-central-1 a valid AWS region code
AZURE_HSM_INIT_MAX_RETRY_BACKOFF_MS No The max backoff between Azure HSM init retries in milliseconds. Useful because there can be a delay before the oracle client is given an AAD identity. Backoffs are exponential. 30000 positive integers
AZURE_HSM_INIT_TRY_COUNT No The number of times to retry authenticating with the Azure Key Vault at startup. Useful because there can be a delay before the oracle client is given an AAD identity. Backoffs are exponential. 5 positive integers
AZURE_KEY_VAULT_NAME Only if WALLET_TYPE=AZURE_HSM The name of the key vault where the address key is located. If a name is provided, Azure HSM signing is always used. '' a 3-24 character string, containing only 0-9, a-z, A-Z, and -
CIRCUIT_BREAKER_PRICE_CHANGE_THRESHOLD_MAX No It is the maximum the circuit breaker price threshold can scale up to. Any price change greater than this will assuredly open the circuit breaker. Provided as a ratio, e.g. 0.25 is 25%. 0.25 positive numbers
CIRCUIT_BREAKER_PRICE_CHANGE_THRESHOLD_MIN No It is the base/minimum circuit breaker price change threshold. Every successful report resets the threshold to this value. If the difference between the new price to report and the most recently reported price exceeds this threshold, it may be reported, depending on how much time has elapsed. Provided as a ratio, e.g. 0.25 is 25%. 0.15 positive numbers
CIRCUIT_BREAKER_PRICE_CHANGE_THRESHOLD_TIME_MULTIPLIER No It determines how quickly the calculated circuit breaker price change threshold scales in respect to time that has elapsed since the last report. 0.0075 positive numbers
CIRCUIT_BREAKER_DURATION_MS No How long the oracle will stop reporting if the price moves more than the circuit breaker threshold. 1200000 (20 minutes) positive integers
CURRENCY_PAIR No The currency pair to report on. CELOUSD 'CELOUSD', 'CELOBTC'
DATA_FETCH_FREQUENCY No The frequency, expressed in milliseconds, to fetch data from exchange APIs. 30000 positive integers
DEVMODE No Development mode allows the oracle to start up without needing to set up keys or nodes false bool
GAS_PRICE_MULTIPLIER No A multiplier of the gas price minimum that will be charged for transactions. 5 positive numbers >= 1
HTTP_RPC_PROVIDER_URL No The URL of an HTTP RPC endpoint of a Celo node to submit transactions to 'http://localhost:8545' a valid http URL
MAX_BLOCK_TIMESTAMP_AGE_MS No The max age of an observed block based off the block's timestamp and the current time. Only used for block-based reporting. 30000 positive integers
METRICS No Indicates whether or not to keep track of and expose prometheus metrics. true 'true', 'false'
MID_AGGREGATION_MAX_PERCENTAGE_DEVIATION No The maximum percent deviation of prices across all price sources when using mid price aggregation Violating this will cause the report to not occur 0.2 positive numbers
MID_AGGREGATION_MAX_EXCHANGE_VOLUME_SHARE No The maximum share of volume one exchange can have when using mid price aggregation Violating this will cause the report to not occur 0.99 positive number. Should be <= 1
MID_AGGREGATION_MAX_PERCENTAGE_BID_ASK_SPREAD No The maximum bid ask spread (relative to the ask) each exchange can have when using mid price aggregation Violating this will cause the exchange to not be considered, but a report may still occur 0.1 positive number
MIN_REPORT_PRICE_CHANGE_THRESHOLD No The minimum difference between a new price to report and the most recently reported price to trigger a new report. Only used for the BLOCK_BASED report strategy. Provided as a ratio. 0.005 positive numbers
MINIMUM_PRICE_SOURCES No Minimum number of price sources required to provide data within the aggregation period. 1 positive integers, should be <= the total number of price sources
OVERRIDE_INDEX No Number to represent this Oracle's index, the determinator of which blocks that will trigger this Oracle to report. Overrides usual calculation of index of location this Oracle's account in its whitelist. undefined integers >= 0
OVERRIDE_ORACLE_COUNT No Number which typically represents the number of active Oracles. This is often used in conjunction with an Oracle's index to identify which Oracle should report in response to the transaction of a block. Overrides usual calculation of total Oracle count of retrieving the length of the Oracle's whitelist. undefined positive integers
PRICE_SOURCES No Price sources to be used for data collection. undefined YAML string representation of a list of ExchangePriceSourceConfigs
PRIVATE_KEY_PATH No The path of a file that contains the private key to use for signing transactions. The account address to send transactions from is derived from the private key. If AZURE_KEY_VAULT_NAME is set, this is ignored. '/tmp/defaultPrivateKey' a string representing a valid file path
PROMETHEUS_PORT No The port the prometheus metric server will listen on. 9090 integers from 0 to 65535
REMOVE_EXPIRED_FREQUENCY No Set a frequency, in milliseconds, to check for and remove any expired reports 60000 positive integers
REMOVE_EXPIRED_OFFSET_OVERRIDE No Set an offset, in milliseconds, to check for and remove expired reports. derived from whitelist position and remove expired frequency positive integers
REPORT_FREQUENCY_OVERRIDE No Set a custom frequency, in milliseconds, to send reports to chain. WARNING: Overriding this could result in multiple oracles reporting at the same time, or an unideal spacing of reports derived: equal to bucket update frequency on-chain positive integers
REPORT_OFFSET_OVERRIDE No Set a custom offset, in milliseconds, for reports to happen. For example, on a 5 minute frequency, an offset of 1 minute means reporting at *:01, *:06, *:11 WARNING: Overriding this could result in multiple oracles reporting at the same time, or an unideal spacing of reports derived from whitelist position and report frequency positive integers
REPORT_STRATEGY No Specifies the strategy the oracle will report according to. If using BLOCK_BASED, then WS_RPC_PROVIDER_URL must specify a valid WS URL BLOCK_BASED BLOCK_BASED
REPORT_TARGET_OVERRIDE No Overrides the default report target for the currency pair when reporting to chain. When used, the address of the oracle client must be whitelisted to report values to this address in sortedOracles undefined a valid Celo address
TARGET_MAX_HEARTBEAT_PERIOD_MS No The target number of milliseconds at most between heartbeat reports when using block-based reporting derived from reportExpirySeconds from SortedOracles on chain positive integers
UNUSED_ORACLE_ADDRESSES No List of addresses to ignore in the whitelist. '' A string of comma separated addresses
WALLET_TYPE No Determines which type of wallet to use with ContractKit. PRIVATE_KEY AWS_HSM, AZURE_HSM, PRIVATE_KEY, NODE_ACCOUNT
WS_RPC_PROVIDER_URL No The Websocket URL of an RPC endpoint of a Celo node to listen to events from. Only needed for block-based reporting 'ws://localhost:8546' a valid Websocket URL