Commit Graph

22 Commits

Author SHA1 Message Date
Greg Cusack 5f6d66e87b
Deprecate `ThinClient` and remove `ThinClient` from `bench-tps` (#35365)
* deprecate ThinClient

* switch localcluster bench test to use tpuclient

add back in command line args for thinclient. add thin-client deprecation README

refactor TpuClient connection

* remove thin-client from net/

* change 2.0.0 to 1.19.0
2024-03-01 12:14:52 -08:00
Lijun Wang 344e466e12
Async connection creation in connection cache (#33302)
If there is a connection in the cache available, use it and create the additional connection asynchronously.
2023-09-25 18:17:47 -07:00
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00
behzad nouri 5760390d3b
removes redundant NewConnectionConfig trait (#31979)
Working towards removing hard-coded TPU specific configurations from
QUIC code; NewConnectionConfig is redundant and gets in the way.
2023-06-06 21:28:29 +00:00
blackghost1987 9f9d6f8a89
Relax `Sized` bound for `Signers` in `Transaction` and `Client` (#30568)
* relax Sized bound for Signers in Transaction and Client

* also relax Sized bounds in client, runtime, thin-client and tpu-client

* add tests for using non-sized transaction signers

* fix macro for thin_client vs ?Sized

* move tests to transactions, add Sized relaxation to mut macro

* fix clippy warning

* get rid of unnecessary imports
2023-03-30 13:12:48 +00:00
Yihau Chen 2c842e9932
chore: workspace inheritance (#30939)
* client/Cargo.toml

* udp-client/Cargo.toml

* tpu-client/Cargo.toml

* thin-client/Cargo.toml

* storage-proto/Cargo.toml

* quic-client/Cargo.toml

* dos/Cargo.toml

* entry/Cargo.toml

* perf/Cargo.toml

* program-runtime/Cargo.toml

* program-test/Cargo.toml

* programs/address-lookup-table/Cargo.toml

* programs/loader-v3/Cargo.toml

* connection-cache/Cargo.toml

* programs/sbf/rust/big_mod_exp/Cargo.toml

* programs/zk-token-proof-tests/Cargo.toml
2023-03-29 03:28:56 +00:00
behzad nouri 75abfc79a6
removes unused dependencies (#30917) 2023-03-28 17:25:44 +00:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Lijun Wang d49b48100d
Cleanup tempoary pub modules (#30268)
Clean up temporary_pub_modules in tpu_client and thin_client
2023-02-10 20:35:09 -08:00
behzad nouri 1ad69cfc38
removes dynamic cast and dynamic dispatch from connection-cache (#30128)
Dynamic dispatch forces heap allocation and adds extra overhead.
Dynamic casting as in the ones below, lacks compile-time type safety:
https://github.com/solana-labs/solana/blob/eeb622c4e/quic-client/src/lib.rs#L172-L175
https://github.com/solana-labs/solana/blob/eeb622c4e/udp-client/src/lib.rs#L52-L55

The commit removes all instances of Any, Box<dyn ...>, and Arc<dyn ...>,
and instead uses generic and associated types.

There are only two protocols QUIC and UDP; and the code which has to
work with both protocols can use a trivial thin enum wrapper.

With respect to connection-cache specifically:
* connection-cache/ConnectionCache is a single protocol cache which
  allows to use either QUIC or UDP without any build dependency on the
  other protocol.
* client/ConnectionCache is an enum wrapper around both protocols and
  can be used in the code which has to work with both QUIC and UDP.

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2023-02-09 00:50:44 +00:00
Lijun Wang ada6136a6c
Refactor connection cache to support generic msgs (#29774)
tpu-client/tpu_connection_cache is refactored out the module and moved to connection-cache/connection_cache and the logic in client/connection_cache is consolidated to connection-cache/connection_cache as well. client/connection_cache only has a thin wrapper which forward calls to connection-cache/connection_cache and deal with constructions of quic/udp connection cache for clients using them both.2.

The TpuConnection is refactored to ClientConnection to make it generic and functions renamed to be proper for other workflows. eg. tpu_addr -> server_addr, send_transaction --> send_data and etc...

The enum dispatch is removed so that we can make the bulk of code of quic and udp agnostic of each other. The client is possible to load quic or udp only into its runtime.

The generic type parameter in the tpu-client/tpu_connection_cache is removed in order to create both quic and udp connection cache and use the object to send transactions with multiple branching when sending data. The generic type parameters and associated types are dropped in other types in order to make the trait "object safe" for this purpose.

I have annotated the code explaining the reasoning and the refactoring source -> destination.

There is no functional changes

bench-tps has been performed for rpc-client, thin-client and tpu-client. And it is found the performance number largely match the ones before the refactoring.
2023-02-01 18:10:06 -08:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
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
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Will Hickey c0e4379f43
Whickey/version v1.15 (#27739)
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
Tyera Eulberg 7bd08ad3ae
Featurize spinner in rpc-client and tpu-client (#27381)
* Add spinner features to rpc-client and tpu-client, and disable where unneeded

* Add doc comment
2022-08-30 09:56:56 -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