switch to solana-tpu-client from solana_client::tpu_client for bench-tps, dos/, LocalCluster, gossip/#310
Conversation
adace3b to
09fadfc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #310 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 837 837
Lines 226896 226896
=========================================
- Hits 185901 185900 -1
- Misses 40995 40996 +1 |
a65905f to
2550457
Compare
CriesofCarrots
left a comment
There was a problem hiding this comment.
Definitely support :) Just one objection and a couple questions about dependencies.
| solana-quic-client = { workspace = true } | ||
| solana-rpc-client = { workspace = true } | ||
| solana-rpc-client-api = { workspace = true } | ||
| solana-sdk = { workspace = true } | ||
| solana-udp-client = { workspace = true } |
There was a problem hiding this comment.
I'd like to avoid adding either of these dependencies to solana-tpu-client, so that downstream users don't have to import both by default if they only need one. I know you're trying to dedupe things (based on a reviewer request), but I think defining QuicTpuClient and TpuClientWrapper at the call sites or at least further upstream would be better.
There was a problem hiding this comment.
QuicTpuClient can be rearranged easily. TpuClientWrapper is a little harder. We could define it in gossip_service and then have dos import it along with gossip/. Although this requires gossip to import solana-udp-client and solana-quic-client. The other option I see is we put it back up in solana-client as before since solana-client is imported by gossip_service and dos anyway. But then this has the issue that we are now back to relying on solana-client::tpu_client...
There was a problem hiding this comment.
so I put TpuClientWrapper back in solana_client since gossip and dos are already importing solana_client anyway. I know it is not ideal. I also tried putting it in gossip but didn't like that we had to import solana-udp-client and solana-quic-client in gossip just for that wrapper. But if that is not a big deal, then lets add it in gossip. Couldn't find another spot further upstream either that made sense.
There was a problem hiding this comment.
but didn't like that we had to import solana-udp-client and solana-quic-client in gossip just for that wrapper
To be clear, the fact that solana-gossip imports solana-client means it is already importing solana-udp-client and solana-quic-client transitively. At some point it will actually be better to have it import one or both of those directly. But since it's still stuck on solana_client::connection_cache::ConnectionCache, this seems fine for now.
There was a problem hiding this comment.
oh shoot ya that's a good point. I should have realized that 🤦♂️. ok sounds good. Thank you!
8de91f3 to
1dd4741
Compare
2de5a1e to
2d12d8a
Compare
2d12d8a to
28e09bb
Compare
CriesofCarrots
left a comment
There was a problem hiding this comment.
Thanks for the rearrangement! Sorry that each one of these points to more cleanup to be done 😅
Lgtm!
A Followup PR to: #258. Removes dependency on
solana_client::tpu_clientand switches over tosolana-tpu-client.Problem
We may end up removing
solana_client::tpu_clientand the other associated wrappers insolana_client. So switching the dependencybench-tps,dos/,LocalCluster,gossip/fromsolana_client::tpu_clienttosolana_tpu_client.This is the 9th PR on the way to remove
ThinClientcompletely.See
bench-tpsclient totpu-clientsolana-labs/solana#35335ThinClientand removeThinClientfrombench-tpssolana-labs/solana#35365get_clientandget_multi_client#177get_clientandget_multi_client#184ThinClientfromdos/#117ThinClientfrombench-tps#132gossip_service::get_client()#227TpuClientforLocalClustertests #258