Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry oneinch solver init #36

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Retry oneinch solver init #36

merged 3 commits into from
Jun 7, 2024

Conversation

MartinquaXD
Copy link
Contributor

Recently the oneinch solver pod crashes during initialization more frequently. This is due to rate limits during OneInch::new().

This PR makes it so that we retry the initialization 10s because this is usually just a temporary error.

While I was at it I unified the semantics of all Solver::new() implementations to panic if a non recoverable error happens which makes the code slightly nicer to read. (Only paraswap needed this change)

Copy link
Collaborator

@m-lord-renkse m-lord-renkse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, not sure about 100 attempts before giving up, though(too many?).

@MartinquaXD
Copy link
Contributor Author

LG, not sure about 100 attempts before giving up, though(too many?).

Sending roughly 10RPS just for the initial call is probably really not so great. 😅
Will reduce to 1s interval to go down to 1RPS.

@MartinquaXD MartinquaXD enabled auto-merge (squash) June 7, 2024 07:15
@MartinquaXD MartinquaXD merged commit 48d5202 into main Jun 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants