Skip to content

Commit

Permalink
v2.0: Remove deprecated symbols from solana-client (mostly re-exports…
Browse files Browse the repository at this point in the history
…) (backport of anza-xyz#1992) (anza-xyz#2041)

Remove deprecated symbols from solana-client (mostly re-exports) (anza-xyz#1992)

* Remove usage of deprecated re-export from SendTransactionService

* Remove usage of deprecated re-export from core

* Remove usage of deprecated re-export from solana-dos

* Remove deprecated ConnectionCache methods

* Remove deprecated udp_client re-export

* Remove deprecated tpu_connection re-export

* Remove deprecated quic_client re-export

(cherry picked from commit 3cd7621)

Co-authored-by: Tyera <tyera@anza.xyz>
  • Loading branch information
2 people authored and neutrinoks committed Jul 17, 2024
1 parent 1a01d6c commit 9e459f4
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 77 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 0 additions & 24 deletions client/src/connection_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
Expand Down Expand Up @@ -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<dyn Error>> {
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<RwLock<StakedNodes>>,
_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);
Expand Down
3 changes: 0 additions & 3 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions client/src/nonblocking/mod.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down
8 changes: 0 additions & 8 deletions client/src/nonblocking/quic_client.rs

This file was deleted.

5 changes: 0 additions & 5 deletions client/src/nonblocking/tpu_connection.rs

This file was deleted.

5 changes: 0 additions & 5 deletions client/src/nonblocking/udp_client.rs

This file was deleted.

5 changes: 0 additions & 5 deletions client/src/quic_client.rs

This file was deleted.

6 changes: 0 additions & 6 deletions client/src/tpu_connection.rs

This file was deleted.

5 changes: 0 additions & 5 deletions client/src/udp_client.rs

This file was deleted.

1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion core/src/banking_stage/forwarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
6 changes: 2 additions & 4 deletions core/src/warm_quic_cache_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
1 change: 1 addition & 0 deletions dos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 2 additions & 4 deletions dos/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 2 additions & 0 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions send-transaction-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 2 additions & 4 deletions send-transaction-service/src/send_transaction_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down

0 comments on commit 9e459f4

Please sign in to comment.