From bcc3bcb862fa710fc11b9039c304855c40d2a5a4 Mon Sep 17 00:00:00 2001 From: Chengxuan Xing Date: Wed, 11 Dec 2024 06:37:22 +0000 Subject: [PATCH] rename configuration and update description Signed-off-by: Chengxuan Xing --- config.md | 22 +++++++++++----------- internal/ethereum/config.go | 6 +++--- internal/msgs/en_config_descriptions.go | 12 ++++++------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config.md b/config.md index c8807d3..232bb76 100644 --- a/config.md +++ b/config.md @@ -91,14 +91,6 @@ |password|Password|`string`|`` |username|Username|`string`|`` -## connector.blockListenerRetry - -|Key|Description|Type|Default Value| -|---|-----------|----|-------------| -|factor|Factor to increase the delay by, between each block indexing http requests retry to the RPC endpoint|`float32`|`2` -|initialDelay|Initial delay for retrying block indexing http requests to the RPC endpoint|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms` -|maxDelay|Maximum delay for between each block indexing http requests retry to the RPC endpoint|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` - ## connector.events |Key|Description|Type|Default Value| @@ -116,6 +108,14 @@ |---|-----------|----|-------------| |url|Optional HTTP proxy server to connect through|`string`|`` +## connector.queryLoopRetry + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|factor|Factor to increase the delay by, between each query request retry to the RPC endpoint, applicable to all the query loops|`float32`|`2` +|initialDelay|Initial delay for retrying query requests to the RPC endpoint, applicable to all the query loops|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms` +|maxDelay|Maximum delay for between each query request retry to the RPC endpoint, applicable to all the query loops|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` + ## connector.retry |Key|Description|Type|Default Value| @@ -123,10 +123,10 @@ |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` -|factor| use 'connector.blockListenerRetry.factor' instead|`float32`|`` +|factor| Please refer to 'connector.queryLoopRetry.factor' to understand its original purpose and use that instead|`float32`|`` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` -|initialDelay| use 'connector.blockListenerRetry.initialDelay' instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`` -|maxDelay| use 'connector.blockListenerRetry.maxDelay' instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`` +|initialDelay| Please refer to 'connector.queryLoopRetry.initialDelay' to understand its original purpose and use that instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`` +|maxDelay| Please refer to 'connector.queryLoopRetry.maxDelay' to understand its original purpose and use that instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` ## connector.throttle diff --git a/internal/ethereum/config.go b/internal/ethereum/config.go index 6b57bb0..fe40f49 100644 --- a/internal/ethereum/config.go +++ b/internal/ethereum/config.go @@ -32,9 +32,9 @@ const ( EventsCheckpointBlockGap = "events.checkpointBlockGap" EventsBlockTimestamps = "events.blockTimestamps" EventsFilterPollingInterval = "events.filterPollingInterval" - RetryInitDelay = "blockListenerRetry.initialDelay" - RetryMaxDelay = "blockListenerRetry.maxDelay" - RetryFactor = "blockListenerRetry.factor" + RetryInitDelay = "queryLoopRetry.initialDelay" + RetryMaxDelay = "queryLoopRetry.maxDelay" + RetryFactor = "queryLoopRetry.factor" DeprecatedRetryInitDelay = "retry.initialDelay" DeprecatedRetryMaxDelay = "retry.maxDelay" diff --git a/internal/msgs/en_config_descriptions.go b/internal/msgs/en_config_descriptions.go index b4fa35c..a1fab28 100644 --- a/internal/msgs/en_config_descriptions.go +++ b/internal/msgs/en_config_descriptions.go @@ -33,12 +33,12 @@ var ( ConfigEthereumGasEstimationFactor = ffc("config.connector.gasEstimationFactor", "The factor to apply to the gas estimation to determine the gas limit", i18n.FloatType) ConfigBlockCacheSize = ffc("config.connector.blockCacheSize", "Maximum of blocks to hold in the block info cache", i18n.IntType) ConfigBlockPollingInterval = ffc("config.connector.blockPollingInterval", "Interval for polling to check for new blocks", i18n.TimeDurationType) - ConfigBlockIndexRetryInitialDelay = ffc("config.connector.blockListenerRetry.initialDelay", "Initial delay for retrying block indexing http requests to the RPC endpoint", i18n.TimeDurationType) - ConfigBlockIndexRetryFactor = ffc("config.connector.blockListenerRetry.factor", "Factor to increase the delay by, between each block indexing http requests retry to the RPC endpoint", i18n.FloatType) - ConfigBlockIndexRetryMaxDelay = ffc("config.connector.blockListenerRetry.maxDelay", "Maximum delay for between each block indexing http requests retry to the RPC endpoint", i18n.TimeDurationType) - DeprecatedConfigBlockIndexRetryInitialDelay = ffc("config.connector.retry.initialDelay", " use 'connector.blockListenerRetry.initialDelay' instead", i18n.TimeDurationType) - DeprecatedConfigBlockIndexRetryFactor = ffc("config.connector.retry.factor", " use 'connector.blockListenerRetry.factor' instead", i18n.FloatType) - DeprecatedConfigBlockIndexRetryMaxDelay = ffc("config.connector.retry.maxDelay", " use 'connector.blockListenerRetry.maxDelay' instead", i18n.TimeDurationType) + ConfigBlockIndexRetryInitialDelay = ffc("config.connector.queryLoopRetry.initialDelay", "Initial delay for retrying query requests to the RPC endpoint, applicable to all the query loops", i18n.TimeDurationType) + ConfigBlockIndexRetryFactor = ffc("config.connector.queryLoopRetry.factor", "Factor to increase the delay by, between each query request retry to the RPC endpoint, applicable to all the query loops", i18n.FloatType) + ConfigBlockIndexRetryMaxDelay = ffc("config.connector.queryLoopRetry.maxDelay", "Maximum delay for between each query request retry to the RPC endpoint, applicable to all the query loops", i18n.TimeDurationType) + DeprecatedConfigBlockIndexRetryInitialDelay = ffc("config.connector.retry.initialDelay", " Please refer to 'connector.queryLoopRetry.initialDelay' to understand its original purpose and use that instead", i18n.TimeDurationType) + DeprecatedConfigBlockIndexRetryFactor = ffc("config.connector.retry.factor", " Please refer to 'connector.queryLoopRetry.factor' to understand its original purpose and use that instead", i18n.FloatType) + DeprecatedConfigBlockIndexRetryMaxDelay = ffc("config.connector.retry.maxDelay", " Please refer to 'connector.queryLoopRetry.maxDelay' to understand its original purpose and use that instead", i18n.TimeDurationType) ConfigEventsBlockTimestamps = ffc("config.connector.events.blockTimestamps", "Whether to include the block timestamps in the event information", i18n.BooleanType) ConfigEventsCatchupPageSize = ffc("config.connector.events.catchupPageSize", "Number of blocks to query per poll when catching up to the head of the blockchain", i18n.IntType) ConfigEventsCatchupThreshold = ffc("config.connector.events.catchupThreshold", "How many blocks behind the chain head an event stream or listener must be on startup, to enter catchup mode", i18n.IntType)