Skip to content

fix(rpc): isolate circuit breaker per chain+host#7492

Merged
jrainville merged 6 commits into
release/10.34.xfrom
ab/issue-20243-rm-providers-fixkatana-fallback
Jun 4, 2026
Merged

fix(rpc): isolate circuit breaker per chain+host#7492
jrainville merged 6 commits into
release/10.34.xfrom
ab/issue-20243-rm-providers-fixkatana-fallback

Conversation

@friofry

@friofry friofry commented May 29, 2026

Copy link
Copy Markdown
Contributor
  • Falling back from the eth-rpc proxy to Katana's RPC no longer triggers a failure

Closes status-im/status-app#21042

Includes:

status-app pr: status-im/status-app#21076

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes RPC circuit breaker isolation so failures on a shared RPC host do not affect other chains using the same host, while preserving host-level RPS limiting.

Changes:

  • Generates circuit breaker names per host + chainID.
  • Keeps RPS limiter sharing per host across chains.
  • Adds test coverage for circuit name isolation and limiter sharing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/rpc/client.go Separates circuit breaker naming from RPS limiter keys.
internal/rpc/client_test.go Verifies circuit names are chain-specific and limiters remain host-shared.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@status-im-auto

status-im-auto commented May 29, 2026

Copy link
Copy Markdown
Member

Jenkins Builds

Click to see older builds (21)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3755b24 1 2026-05-29 17:48:04 ~4 min linux/status-go 📦zip
✔️ 3755b24 1 2026-05-29 17:51:45 ~8 min windows/status-go 📦zip
✔️ 3755b24 1 2026-05-29 17:52:01 ~8 min macos/status-go 📦zip
✖️ 3755b24 1 2026-05-29 18:01:34 ~18 min tests-rpc 📄log
✔️ 3755b24 1 2026-05-29 18:17:23 ~33 min tests 📄log
cdbc5aa 2 2026-06-04 12:56:15 ~8 min macos/status-go 📄log
✔️ cdbc5aa 2 2026-06-04 12:56:18 ~8 min windows/status-go 📦zip
✔️ cdbc5aa 2 2026-06-04 12:58:04 ~10 min linux/status-go 📦zip
cdbc5aa 3 2026-06-04 12:58:10 ~1 min macos/status-go 📄log
✔️ cdbc5aa 3 2026-06-04 13:04:43 ~8 min windows/status-go 📦zip
✔️ cdbc5aa 3 2026-06-04 13:04:43 ~6 min linux/status-go 📦zip
✔️ cdbc5aa 2 2026-06-04 13:07:21 ~19 min tests-rpc 📄log
cdbc5aa 4 2026-06-04 13:18:05 ~1 min macos/status-go 📄log
✖️ cdbc5aa 3 2026-06-04 13:25:45 ~18 min tests-rpc 📄log
✔️ cdbc5aa 2 2026-06-04 13:26:08 ~38 min tests 📄log
✔️ cdbc5aa 3 2026-06-04 14:00:19 ~33 min tests 📄log
✖️ cdbc5aa 4 2026-06-04 14:46:36 ~19 min tests-rpc 📄log
ecc11ac 5 2026-06-04 15:20:34 ~3 min macos/status-go 📄log
✔️ ecc11ac 4 2026-06-04 15:21:42 ~4 min linux/status-go 📦zip
✔️ ecc11ac 4 2026-06-04 15:26:16 ~8 min windows/status-go 📦zip
✔️ ecc11ac 5 2026-06-04 15:31:48 ~14 min tests-rpc 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7088786 6 2026-06-04 15:29:36 ~8 min macos/status-go 📦zip
✔️ 7088786 5 2026-06-04 15:35:42 ~13 min linux/status-go 📦zip
✔️ 7088786 5 2026-06-04 15:36:32 ~9 min windows/status-go 📦zip
✔️ 7088786 6 2026-06-04 15:50:33 ~18 min tests-rpc 📄log
✔️ 7088786 5 2026-06-04 16:03:27 ~43 min tests 📄log
✔️ 109ce64 6 2026-06-04 17:19:38 ~3 min linux/status-go 📦zip
✔️ 109ce64 7 2026-06-04 17:20:46 ~5 min macos/status-go 📦zip
✔️ 109ce64 6 2026-06-04 17:23:48 ~8 min windows/status-go 📦zip
✔️ 109ce64 7 2026-06-04 17:30:20 ~14 min tests-rpc 📄log
✔️ 109ce64 6 2026-06-04 17:49:21 ~33 min tests 📄log

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/10.34.x@9aa8e50). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/10.34.x    #7492   +/-   ##
==================================================
  Coverage                   ?   61.28%           
