feat: implement race (first-resolved) RPC strategy #194
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.
Summary
@openscan/network-connectorsto v1.3.0 which includes theRaceStrategyimplementation usingPromise.any()Related Issue
Closes #192
Type of Change
Changes Made
Race Strategy Integration
src/types/index.ts: Add"race"toRPCStrategy,UserSettings.rpcStrategy, andRPCMetadata.strategytypessrc/services/DataService.ts: Accept"race"in strategy constructor parametersrc/hooks/useDataService.ts: ApplymaxParallelRequestslimit for race mode (same as parallel)Settings UI
src/components/pages/settings/index.tsx: Add "Race (Fastest)" dropdown option, race description text, and show max parallel requests control for race modeRPC Indicator
src/components/common/RPCIndicator.tsx: Lightning bolt badge (⚡ 1/N), winner highlight on fastest provider, response time sorting in dropdown, disabled provider selection in race mode, race-specific footer notesrc/styles/components.css: Race info banner and winner highlight stylesBug Fixes
src/components/pages/address/shared/TransactionHistory.tsx&AddressDetails.tsx: Handle both"0x1"and"1"receipt status formatssrc/services/AddressTransactionSearch.ts: Add sequential retry for failed receipt fetches — when race/parallel strategies cause high concurrent request volume, some providers rate-limit, causing receipt loss. Failed receipts are retried one-at-a-time with delays.Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runTest Plan
⚡ 1/N) in race mode