Commit Graph

36 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
Brian Anderson 7e7e9b2775
Fix broken doc links in solana-client (#28714) 2022-11-01 21:21:20 -06: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
ryleung-solana 8cfc010b84
Send async quic batch of txs (#24298)
Add an interface send_wire_transaction_batch_async to TpuConnection to allow for sending batches without waiting for completion

Co-authored-by: Anatoly Yakovenko <anatoly@solana.com>
2022-04-14 22:20:34 -04:00
anatoly yakovenko 474080608a
Async send for send transaction service (#24265)
* async send
2022-04-12 07:15:59 -07:00
Tyera Eulberg 3871c85fd7
Add BenchTpsClient trait (#24208)
* Add BenchTpsClient

* Impl BenchTpsClient for used clients

* Use BenchTpsClient in do_bench

* Update integration test to use faucet via rpc

* Support keypairs from file that are not prefunded

* Remove old perf-utils
2022-04-11 13:45:40 -06:00
ryleung-solana 9b46f9b2da
Quic Connection Cache (#23598)
Add a connection cache to allow add modules that send data to get or create connections (e.g. for quic) associated with a certain SocketAddr
2022-03-15 18:16:35 -04:00
ryleung-solana 17b00ad3a4
Add quic-client module (#23166)
* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
2022-03-09 21:33:05 -05:00
Brian Anderson 176fd23002
Continue making it possible to implement RpcSender (#23561)
* Make nonblocking RpcClient::new_sender pub

As is the blocking RpcClient::new_sender, per #23503.

* Make solana_client::rpc_sender pub

Per #17631 it is supposed to be possible to implement RpcSender in
order to call RpcClient::new_sender. As of now though it is
not possible to name RpcSender in order to implement it.
2022-03-09 14:07:51 -07:00
Michael Vines 8c376f58cb Drop feature, move to nonblocking mod 2022-01-27 08:19:03 -08:00
Kirill Fomichev a6a8a712e5 Add async WebSocket PubsubClient 2022-01-27 08:19:03 -08:00
Michael Vines 85e8bece2e Add solana_client::nonblocking::RpcClient 2022-01-26 17:58:00 -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 60fe29b63e
Move transaction executor (#19946) 2021-10-13 13:06:23 +02: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
Tyera Eulberg 974e6dd2c1
Deprecate "confirmed" RpcClient methods (#16520)
* Remove obsolete client methods

* Deprecate GetConfirmed client methods

* Rename Confirmed config structs, with appropriate deprecation

* Fixup client apps

* Map RpcRequest to deprecated when targeting older nodes
2021-04-15 17:00:14 -06:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Josh 4013f91dbe
RPC: add caching to getLargestAccounts (#15154)
* introduce get largest accounts cache

* remove cache size and change hash key

* remove eq and hash derivation from commitment config

* add slot to the cache
2021-02-11 11:32:46 -08:00
Michael Vines 247228ee61 Implementation-defined RPC server errors are now accessible to client/ users 2020-10-13 10:05:44 -07:00
Trent Nelson ba353c2b1d Move CLI blockhash_query module into client crate 2020-09-23 15:58:44 -06:00
Trent Nelson dda48e2d06 Move `CliNonceError` into client crate 2020-09-23 15:58:44 -06:00
Tyera Eulberg 8d951776ab
Rpc: add filter to getProgramAccounts (#10888)
* Add RpcFilterType, and implement CompareBytes for getProgramAccounts

* Accept bytes in bs58

* Rename to memcmp

* Add Memcmp optional encoding field

* Add dataSize filter

* Update docs

* Clippy

* Simplify tests that don't need to test account contents; add multiple-filter tests
2020-07-03 07:46:29 +00:00
Greg Fitzgerald 64cec764b9
Allow RpcClient users to inject custom "senders" (#10157)
automerge
2020-05-20 18:40:45 -07:00
Tyera Eulberg ee7f15eff1
Rpc: optionally filter getLargestAccounts by circulating/nonCirculating (#10007)
* Add circ/non-circ filter to getLargestAccounts

* Plumb largest accounts into client and cli

* Bump timeout toward CI flakiness

* Update docs
2020-05-12 21:05:05 -06:00
Sunny Gleason a7fa92b372
feat: implementation of live-slots command (#8129) 2020-02-06 14:16:30 -05:00
Tyera Eulberg 6d3b8b6d7d
Remove tuples from JSON RPC responses (#7806)
* Remove RpcConfirmedBlock tuple

* Remove getRecentBlockhash tuple

* Remove getProgramAccounts tuple

* Remove tuple from get_signature_confirmation_status

* Collect Rpc response types

* Camel-case epoch schedule for rpc response

* Remove getBlockCommitment tuple

* Remove getStorageTurn tuple

* Update json-rpc docs
2020-01-15 00:25:45 -07:00
Michael Vines d50aef8404 Add get-epoch-info command (#6161)
automerge
2019-09-27 22:00:30 -07:00
sakridge aac626c2c2
Add sample_txs function to perf_utils shared crate (#4104)
Shared code between bench-tps and bench-exchange
2019-05-01 15:58:35 -07:00
Tyera Eulberg 5a79676b8a Custom error decoder (#3783)
automerge
2019-04-25 10:29:44 -07:00
Tyera Eulberg 4068612300 Remove RpcSignatureStatus 2019-04-05 22:09:29 -06:00
Michael Vines 73ceaf07b1 client/: move RpcClient from rpc_request.rs to rpc_client.rs 2019-03-16 23:27:23 -07:00
Michael Vines 7b314f47f7 Factor RPC request mechanism out of RpcClient into *RpcClientRequest 2019-03-16 23:27:23 -07:00
Michael Vines 23337e08eb client/: Merge client.rs into thin_client.rs 2019-03-16 22:48:26 -07:00
Michael Vines e2c24481e4 wallet/ now only dev-depends on core/ 2019-03-16 21:40:39 -07:00
Tyera Eulberg 1d689e84f1 Move and rename cluster_client 2019-03-12 22:05:38 -06:00
Tyera Eulberg 3fc96c4a18 Add solana-client crate 2019-03-12 22:05:38 -06:00