diff --git a/Cargo.lock b/Cargo.lock index c531f06f65c207..371729fcd5768f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5998,6 +5998,7 @@ dependencies = [ "solana-bloom", "solana-client", "solana-compute-budget", + "solana-connection-cache", "solana-core", "solana-cost-model", "solana-entry", @@ -6094,6 +6095,7 @@ dependencies = [ "serde", "solana-bench-tps", "solana-client", + "solana-connection-cache", "solana-core", "solana-faucet", "solana-gossip", @@ -7213,6 +7215,7 @@ dependencies = [ "crossbeam-channel", "log", "solana-client", + "solana-connection-cache", "solana-logger", "solana-measure", "solana-metrics", diff --git a/client/src/connection_cache.rs b/client/src/connection_cache.rs index a682b6e6db2247..107c7210082aab 100644 --- a/client/src/connection_cache.rs +++ b/client/src/connection_cache.rs @@ -16,7 +16,6 @@ use { solana_streamer::streamer::StakedNodes, solana_udp_client::{UdpConfig, UdpConnectionManager, UdpPool}, std::{ - error::Error, net::{IpAddr, Ipv4Addr, SocketAddr}, sync::{Arc, RwLock}, }, @@ -110,29 +109,6 @@ impl ConnectionCache { } } - #[deprecated( - since = "1.15.0", - note = "This method does not do anything. Please use `new_with_client_options` instead to set the client certificate." - )] - pub fn update_client_certificate( - &mut self, - _keypair: &Keypair, - _ipaddr: IpAddr, - ) -> Result<(), Box> { - Ok(()) - } - - #[deprecated( - since = "1.15.0", - note = "This method does not do anything. Please use `new_with_client_options` instead to set staked nodes information." - )] - pub fn set_staked_nodes( - &mut self, - _staked_nodes: &Arc>, - _client_pubkey: &Pubkey, - ) { - } - pub fn with_udp(name: &'static str, connection_pool_size: usize) -> Self { // The minimum pool size is 1. let connection_pool_size = 1.max(connection_pool_size); diff --git a/client/src/lib.rs b/client/src/lib.rs index 89b66cf3b34796..f5e045ff531604 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -2,13 +2,10 @@ pub mod connection_cache; pub mod nonblocking; -pub mod quic_client; pub mod send_and_confirm_transactions_in_parallel; pub mod thin_client; pub mod tpu_client; -pub mod tpu_connection; pub mod transaction_executor; -pub mod udp_client; extern crate solana_metrics; diff --git a/client/src/nonblocking/mod.rs b/client/src/nonblocking/mod.rs index ab11ae5c6782b2..b62618c024b5ca 100644 --- a/client/src/nonblocking/mod.rs +++ b/client/src/nonblocking/mod.rs @@ -1,7 +1,4 @@ -pub mod quic_client; pub mod tpu_client; -pub mod tpu_connection; -pub mod udp_client; pub mod blockhash_query { pub use solana_rpc_client_nonce_utils::nonblocking::blockhash_query::*; diff --git a/client/src/nonblocking/quic_client.rs b/client/src/nonblocking/quic_client.rs deleted file mode 100644 index 28b9649289e2b4..00000000000000 --- a/client/src/nonblocking/quic_client.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_quic_client::nonblocking::quic_client::QuicClientConnection` instead." -)] -pub use solana_quic_client::nonblocking::quic_client::QuicClientConnection as QuicTpuConnection; -pub use solana_quic_client::nonblocking::quic_client::{ - QuicClient, QuicClientCertificate, QuicLazyInitializedEndpoint, -}; diff --git a/client/src/nonblocking/tpu_connection.rs b/client/src/nonblocking/tpu_connection.rs deleted file mode 100644 index b91a88853310b4..00000000000000 --- a/client/src/nonblocking/tpu_connection.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_connection_cache::nonblocking::client_connection::ClientConnection` instead." -)] -pub use solana_connection_cache::nonblocking::client_connection::ClientConnection as TpuConnection; diff --git a/client/src/nonblocking/udp_client.rs b/client/src/nonblocking/udp_client.rs deleted file mode 100644 index e880b1fb107cf8..00000000000000 --- a/client/src/nonblocking/udp_client.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_udp_client::nonblocking::udp_client::UdpClientConnection` instead." -)] -pub use solana_udp_client::nonblocking::udp_client::UdpClientConnection as UdpTpuConnection; diff --git a/client/src/quic_client.rs b/client/src/quic_client.rs deleted file mode 100644 index a32aa381cb10ef..00000000000000 --- a/client/src/quic_client.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_quic_client::quic_client::QuicClientConnection` instead." -)] -pub use solana_quic_client::quic_client::QuicClientConnection as QuicTpuConnection; diff --git a/client/src/tpu_connection.rs b/client/src/tpu_connection.rs deleted file mode 100644 index 9e000612a51e03..00000000000000 --- a/client/src/tpu_connection.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_connection_cache::client_connection::ClientConnection` instead." -)] -pub use solana_connection_cache::client_connection::ClientConnection as TpuConnection; -pub use solana_connection_cache::client_connection::ClientStats; diff --git a/client/src/udp_client.rs b/client/src/udp_client.rs deleted file mode 100644 index c05b74b3640749..00000000000000 --- a/client/src/udp_client.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[deprecated( - since = "1.15.0", - note = "Please use `solana_udp_client::udp_client::UdpClientConnection` instead." -)] -pub use solana_udp_client::udp_client::UdpClientConnection as UdpTpuConnection; diff --git a/core/Cargo.toml b/core/Cargo.toml index 09aaa981310e68..d396697613fb54 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -46,6 +46,7 @@ solana-accounts-db = { workspace = true } solana-bloom = { workspace = true } solana-client = { workspace = true } solana-compute-budget = { workspace = true } +solana-connection-cache = { workspace = true } solana-cost-model = { workspace = true } solana-entry = { workspace = true } solana-frozen-abi = { workspace = true, optional = true } diff --git a/core/src/banking_stage/forwarder.rs b/core/src/banking_stage/forwarder.rs index 492ba94504558b..acb34b8b4dc1e9 100644 --- a/core/src/banking_stage/forwarder.rs +++ b/core/src/banking_stage/forwarder.rs @@ -10,7 +10,8 @@ use { next_leader::{next_leader, next_leader_tpu_vote}, tracer_packet_stats::TracerPacketStats, }, - solana_client::{connection_cache::ConnectionCache, tpu_connection::TpuConnection}, + solana_client::connection_cache::ConnectionCache, + solana_connection_cache::client_connection::ClientConnection as TpuConnection, solana_gossip::cluster_info::ClusterInfo, solana_measure::measure_us, solana_perf::{data_budget::DataBudget, packet::Packet}, diff --git a/core/src/warm_quic_cache_service.rs b/core/src/warm_quic_cache_service.rs index b7f196661ba150..e4a67cbe993169 100644 --- a/core/src/warm_quic_cache_service.rs +++ b/core/src/warm_quic_cache_service.rs @@ -3,10 +3,8 @@ use { rand::{thread_rng, Rng}, - solana_client::{ - connection_cache::{ConnectionCache, Protocol}, - tpu_connection::TpuConnection, - }, + solana_client::connection_cache::{ConnectionCache, Protocol}, + solana_connection_cache::client_connection::ClientConnection as TpuConnection, solana_gossip::cluster_info::ClusterInfo, solana_poh::poh_recorder::PohRecorder, std::{ diff --git a/dos/Cargo.toml b/dos/Cargo.toml index a59dce7b337239..535653e3386e6c 100644 --- a/dos/Cargo.toml +++ b/dos/Cargo.toml @@ -19,6 +19,7 @@ rand = { workspace = true } serde = { workspace = true } solana-bench-tps = { workspace = true } solana-client = { workspace = true } +solana-connection-cache = { workspace = true } solana-core = { workspace = true } solana-faucet = { workspace = true } solana-gossip = { workspace = true } diff --git a/dos/src/main.rs b/dos/src/main.rs index 033de4bf4b49da..0b299718467134 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -46,10 +46,8 @@ use { log::*, rand::{thread_rng, Rng}, solana_bench_tps::bench::generate_and_fund_keypairs, - solana_client::{ - connection_cache::ConnectionCache, tpu_client::TpuClientWrapper, - tpu_connection::TpuConnection, - }, + solana_client::{connection_cache::ConnectionCache, tpu_client::TpuClientWrapper}, + solana_connection_cache::client_connection::ClientConnection as TpuConnection, solana_core::repair::serve_repair::{RepairProtocol, RepairRequestHeader, ServeRepair}, solana_dos::cli::*, solana_gossip::{ diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 80ccd49888ed64..fe8f9472463d97 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -4864,6 +4864,7 @@ dependencies = [ "solana-bloom", "solana-client", "solana-compute-budget", + "solana-connection-cache", "solana-cost-model", "solana-entry", "solana-geyser-plugin-manager", @@ -6168,6 +6169,7 @@ dependencies = [ "crossbeam-channel", "log", "solana-client", + "solana-connection-cache", "solana-measure", "solana-metrics", "solana-runtime", diff --git a/send-transaction-service/Cargo.toml b/send-transaction-service/Cargo.toml index 35e76524d9017a..a69c366a358fdc 100644 --- a/send-transaction-service/Cargo.toml +++ b/send-transaction-service/Cargo.toml @@ -13,6 +13,7 @@ edition = { workspace = true } crossbeam-channel = { workspace = true } log = { workspace = true } solana-client = { workspace = true } +solana-connection-cache = { workspace = true } solana-measure = { workspace = true } solana-metrics = { workspace = true } solana-runtime = { workspace = true } diff --git a/send-transaction-service/src/send_transaction_service.rs b/send-transaction-service/src/send_transaction_service.rs index abe53b236d2e75..8cc21b12359639 100644 --- a/send-transaction-service/src/send_transaction_service.rs +++ b/send-transaction-service/src/send_transaction_service.rs @@ -2,10 +2,8 @@ use { crate::tpu_info::TpuInfo, crossbeam_channel::{Receiver, RecvTimeoutError}, log::*, - solana_client::{ - connection_cache::{ConnectionCache, Protocol}, - tpu_connection::TpuConnection, - }, + solana_client::connection_cache::{ConnectionCache, Protocol}, + solana_connection_cache::client_connection::ClientConnection as TpuConnection, solana_measure::measure::Measure, solana_runtime::{bank::Bank, bank_forks::BankForks}, solana_sdk::{