feat(SQO): Implement RPC failover, retry logic and notification on RPC provider rotation. #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
_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.@retry_with_backoff
decorator is now more focused, targeting a specifc range of network-related exceptions.2. Slack Notifications for RPC Rotation:
SlackNotifier
to send a notification whenever the active RPC provider is changed, offering real-time RPC health monitoring.3. Other:
mypy
type-hinting errors.README.md
andconfig.toml.example
.