fix: paginate Helius stake account requests - #283
Open
zmaslerdev wants to merge 1 commit into
Open
Conversation
Author
|
Hi @galvanizze, could you please review this change? GitHub does not allow the PR author to submit a formal review request without upstream write permission. |
galvanizze
reviewed
Aug 24, 2026
| params=[self.STAKE_PROGRAM_ID, config], | ||
| ) | ||
|
|
||
| config['limit'] = self.api_options.max_items_per_page |
Member
There was a problem hiding this comment.
recheck this setting for helius
galvanizze
reviewed
Aug 24, 2026
galvanizze
left a comment
Member
There was a problem hiding this comment.
test on some addresses, with lots of balances/nfts, to check whether paginating works ok
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
Use paginated Helius stake-account queries while preserving legacy
getProgramAccountsbehavior for non-Helius Solana RPC providers.🔍 Review
Recommendation: 🟡 Focused review — the change is localized, but stake balances depend on complete cursor traversal.
blockapi/v2/api/solana.py:_fetch_staked_sol— continue through empty filtered pages untilpaginationKeyisnulland preserve the flat internal result contract.🔗 Compatibility
Helius RPC hosts use
getProgramAccountsV2; other Solana RPC providers retaingetProgramAccounts. Existing parsers still receiveresultas a flat account list.✅ Verification
Confidence: 🟢 Fully verified — focused and full unit suites pass, and both production Helius and the default Solana RPC paths were exercised live.