Commit Graph

15 Commits

Author SHA1 Message Date
Tyera c32377b5af
Split out quic- and udp-client definitions (#28762)
* Move ConnectionCache back to solana-client, and duplicate ThinClient, TpuClient there

* Dedupe thin_client modules

* Dedupe tpu_client modules

* Move TpuClient to TpuConnectionCache

* Move ThinClient to TpuConnectionCache

* Move TpuConnection and quic/udp trait implementations back to solana-client

* Remove enum_dispatch from solana-tpu-client

* Move udp-client to its own crate

* Move quic-client to its own crate
2022-11-18 12:21:45 -07:00
Tyera Eulberg c24eaa36f8
Split up solana-client (#27246)
* Move thin-client to new crate

* Move tpu client and varieties to new crate

* Move pubsub-client to new crate

* Move rpc-client to new crate

* Add client-common crate to avoid circular dependencies

* Move rpc_cache and make less pub

* Remove unused unpub modules

* Add nonce-client

* Remove unused dependencies

* Fix rpc_client docs

* Move spinner to calling clients

* Rename client-common to rpc-client-api

* Remove unnecessary rpc_ prefix

* Remove unused ClientErrorKind variant

* Remove unnecessary Client prefix

* Move mod declarations into lib.rs and remove unnecessary files

* Rename nonce-client and remove redundant module name

* Restore mock_sender_for_cli in solana-client
2022-08-24 05:34:35 +00:00
Jon Cinque 04cac610cc
client: Use async TPU client in sync TPU client by sharing tokio runtime (#26996)
* Make the sync tpu client use the async tpu client

* Try to fix CI errors

* Fix formatting

* Make rpc_client::get_nonblocking_client public only in the crate

* Save work

* Temporary hack to test sharing runtime between tpu_client and rpc_client

* [WIP] Copy rpc client

* Fix build

* Small refactoring

* Remove copies

* Refactor access to RPC client fields

* Change `clone_inner_client` to `get_inner_client`

Co-authored-by: Ryan Leung <ryan.leung@solana.com>
2022-08-09 12:33:14 +00:00
Jon Cinque 79a8ecd0ac
client: Remove static connection cache, plumb it instead (#25667)
* client: Remove static connection cache, plumb it instead

* Add TpuClient::new_with_connection_cache to not break downstream

* Refactor get_connection and RwLock into ConnectionCache

* Fix merge conflicts from new async TpuClient

* Remove `ConnectionCache::set_use_quic`

* Move DEFAULT_TPU_USE_QUIC to client, use ConnectionCache::default()
2022-06-08 13:57:12 +02:00
ryleung-solana 1ca5c3a7bd
Switch to using enum-dispatch to switch between UDP and Quic (#24713) 2022-05-26 11:21:16 -04:00
Jon Cinque 09ea899a2d
tpu-client: Refactor to prep for async client (#25432) 2022-05-21 20:22:30 +02:00
Tyera Eulberg 26899359d1
Support quic in bench-tps (#24295)
* Update comment

* Use connection_cache in tpu_client

* Add --tpu-use-quic to bench-tps

* Use connection_cache async send
2022-04-13 12:17:10 -06:00
Tyera Eulberg 8487030ea6
Add TpuClient support to bench-tps (#24227)
* Add fallible send methods, and rpc_client helper

* Add helper to return RpcClient url

* Implement BenchTpsClient for TpuClient

* Add cli rpc and identity handling

* Handle different kinds of clients in main, use TpuClient

* Add tpu_client integration test
2022-04-12 09:43:29 -06:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Jon Cinque 5f7b60576f
tpu-client: Move `send_messages_with_spinner` from program (#20960)
We have too many ways of sending transactions, and too many
reimplementations of the same logic all over the place.

The program deploy logic and stake-o-matic currently make the
most use of the TPU client, so this merges their implementations into
one place to be reused by both.  Yay for consolidation!
2021-10-26 22:54:26 +02:00
sakridge c8f76b8bd0
Fix tpu service fanout (#19944) 2021-09-17 01:01:56 +02:00
Michael Vines b83284c9f6 TpuClient now uses the processed slot to seed its leader schedule cache 2021-09-08 16:51:25 -05:00
Michael Vines 007fb3abe5 Improve comments, error handling, and retry delay handling 2021-09-08 10:51:55 -05:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Justin Starry 75b8434b76
Add TPU client for sending txs to the current leader tpu port (#16736)
* Add TPU client for sending txs to the current leader tpu port

* Update tpu_client.rs
2021-04-23 09:35:12 +08:00