e2e: fix airdrop race condition by explicitly passing RPC URL#2816
Merged
e2e: fix airdrop race condition by explicitly passing RPC URL#2816
Conversation
The solana airdrop command was being executed before the client container's entrypoint had configured the solana CLI, causing it to default to mainnet and fail with rate limiting errors. Fix by explicitly passing the -u flag with the local ledger URL.
packethog
approved these changes
Feb 4, 2026
bgm-malbeclabs
pushed a commit
that referenced
this pull request
Feb 4, 2026
## Summary - Fix race condition where `solana airdrop` runs before client container's entrypoint configures the Solana CLI, causing it to default to mainnet and fail with 429 rate limiting - Explicitly pass `-u` flag with local ledger URL to the airdrop command ## Root Cause When the client container starts, `entrypoint.sh` first waits for the solana validator to be healthy before running `solana config set --url`. However, `client.go:Start()` immediately executes `solana airdrop` after container startup without waiting for the entrypoint to complete. Since the Solana CLI config hasn't been set yet, it defaults to `https://api.mainnet-beta.solana.com/`. ## Testing Verification CI e2e tests pass and `TestE2E_MultiClient` no longer fails with mainnet rate limiting errors.
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.
Summary
solana airdropruns before client container's entrypoint configures the Solana CLI, causing it to default to mainnet and fail with 429 rate limiting-uflag with local ledger URL to the airdrop commandRoot Cause
When the client container starts,
entrypoint.shfirst waits for the solana validator to be healthy before runningsolana config set --url. However,client.go:Start()immediately executessolana airdropafter container startup without waiting for the entrypoint to complete. Since the Solana CLI config hasn't been set yet, it defaults tohttps://api.mainnet-beta.solana.com/.Testing Verification
CI e2e tests pass and
TestE2E_MultiClientno longer fails with mainnet rate limiting errors.