Skip to content

feat(SQO): Implement RPC failover, retry logic and notification on RPC provider rotation. #4

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

Merged
merged 7 commits into from
Jun 13, 2025

Conversation

MoonBoi9001
Copy link
Member

@MoonBoi9001 MoonBoi9001 commented Jun 12, 2025

Description:

This PR introduces a more granular RPC failover mechanism, smarter retry logic, real-time Slack notifications for provider rotations, and bug fixes.

Key Changes:

1. Granular RPC Failover and Retry Logic:

  • Replaced the previous transaction-level failover with a more granular, stateful mechanism. The client now maintains a connection and rotates to the next RPC provider only when a specific network call fails repeatedly.
  • Introduced a central _execute_rpc_call method that wraps web3 calls (e.g., get_block, estimate_gas) with a retry then rotate strategy preventing transaction failures due to network issues.
  • The @retry_with_backoff decorator is now more focused, targeting a specifc range of network-related exceptions.

2. Slack Notifications for RPC Rotation:

  • Integrated SlackNotifier to send a notification whenever the active RPC provider is changed, offering real-time RPC health monitoring.

3. Other:

  • Resolved mypy type-hinting errors.
  • Updated README.md and config.toml.example.

@MoonBoi9001 MoonBoi9001 changed the title draft feat: Implement Robust RPC Failover and Retry Logic Jun 12, 2025
@MoonBoi9001 MoonBoi9001 changed the title feat: Implement Robust RPC Failover and Retry Logic feat(SQO): Implement RPC failover, retry logic and notification on RPC provider rotation. Jun 12, 2025
@MoonBoi9001 MoonBoi9001 marked this pull request as ready for review June 13, 2025 14:17
@MoonBoi9001 MoonBoi9001 merged commit 5a6ea0a into main Jun 13, 2025
9 checks passed
@MoonBoi9001 MoonBoi9001 deleted the TODO-CONTINUE-4 branch June 13, 2025 15:54
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.

1 participant