Skip to content

Conversation

@MatiasOS
Copy link
Collaborator

Summary

This PR introduces a configurable limit for maximum RPCs used in parallel strategy and fixes WSS URL handling in the ChainList integration. These changes improve performance and prevent connection errors when users add multiple RPC endpoints.

Changes

1. Maximum RPC Limit for Parallel Strategy

Added new setting (maxRPCsToUse) that limits how many RPC endpoints are queried simultaneously when using the parallel RPC strategy:
Default: 3 RPCs (configurable in Settings)
Location: settings/index.tsx:130-136
Implementation: RPCClient.ts now respects this limit when executing parallel calls

Benefits:

  • Prevents overwhelming the browser with too many concurrent requests
  • Improves performance when users have many RPC endpoints configured
  • Reduces timeout issues and failed requests
  • User can adjust based on their network capabilities

2. WSS URL Filtering

Fixed issue where WebSocket URLs (wss://) from ChainList were causing connection errors:
Change: Filter out WSS URLs when fetching RPCs from ChainList
Location: settings/index.tsx:301
Rationale: OpenScan uses HTTP(S) JSON-RPC, not WebSocket connections
Impact:

  • Cleaner RPC list when importing from ChainList
  • Prevents users from adding incompatible endpoint types
  • Reduces confusion about why some endpoints don't work

UI Changes

Added new "Max RPCs to Use" slider in Settings page:
Default: 3
Only visible/applicable when parallel RPC strategy is enabled

Breaking Changes

None - This is a backward-compatible enhancement with sensible defaults.

@MatiasOS MatiasOS requested a review from AugustoL December 18, 2025 22:57
@github-actions
Copy link

🚀 Preview: https://pr-97--openscan.netlify.app
📝 Commit: 6c0344c60656b68ea60e1f4a5d8d75ff4c9b5078

@MatiasOS MatiasOS merged commit ba9e556 into openscan-explorer:dev Dec 19, 2025
3 checks passed
@MatiasOS MatiasOS deleted the add-max-rpcs-to-parallel-strategy branch December 19, 2025 18:37
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.

2 participants