From f9e40e2c215da695e5ae555c339ecf771bb18866 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Wed, 24 Apr 2024 14:10:46 +0200 Subject: [PATCH 1/2] docs: update config documentation + note about Binance US --- README.md | 25 ++++++++++++++++--------- umee-provider-config/endpoints.toml | 5 +++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a51c1e66..198cb206 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ The `price-feeder` tool is responsible for performing the following: specification. + ## Providers The list of current supported providers: @@ -67,29 +68,35 @@ The easiest is to just set constant gas. We recommend 10k below the `MaxMsgGasUs In the PF config file you can set either: -* `gas_adjustment` -* or `gas_prevote` and `gas_vote` - fixed amount of gas used for `MsgAggregateExchangeRatePrevote` and `MsgAggregateExchangeRateVote` transactions respectively. +- `gas_adjustment` +- or `gas_prevote` and `gas_vote` - fixed amount of gas used for `MsgAggregateExchangeRatePrevote` and `MsgAggregateExchangeRateVote` transactions respectively. + +## Configuration: `umee-provider-config` ## Configuration -### `telemetry` +Copy the `price-feeder.example.toml` file to `price-feeder.toml` and update accordingly. -A set of options for the application's telemetry, which is disabled by default. An in-memory sink is the default, but Prometheus is also supported. We use the [cosmos sdk telemetry package](https://github.com/cosmos/cosmos-sdk/blob/3689d6f41ad8afa6e0f9b4ecb03b4d7f2d3a9e94/docs/docs/core/09-telemetry.md). +### `config_dir` -### `deviation` +Price Feeder requires instructions what endpoints to use and which currencies to track. The following files must be present in the directory specified by `config_dir`: -Deviation allows validators to set a custom amount of standard deviations around the median which is helpful if any providers become faulty. It should be noted that the default for this option is 1 standard deviation. +- `currencty-pairs.toml` +- `deviation-thresholds.toml`: Deviation allows validators to set a custom amount of standard deviations around the median which is helpful if any providers become faulty. It should be noted that the default for this option is 1 standard deviation. +- `endpoints.toml`: enables validators to setup their own API endpoints for a given provider. -### `provider_endpoints` +Depending where you run your validator node, certain locations may block some endpoints. Make sure you read through the comments in the config file. -The provider_endpoints option enables validators to setup their own API endpoints for a given provider. +### `telemetry` + +A set of options for the application's telemetry, which is disabled by default. An in-memory sink is the default, but Prometheus is also supported. We use the [cosmos sdk telemetry package](https://github.com/cosmos/cosmos-sdk/blob/3689d6f41ad8afa6e0f9b4ecb03b4d7f2d3a9e94/docs/docs/core/09-telemetry.md). ### `server` The `server` section contains configuration pertaining to the API served by the `price-feeder` process such the listening address and various HTTP timeouts. -### `currency_pairs` +### `currency_pairs.toml` file. The `currency_pairs` sections contains one or more exchange rates along with the providers from which to get market data from. It is important to note that the diff --git a/umee-provider-config/endpoints.toml b/umee-provider-config/endpoints.toml index 3a393b49..5ef562ce 100644 --- a/umee-provider-config/endpoints.toml +++ b/umee-provider-config/endpoints.toml @@ -2,3 +2,8 @@ name = "binance" rest = "https://api1.binance.com" websocket = "stream.binance.com:9443" + +## If you observe the following error: "ERR failed to initialize binance provider" then most likely +## someone is blocking your connection. In such case, try to use the Binance US API instead: +# rest = "https://api.binance.us" +# websocket = "stream.binance.us:9443" From d1e77cfa7403d82fd3052ef824af7939c27be377 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 25 Apr 2024 00:17:29 +0200 Subject: [PATCH 2/2] lint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 198cb206..dfecd8b8 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ A set of options for the application's telemetry, which is disabled by default. The `server` section contains configuration pertaining to the API served by the `price-feeder` process such the listening address and various HTTP timeouts. -### `currency_pairs.toml` file. +### `currency_pairs.toml` file The `currency_pairs` sections contains one or more exchange rates along with the providers from which to get market data from. It is important to note that the