Add timeout and circuit breaker for external blockchain rpc calls#532
Open
Chidubemkingsley wants to merge 13 commits into
Conversation
|
@Chidubemkingsley Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Owner
|
- Replace #[contracttype] with #[contracttype(export = false)] on StorageKey enum to bypass XDR LengthExceedsMax limit. - Remove 10 unused API/rate-limit StorageKey variants. - Add missing CreditMemo, CustomerTaxStatus, DigitalGoodsClass, TaxRateEntry, TaxRateChangeLogByJdx, TaxRemittanceLine, TaxRemittanceReport, ReviewCase, SubscriberSubscriptions, and MerchantSubscriptions variants needed by invoice/fraud crates. - Move MEV protection types (ChargeCommitment, MevChargeConfig, GasPriceSnapshot, MevEventKind) from types crate into subscription crate to avoid XDR metadata bloat.
Line 56 had an extra after the statusStyles object, causing TS1128: Declaration or statement expected.
nightly-2023-12-01 is too old to parse the lockfile format in cargo-fuzz v0.13.1 (lock file version 4). Bump to nightly-2024-09-01.
…regenerate typechain factories
- Configurable timeout per RPC endpoint (per-provider timeoutMs + defaultTimeoutMs) - Circuit breaker with failure threshold, open/half-open/closed state machine - Recovery timeout transitions open → half-open → closed on probe success - RPC provider fallback: priority-ordered list, skips open circuits - Circuit state monitoring dashboard (getDashboard, getCircuitStatuses) - Graceful degradation: RpcAllProvidersFailedError when all circuits open - Manual circuit reset (resetCircuit, resetAllCircuits) with audit event - Audit log with capped ring-buffer for state transitions, failures, timeouts - 36 tests covering all acceptance criteria
a8b6eaf to
49dbf47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Checklist
Quality Gates (All must pass before merge)
Additional Requirements
Reviewers
--- closes #429
This PR will not be mergeable until all quality gates pass.