Skip to content

fix(solana): retry Helius 429 once per fetch - #284

Merged
Vinsho merged 5 commits into
crypkit:masterfrom
zmaslerdev:fix/helius-rate-limit
Sep 11, 2026
Merged

Vinsho merged 5 commits into
crypkit:masterfrom
zmaslerdev:fix/helius-rate-limit

Conversation

@zmaslerdev

@zmaslerdev zmaslerdev commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

A Helius HTTP 429 during a Solana balance fetch gets one retry of the same RPC body, request ID, and cursor after a fixed 1.1-second wait. One allowance is shared across the entire fetch, including token calls, DAS chunks, and staking pages, and is isolated from overlapping fetches. Standalone coin metadata lookup also gets one allowance.

  • Retry applies only to Helius hosts and HTTP 429. It is allowed when Retry-After is absent or contains 0 or 1; other values, including HTTP dates, follow existing error handling without a retry.
  • Added retry sleep is capped at 1.1 seconds per fetch. Network time remains additional; this is not a total HTTP deadline.
  • Increase the existing Solana fetch-start interval from 1 to 2 seconds. Chaingate consumes this default through its Redis limiter per RPC URL; this interval applies to all SolanaApi URLs.

Validation: 419 passed, 83 integration tests deselected on Python 3.12 after merging current master. Regression tests were observed failing before the fixes. Coverage includes retry success across RPC methods and a later staking page, identical request replay, one allowance across multiple errors and subsequent fetch reset, non-Helius/non-429 exclusion, and Retry-After guards. An independent mocked probe also verified overlapping fetches on one instance. Black 24.1.1, isort 5.13.2, and diff checks passed.

@zmaslerdev zmaslerdev changed the title fix(solana): slow fetches and retry Helius 429 responses fix(solana): increase fetch interval to two seconds Sep 10, 2026
@zmaslerdev zmaslerdev changed the title fix(solana): increase fetch interval to two seconds fix(solana): retry Helius 429 once per fetch Sep 11, 2026
@Vinsho
Vinsho self-requested a review September 11, 2026 11:08

@Vinsho Vinsho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🌴

@Vinsho
Vinsho merged commit 2cb11c2 into crypkit:master Sep 11, 2026
6 checks passed
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.

2 participants