Remove ThinClient from dos/#117
Conversation
21e39ec to
70324f5
Compare
3edaa52 to
f2e0867
Compare
| let (rpc_addrs, tpu_addrs): (Vec<_>, Vec<_>) = nodes | ||
| .iter() | ||
| .filter_map(|node| node.valid_client_facing_addr(protocol, socket_addr_space)) | ||
| .unzip(); | ||
| let num_nodes = tpu_addrs.len(); | ||
| ( | ||
| ThinClient::new_from_addrs(rpc_addrs, tpu_addrs, connection_cache), | ||
| num_nodes, | ||
| ) |
There was a problem hiding this comment.
this seems to be spinning up rpc multiple clients under the wrapper of a ThinClient. I was able to get similar performance with a single TPU Quic client. This similar performance is why I changed it to a single TPU Client. However, I am not sure I have full context as to whether solana-dos needs to spin up multiple TPU clients for reasons other than maximizing rate_per_second
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #117 +/- ##
========================================
Coverage 81.8% 81.8%
========================================
Files 838 838
Lines 226389 226273 -116
========================================
- Hits 185342 185263 -79
+ Misses 41047 41010 -37 |
KirillLykov
left a comment
There was a problem hiding this comment.
looks good, the only thing is that this PR does two things:
- ThinClient -> TpuClient in dos
- removes ThinClient from bench-tps
I would split these changes because they are unrelated from what I see.
| let rpc_pubsub_url = format!("ws://{}/", cluster.entry_point_info.rpc_pubsub().unwrap()); | ||
| let rpc_url = format!("http://{}", cluster.entry_point_info.rpc().unwrap()); | ||
|
|
||
| let ConnectionCache::Quic(cache) = &*cluster.connection_cache else { |
There was a problem hiding this comment.
Ya tbh i thought so too lol. But it is used in ThinClient here, here, and here.
Also looks like it is a valid way to get a reference to the internal structure in an Arc. See: https://doc.rust-lang.org/beta/std/sync/struct.Condvar.html and https://stackoverflow.com/questions/62651479/understanding-to-access-a-rust-arc
| .unwrap(), | ||
| cluster.connection_cache.clone(), | ||
| )); | ||
| let rpc_pubsub_url = format!("ws://{}/", cluster.entry_point_info.rpc_pubsub().unwrap()); |
There was a problem hiding this comment.
myabe move this common code to create TpuClient to some helper function in the scope of tests submodule?
78622fb to
cf58be6
Compare
7d09b50
cf58be6 to
7d09b50
Compare
* remove `ThinClient` from `dos/` and replace `ThinClient` with `TpuClient` * remove test for valid_client_facing_addr since it is no longer used
…za-xyz#117) Minor updates after another sync run.
5th PR on the way to remove ThinClient completely.
See
bench-tpsclient totpu-clientsolana-labs/solana#35335ThinClientand removeThinClientfrombench-tpssolana-labs/solana#35365get_clientandget_multi_client#177get_clientandget_multi_client#184Problem
ThinClientis deprecated, so we need to removesolana-dos's reliance on itSummary of Changes
Use
TpuClientinsolana-dosinstead ofThinClient