==================================================
  Files                      ?      850           
  Lines                      ?   119055           
  Branches                   ?        0           
==================================================
  Hits                       ?    72961           
  Misses                     ?    38630           
  Partials                   ?     7464           
Flag Coverage Δ
functional 40.16% <73.33%> (?)
unit 55.26% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/logutils/callog/status_request_log.go 90.00% <ø> (ø)
internal/rpc/client.go 72.00% <100.00%> (ø)
internal/rpc/network/db/utils.go 68.08% <ø> (ø)
internal/rpc/network/testutil/testutil.go 100.00% <100.00%> (ø)
params/config.go 85.62% <ø> (ø)
params/network_config.go 93.18% <ø> (ø)
params/networkdefaults/default_networks.go 96.55% <100.00%> (ø)
pkg/backend/defaults.go 71.87% <ø> (ø)
pkg/backend/node/status_node_services.go 77.77% <100.00%> (ø)
protocol/requests/create_account.go 36.84% <ø> (ø)
... and 5 more

@friofry
friofry force-pushed the ab/issue-20243-rm-providers-fixkatana-fallback branch from 3755b24 to cdbc5aa Compare June 4, 2026 12:47
@friofry
friofry changed the base branch from ab/issue-20243-rm-providers-legacyproxy to release/10.34.x June 4, 2026 12:48
@friofry

friofry commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

friofry added 5 commits June 4, 2026 20:17
Drop CryptoCompare provider wiring and its tests, and remove market proxy credentials that were only used by the CryptoCompare proxy path.
Remove embedded-proxy provider generation and related auth/config plumbing, keeping smart proxy and direct providers as the supported RPC paths.
DefaultRPCURL/DefaultFallbackURL/DefaultFallbackURL2 were only ever populated by the removed embedded-proxy path and are read nowhere, so drop them from the Network struct and the assertions that checked they stayed empty.
The RPC provider circuit name was derived from the RPS-limiter key, which is empty when the limiter is disabled (e.g. the smart proxy). An empty circuit name makes the circuit breaker execute the provider directly without a circuit, so a provider that consistently fails for a given chain (e.g. a proxy with no backend for that chain) keeps being retried on every request instead of being short-circuited to the fallback.

Always derive a non-empty circuit name isolated per chain+host so the breaker can open for a consistently failing endpoint without affecting other chains that share the same host. The RPS limiter remains intentionally shared per host.
@friofry
friofry force-pushed the ab/issue-20243-rm-providers-fixkatana-fallback branch from ecc11ac to 7088786 Compare June 4, 2026 15:17
@friofry
friofry force-pushed the ab/issue-20243-rm-providers-fixkatana-fallback branch from 7088786 to 109ce64 Compare June 4, 2026 17:15
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

✅ Companion PR Verified

#21076 - fix(rpc): isolate circuit breaker per chain+host

@jrainville
jrainville merged commit 834af8e into release/10.34.x Jun 4, 2026
18 of 22 checks passed
@jrainville
jrainville deleted the ab/issue-20243-rm-providers-fixkatana-fallback branch June 4, 2026 18:00
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.

[Desktop - Windows] from time to time I see this provider error banner for Katana

5 participants