This feature PR adds exponential backoff to BlockResults querying in the Block Event and Epoch Event indexers.
The feature works like the following:
Indexer takes in 2 new configs:
rpc-retry-attempts: The number of attempts to be made when retrying. -1 will retry indefinitely
rpc-retry-max-wait: The maximum wait time that the algorithm will backoff to
A wrapper around block_result server querying that will reattempt the query like so:
If retry attempts = 0, it will not retry
If retry attempts > 0, it will retry up to the amount of retries specified
If retry attempts < 0, it will retry indefinitely
The amount to wait is calculated as an exponential backoff, which means it will slow down the queries as it makes more and more. The retry max wait config controls how high the wait time will go.
This PR also moves some code around that should not be in the Osmosis subpackage as it was code for doing RPC server queries for block results.
This feature PR adds exponential backoff to BlockResults querying in the Block Event and Epoch Event indexers.
The feature works like the following:
rpc-retry-attempts
: The number of attempts to be made when retrying. -1 will retry indefinitelyrpc-retry-max-wait
: The maximum wait time that the algorithm will backoff toblock_result
server querying that will reattempt the query like so:This PR also moves some code around that should not be in the Osmosis subpackage as it was code for doing RPC server queries for block results.