Skip to content

sdk-compat-test gates every PR on the public Solana RPC #4344

Description

@bgm-malbeclabs

sdk-compat-test fails repo-wide whenever api.mainnet-beta.solana.com sheds load. It did so on 2026-09-15 from roughly 21:22 to 22:45 UTC, failing main and every open PR for over an hour.

What fails

Two of the six tests, both getProgramAccounts calls:

TestCompatValidatorDeposit     getProgramAccounts -> 503 Service unavailable
TestCompatContributorRewards   getProgramAccounts -> 503 Service unavailable

The other four pass throughout. That asymmetry is the diagnosis rather than a coincidence: compatClient builds two clients from NetworkConfigForEnv(EnvMainnetBeta), and they do not have the same reliability.

  • cfg.LedgerPublicRPCURL is a private rpcpool endpoint carrying a key. Every test that reads through it passes.
  • cfg.SolanaRPCURL is https://api.mainnet-beta.solana.com, the free public endpoint. Both tests that read through it fail.

getProgramAccounts is the heaviest call a public endpoint serves and the first one it rejects under load, so this is throttling rather than an outage. It will recur.

Suggested change

Let the compat test take its Solana L1 URL from the environment, and set it in CI from a secret pointing at the private endpoint:

  • sdk/revdist/go/compat_test.go: in compatNetworkConfig, override cfg.SolanaRPCURL when REVDIST_COMPAT_SOLANA_RPC_URL is set, falling back to the config value so local runs are unchanged.
  • .github/workflows/sdk.yml: pass it alongside the existing REVDIST_COMPAT_TEST: "1".

This needs no change to the config crate, and leaves the public URL as the default everywhere else.

Worth considering alongside

Even on a private endpoint, this job reaches a live third-party service on every PR. A retry with backoff on the two getProgramAccounts calls, or making the job non-blocking for merge, would stop one provider's bad hour from blocking the repo. The URL change is the smaller fix and probably enough.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions