Skip to content

Retry logic - #88

Merged
sorki merged 2 commits into
masterfrom
retry
Apr 15, 2026
Merged

sorki merged 2 commits into
masterfrom
retry

Conversation

@sorki

@sorki sorki commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Add retry logic, client will retry most transient errors like connection timeouts, up to 5 times with exponential backoff.

@v0d1ch v0d1ch mentioned this pull request Apr 15, 2026
4 tasks done
@sorki
sorki merged commit e565efc into master Apr 15, 2026
6 checks passed
@sorki
sorki deleted the retry branch April 15, 2026 10:58
v0d1ch added a commit to cardano-scaling/hydra that referenced this pull request Apr 20, 2026
fix #2579 #2562 


- Add `retryOnBlockfrostError` helper with exponential backoff (1s→60s
cap, max 10 retries) for our own `APIBlockfrostError` variants
(`DecodeError`, `MissingNextBlockHash`, `MissingBlockNo`, etc.)
- Wrap `catchUpToLatest` in the retry helper so transient errors during
chain catch-up don't crash the node
- Make `DecodeError` retryable (was previously fatal) since partial HTTP
responses can cause transient CBOR decode failures
- Blockfrost API errors (timeouts, rate limits, 5xx) will be handled by
the upstream client library (see
[blockfrost-haskell#88](blockfrost/blockfrost-haskell#88))


~NOTE: Do not merge until
blockfrost/blockfrost-haskell#88 is merged and
the BF version is updated in hydra-node.~ ( Edit: @noonio - it's merged
now and I've updated the versions. )

<!-- Consider each and tick it off one way or the other -->
* [x] CHANGELOG updated or not needed
* [x] Documentation updated or not needed
* [x] Haddocks updated or not needed
* [x] No new TODOs introduced or explained herafter
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.

1 participant