Skip to content

solana-driver: Add solana-rpc crate and hold RPC wrapper in API struct - #4746

Open
tilacog wants to merge 5 commits into
mainfrom
solana-driver-04.1
Open

solana-driver: Add solana-rpc crate and hold RPC wrapper in API struct#4746
tilacog wants to merge 5 commits into
mainfrom
solana-driver-04.1

Conversation

@tilacog

@tilacog tilacog commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Follow up to PR #4741, addressing reviewer feedback.

Changes

How to test

$ cargo test -p solana-driver

@tilacog
tilacog requested a review from a team as a code owner August 14, 2026 13:58
@tilacog tilacog changed the title solana-driver: Add solana-rpc crate and hold RPC wrapper in API struct solana-driver: Add solana-rpc crate and hold RPC wrapper in API struct Aug 14, 2026
@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Claude finished @tilacog's task in 3m 40s —— View job


PR Review: solana-rpc crate & RPC wrapper in API struct

Nice cleanup — extracting the RPC construction into a reusable crate and moving the client onto the Api struct both read well, and the bind(&self) / serve(self) split mirrors the EVM driver setup nicely. The scaffolding (#[expect(dead_code)]) is clearly intentional for follow-ups.

I left 2 minor, non-blocking inline comments:

  • crates/solana-driver/Cargo.tomlsolana-commitment-config is now unused in solana-driver and can be removed; solana-client is now test-only and could move to [dev-dependencies].
  • crates/solana-rpc/Cargo.toml — the serde feature on url isn't used by the crate.

Nothing blocking. Regarding the solana-indexer reuse question in the description: the SolanaRPC wrapper with an inner() escape hatch + From<RpcClient> looks flexible enough for the indexer to adopt and retire its own rpc module later.

Note: the SolanaRPC naming (vs. SolanaRpc) is consistent with existing repo precedent (e.g. SolverCompetitionAPI) and won't trip clippy's upper_case_acronyms, so I didn't flag it.

  • Read the diff and changed files
  • Analyze new solana-rpc crate
  • Analyze API struct changes
  • Post inline comments & summary

Comment thread crates/solana-driver/Cargo.toml Outdated
Comment thread crates/solana-rpc/Cargo.toml Outdated
Comment thread crates/solana-rpc/Cargo.toml Outdated
@@ -0,0 +1,18 @@
[package]
name = "solana-rpc"

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.

solana-rpc is a published crate. IIRC, Cargo only allows one package per name in a dependency graph, so the day any dependency pulls the upstream one, the workspace stops resolving. Probably worth a name that's clearly ours before anything depends on it, cow-solana-rpc or similar, wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oof, I didn't realize that.
cow-solana-rpc it is then!
Renamed in 6af12aa, thanks

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