informalsystems / hermes

IBC Relayer in Rust
https://hermes.informal.systems
Apache License 2.0
440 stars 326 forks source link

Refactor retry logic in relayer to use retry crate #989

Open soareschen opened 3 years ago

soareschen commented 3 years ago

Crate

relayer

Summary

This is a spin off from #712 as the scope for the original issue is too large. This issue focus only on refactoring the ad hoc retry logic that make use of MAX_RETRIES and for loop, and refactor the code to use the retry crate and the Fibonacci retry strategy.

The refactoring will take place in multiple PRs, as there are quite a few separate places that require the refactoring.

This issue does not cover the classification of errors to determine whether it is retryable or not. This is tracked by the original issue #712.

TODO

Acceptance Criteria

All relayer code use retry to retry operations instead of using for loop.


For Admin Use

adizere commented 2 years ago

I'm wondering if it's worth refactoring our custom retry logic to use retry crate, or we should we abandon this issue and live with custom for-loop retries until a more major refactor (eg async).

Couple of reasons to abandon this issue: