feat(solana-indexer) PR 15.6: adopt cow-solana-rpc - #4751
Open
squadgazzz wants to merge 2 commits into
Open
Conversation
squadgazzz
commented
Aug 18, 2026
Comment on lines
+49
to
+53
| pub fn new_mock_with_mocks(mocks: Mocks) -> Self { | ||
| Self { | ||
| inner: RpcClient::new_mock_with_mocks("mock".to_owned(), mocks), | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
It wasn't me inventing this naming 😅
Contributor
Author
|
@claude, review, please |
Contributor
|
Claude finished @squadgazzz's task in 2m 44s —— View job PR Review — adopt cow-solana-rpc
Verdict: LGTM — clean, well-scoped move. No blocking issues, so no inline comments. What I checked:
Minor, non-blocking:
CI is still |
Contributor
|
Claude finished @squadgazzz's task in 1m 29s —— View job PR Review — adopt cow-solana-rpc
Verdict: LGTM — clean, well-scoped move. No blocking issues, so no inline comments. What I verified:
Non-blocking observation (no change required):
|
squadgazzz
force-pushed
the
solana-indexer/PR15-fill-state
branch
from
August 19, 2026 11:18
15403f4 to
604a333
Compare
squadgazzz
force-pushed
the
solana-indexer/PR15.6-adopt-cow-solana-rpc
branch
from
August 19, 2026 11:21
c9817b9 to
d796441
Compare
…5.6-adopt-cow-solana-rpc # Conflicts: # crates/solana-indexer/src/run.rs
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.
Description
The indexer hand-rolled its own RPC wrapper while
cow-solana-rpcnow exists for exactly this. The wrapper moves into the shared crate and the indexer's copy is deleted: construction stays explicit about commitment at the call site (confirmed, matching the stream subscription), the chunkedgetMultipleAccountshelper moves verbatim (dedup,MAX_MULTIPLE_ACCOUNTSbatches, parallel requests), and the canned-response mock constructor lands behind thetest-utilfeature together withMocks/RpcRequestre-exports, so consumers stop needingsolana-clientfor their tests.The indexer drops three direct dependencies (
solana-client,solana-commitment-config,solana-rpc-client-api, plusitertools) and the driver can reuse the same helper later instead of growing its own copy.Changes
cow-solana-rpcgainsmultiple_accounts,new_mock_with_mocks(test-util), and re-exportsCommitmentConfig,Error,Mocks,RpcRequestrpc.rsis deleted, the decoder holdsSolanaRPC, errors wrapcow_solana_rpc::ErrorHow to test
Existing tests, migrated to the shared mock constructor.