Skip to content

Reduce default circuit break duration to 2 minutes#6015

Merged
mcmire merged 5 commits intomainfrom
downgrade-circuit-break-duration
Jun 26, 2025
Merged

Reduce default circuit break duration to 2 minutes#6015
mcmire merged 5 commits intomainfrom
downgrade-circuit-break-duration

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented Jun 20, 2025

Explanation

Currently, the "circuit break duration" — the duration for which requests to an RPC endpoint are paused when the endpoint is perceived to be unavailable — is 30 minutes. This is a good value when a true outage exists, but if the endpoint is merely degraded or is returning 500s for specific requests then we don't want to lock users out of their wallet for a long time. To accommodate these cases, this commit reduces the circuit break duration to 2 minutes so that recovery is faster.

References

Closes #5887.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mcmire mcmire force-pushed the downgrade-circuit-break-duration branch 2 times, most recently from 5718d02 to 716218f Compare June 20, 2025 21:12
The `createServicePolicy` utility sets the default "circuit break
duration" to 30 minutes. When used to hit an API, this signifies the
amount of time requests to that API that will be paused if it
consistently responds with enough 500s. Since the `createServicePolicy`
utility is used to make network requests, however, it also signifies the
amount of time that users will be "locked out" from interacting with a
blockchain until requests respond successfully.

Pausing for 30 minutes makes sense if an RPC endpoint is truly down, but
it creates a major inconvenience if the endpoint mostly works and only
certain kinds of requests fail. To address this, this commit reduces the
default circuit break duration to 2 minutes to allow for faster
recovery.
@mcmire mcmire force-pushed the downgrade-circuit-break-duration branch from 716218f to e14ff4b Compare June 20, 2025 21:19
@mcmire mcmire marked this pull request as ready for review June 20, 2025 21:45
@mcmire mcmire requested a review from a team as a code owner June 20, 2025 21:45
@mcmire mcmire added the team-wallet-framework Deprecated: Please use `team-core-platform` instead. label Jun 20, 2025
Comment thread packages/controller-utils/CHANGELOG.md Outdated
Comment thread packages/controller-utils/src/constants.ts Outdated
Comment thread packages/controller-utils/src/constants.ts Outdated
Comment thread packages/controller-utils/src/constants.ts Outdated
Comment thread packages/controller-utils/src/constants.ts Outdated
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire enabled auto-merge (squash) June 26, 2025 17:39
@mcmire mcmire merged commit 6ff0058 into main Jun 26, 2025
210 checks passed
@mcmire mcmire deleted the downgrade-circuit-break-duration branch June 26, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-wallet-framework Deprecated: Please use `team-core-platform` instead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[controller-utils] Reduce default circuit break duration

2 participants